def get_arp_ip_mac_pairs(device_name, namespace):
 device = ip_lib.IPDevice(device_name, namespace)
 for entry in device.neigh.show(ip_version=4).splitlines():
  match = IPV4_NEIGH_REGEXP.match(entry)
  if match:
   (yield (match.group('ip'), match.group('mac')))

def get_arp_ip_mac_pairs ( device_name , namespace ) : device = ip_lib . IPDevice ( device_name , namespace ) for entry in device . neigh . show ( ip_version = 4 ) . splitlines ( ) : match = IPV4_NEIGH_REGEXP . match ( entry ) if match : ( yield ( match . group ( 'ip' ) , match . group ( 'mac' ) ) )
generate pairs from devices ip neigh .