ironic.common.dhcp_factory module

class ironic.common.dhcp_factory.DHCPFactory(**kwargs)[source]

Bases: object

clean_dhcp(task)[source]

Clean up the DHCP BOOT options for this node.

Parameters

task – A TaskManager instance.

property provider
update_dhcp(task, dhcp_opts, ports=None)[source]

Send or update the DHCP BOOT options for this node.

Parameters
  • task – A TaskManager instance.

  • dhcp_opts

    this will be a list of dicts, e.g.

    [{'opt_name': '67',
      'opt_value': 'pxelinux.0'},
     {'opt_name': '66',
      'opt_value': '123.123.123.456'}]
    

  • ports

    A dict with keys ‘ports’ and ‘portgroups’ and dicts as values. Each dict has key/value pairs of the form <ironic UUID>:<neutron port UUID>. e.g.

    {'ports': {'port.uuid': vif.id},
     'portgroups': {'portgroup.uuid': vif.id}}
    

    If the value is None, will get the list of ports/portgroups from the Ironic port/portgroup objects.