def is_switchport_default(existing):
 c1 = (existing['access_vlan'] == '1')
 c2 = (existing['native_vlan'] == '1')
 c3 = (existing['trunk_vlans'] == '1-4094')
 c4 = (existing['mode'] == 'access')
 default = (c1 and c2 and c3 and c4)
 return default

def is_switchport_default ( existing ) : c1 = ( existing [ 'access_vlan' ] == '1' ) c2 = ( existing [ 'native_vlan' ] == '1' ) c3 = ( existing [ 'trunk_vlans' ] == '1-4094' ) c4 = ( existing [ 'mode' ] == 'access' ) default = ( c1 and c2 and c3 and c4 ) return default
determines if switchport has a default config based on mode args: existing : existing switchport configuration from ansible mod returns: boolean: true if switchport has oob layer 2 config .