This Page

The quantum.agent.linux.dhcp Module

class quantum.agent.linux.dhcp.DhcpBase(conf, network, root_helper='sudo', device_delegate=None, namespace=None, version=None)

Bases: object

active

Boolean representing the running state of the DHCP server.

classmethod check_version()

Execute version checks on DHCP server.

disable(retain_port=False)

Disable dhcp for this network.

enable()

Enables DHCP for this network.

classmethod existing_dhcp_networks(conf, root_helper)

Return a list of existing networks ids (ones we have configs for)

reload_allocations()

Force the DHCP server to reload the assignment database.

restart()

Restart the dhcp service for the network.

class quantum.agent.linux.dhcp.DhcpLocalProcess(conf, network, root_helper='sudo', device_delegate=None, namespace=None, version=None)

Bases: quantum.agent.linux.dhcp.DhcpBase

PORTS = []
active
disable(retain_port=False)

Disable DHCP for this network by killing the local process.

enable()

Enables DHCP for this network by spawning a local process.

get_conf_file_name(kind, ensure_conf_dir=False)

Returns the file name for a given kind of config file.

interface_name
pid

Last known pid for the DHCP process spawned for this network.

spawn_process()
class quantum.agent.linux.dhcp.Dnsmasq(conf, network, root_helper='sudo', device_delegate=None, namespace=None, version=None)

Bases: quantum.agent.linux.dhcp.DhcpLocalProcess

MINIMUM_VERSION = 2.5899999999999999
PORTS = {4: [('udp', 53), ('tcp', 53), ('udp', 67)], 6: [('udp', 53), ('tcp', 53), ('udp', 467)]}
QUANTUM_NETWORK_ID_KEY = 'QUANTUM_NETWORK_ID'
QUANTUM_RELAY_SOCKET_PATH_KEY = 'QUANTUM_RELAY_SOCKET_PATH'
classmethod check_version()
classmethod existing_dhcp_networks(conf, root_helper)

Return a list of existing networks ids (ones we have configs for)

classmethod lease_update()
reload_allocations()

Rebuild the dnsmasq config and signal the dnsmasq to reload.

spawn_process()

Spawns a Dnsmasq process for the network.