def _get_adapter_name_and_ip_address(network_adapters, mac_address):
 adapter_name = None
 ip_address = None
 for network_adapter in network_adapters:
  if (network_adapter['mac-address'] == mac_address.lower()):
   adapter_name = network_adapter['name']
   ip_address = network_adapter['ip-address']
   break
 return (adapter_name, ip_address)

def _get_adapter_name_and_ip_address ( network_adapters , mac_address ) : adapter_name = None ip_address = None for network_adapter in network_adapters : if ( network_adapter [ 'mac-address' ] == mac_address . lower ( ) ) : adapter_name = network_adapter [ 'name' ] ip_address = network_adapter [ 'ip-address' ] break return ( adapter_name , ip_address )
get the adapter name based on the mac address .