pvl/hosts/dhcp.py
changeset 708 fd6f0f044f42
parent 700 88b0d3df1ad7
child 731 5e2c1b78047d
equal deleted inserted replaced
707:13283078a929 708:fd6f0f044f42
    74 
    74 
    75     for host in hosts:
    75     for host in hosts:
    76         extensions = host.extensions.get('dhcp', {})
    76         extensions = host.extensions.get('dhcp', {})
    77 
    77 
    78         for block in dhcp_host(host, **extensions):
    78         for block in dhcp_host(host, **extensions):
    79             if block.key in blocks:
    79             if not block.key:
       
    80                 # TODO: check for unique Item-Blocks
       
    81                 pass
       
    82             elif block.key in blocks:
    80                 raise HostDHCPError(host, "dhcp {block} conflict with {other}; hosts on multiple networks must use unique ethernet.XXX=... naming".format(block=block, other=blocks[block.key]))
    83                 raise HostDHCPError(host, "dhcp {block} conflict with {other}; hosts on multiple networks must use unique ethernet.XXX=... naming".format(block=block, other=blocks[block.key]))
    81 
    84             else:
    82             blocks[block.key] = host
    85                 blocks[block.key] = host
    83 
    86 
    84             yield block
    87             yield block