def init_leases(network_id):
 ctxt = context.get_admin_context()
 network = objects.Network.get_by_id(ctxt, network_id)
 network_manager = importutils.import_object(CONF.network_manager)
 return network_manager.get_dhcp_leases(ctxt, network)

def init_leases ( network_id ) : ctxt = context . get_admin_context ( ) network = objects . Network . get_by_id ( ctxt , network_id ) network_manager = importutils . import_object ( CONF . network_manager ) return network_manager . get_dhcp_leases ( ctxt , network )
get the list of hosts for a network .