ISC DHCP Server¶
-
class
container.dhcpd.
Dhcpd
(name, **kwargs)[source]¶ Bases:
container.Docker
Docker container running a DHCP Daemon
-
conf
¶ String storing dhcpd.conf settings.
-
add_global
(option)[source]¶ Add global parameter to ‘conf’. Create these with functions within dhcpd.globals. :param option: String returned from one of the methods inside ‘dhcpd.globals’ class.
-
add_subnet
(ip_network, option_list=None, addr_range=None)[source]¶ Adds a subnet configuration with the supplied parameters to ‘conf’.
Parameters: - ip_network – Network for subnet address and netmask.
- addr_range – Range of IP addresses the DHCP server will assign.
- option_list – List of options created by functions within ‘dhcpd.options’ or ‘dhcpd.globals’.
-
config
(**kwargs)[source]¶ Extends Node.config. Creates a file containing the settings from ‘conf’ and writes them to /etc/dhcp inside the container.
Todo
If running and a config change is made restart the server
Todo
Store and mount the config file rather than copying it https://stackoverflow.com/questions/42248198/how-to-mount-a-single-file-in-a-volume
-
-
class
container.dhcpd.
globals
[source]¶ Global options as per http://www.ipamworldwide.com/ipam/dhcp-server-params.html. NOTE: not all options are implemented.
-
class
container.dhcpd.
options
[source]¶ Per network options as per http://www.ipamworldwide.com/ipam/isc-dhcpv4-options.html NOTE: not all options are implemented.
-
class
List
¶ Bases:
list
,typing.MutableSequence
-
class
Tuple
¶ Bases:
tuple
Tuple type; Tuple[X, Y] is the cross-product type of X and Y.
Example: Tuple[T1, T2] is a tuple of two elements corresponding to type variables T1 and T2. Tuple[int, float, str] is a tuple of an int, a float and a string.
To specify a variable-length tuple of homogeneous type, use Tuple[T, …].
-
class