ironic.dhcp.dnsmasq module¶
- class ironic.dhcp.dnsmasq.DnsmasqDHCPApi[source]¶
- Bases: - BaseDHCP- API for managing host specific Dnsmasq configuration. - clean_dhcp_opts(task)[source]¶
- Clean up the DHCP BOOT options for the host in task. - Parameters:
- task – A TaskManager instance. 
- Raises:
- FailedToCleanDHCPOpts 
 
 - 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/portgroups. 
 
 - supports_ipxe_tag()[source]¶
- Whether the provider will correctly apply the ‘ipxe’ tag. - When iPXE makes a DHCP request, does this provider support adding the tag ipxe or ipxe6 (for IPv6). When the provider returns True, options can be added which filter on these tags. - The dnsmasq provider sets this to True on the assumption that the following is included in the dnsmasq.conf: - dhcp-match=set:ipxe,175 - Returns:
- True 
 
 - 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', 'ip_version': 4}, {'opt_name': '66', 'opt_value': '123.123.123.456', 'ip_version': 4}] 
- vifs – Ignored argument 
 
 
 - update_port_dhcp_opts(port_id, dhcp_options, 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', 'ip_version': 4}, {'opt_name': '66', 'opt_value': '123.123.123.456', 'ip_version': 4}] 
- context (ironic.common.context.RequestContext) – request context 
 
- Raises:
- FailedToUpdateDHCPOptOnPort 
 
 
