pvl/hosts/dhcp.py
changeset 733 45bedeba92e5
parent 731 5e2c1b78047d
child 739 5149c39f3dfc
equal deleted inserted replaced
732:ddb77f32b35a 733:45bedeba92e5
    22     """
    22     """
    23 
    23 
    24     yield 'option', 'host-name', host.name
    24     yield 'option', 'host-name', host.name
    25     yield 'hardware', 'ethernet', pvl.dhcp.config.Field(ethernet)
    25     yield 'hardware', 'ethernet', pvl.dhcp.config.Field(ethernet)
    26 
    26 
    27     if host.ip:
    27     if host.ip4:
    28         yield 'fixed-address', pvl.dhcp.config.Field(str(host.ip))
    28         yield 'fixed-address', pvl.dhcp.config.Field(str(host.ip4))
    29       
    29       
    30     for bootopt in ('next-server', 'filename'):
    30     for bootopt in ('next-server', 'filename'):
    31         if bootopt in host.boot:
    31         if bootopt in host.boot:
    32             yield bootopt, host.boot[bootopt]
    32             yield bootopt, host.boot[bootopt]
    33 
    33