def get_dhcp_hosts(context, network_ref, fixedips):
 hosts = []
 macs = set()
 for fixedip in fixedips:
  if fixedip.allocated:
   if (fixedip.virtual_interface.address not in macs):
    hosts.append(_host_dhcp(fixedip))
    macs.add(fixedip.virtual_interface.address)
 return '\n'.join(hosts)

def get_dhcp_hosts ( context , network_ref , fixedips ) : hosts = [ ] macs = set ( ) for fixedip in fixedips : if fixedip . allocated : if ( fixedip . virtual_interface . address not in macs ) : hosts . append ( _host_dhcp ( fixedip ) ) macs . add ( fixedip . virtual_interface . address ) return '\n' . join ( hosts )
get networks hosts config in dhcp-host format .