The 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.
-
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': 'bootfile-name', 'opt_value': 'pxelinux.0'}, {'opt_name': 'server-ip-address', 'opt_value': '123.123.123.456'}, {'opt_name': 'tftp-server', 'opt_value': '123.123.123.123'}]
- 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.
-