ironic.dhcp.none module¶
-
class
ironic.dhcp.none.
NoneDHCPApi
[source]¶ Bases:
ironic.dhcp.base.BaseDHCP
No-op DHCP API.
-
get_ip_addresses
(task)[source]¶ Get IP addresses for all ports/portgroups in task.
- Parameters
task – A TaskManager instance.
- Returns
List of IP addresses associated with task’s ports and portgroups.
-
update_dhcp_opts
(task, options, vifs=None)[source]¶ Send or update the DHCP BOOT options for this node.
- Parameters
task – A TaskManager instance.
options –
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'}]
vifs –
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.
- Raises
FailedToUpdateDHCPOptOnPort
-
update_port_dhcp_opts
(port_id, dhcp_options, token=None, context=None)[source]¶ Update one or more DHCP options on the specified port.
- Parameters
port_id – designate which port these attributes will be applied to.
dhcp_options –
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'}]
token – An optional authentication token. Deprecated, use context
context (ironic.common.context.RequestContext) – request context
- Raises
FailedToUpdateDHCPOptOnPort
-