#NEWLINE# def get_dhcp_hosts( context , network_ref , fixedips ) : #NEWLINE# #INDENT# "Get network's hosts config in dhcp-host format." #NEWLINE# hosts = [ ] #NEWLINE# macs = set ( ) #NEWLINE# for fixedip in context : #NEWLINE# #INDENT# if fixedip . allocated : #NEWLINE# #INDENT# if ( fixedip . virtual_interface . address not in macs ) : #NEWLINE# #INDENT# hosts . append ( _host_dhcp ( fixedip ) ) #NEWLINE# macs . add ( fixedip . virtual_interface . address ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return '\n' . join ( hosts )