def make_ip_network(port, network):
 ip_address = netaddr.IPAddress(port['fixed_ips'][0]['ip_address'])
 return netaddr.IPNetwork((ip_address.value, network.prefixlen))

def make_ip_network ( port , network ) : ip_address = netaddr . IPAddress ( port [ 'fixed_ips' ] [ 0 ] [ 'ip_address' ] ) return netaddr . IPNetwork ( ( ip_address . value , network . prefixlen ) )
make an ipnetwork object from port and network .