STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
generate_dhcp_config.py File Reference

Go to the source code of this file.

Namespaces

namespace  generate_dhcp_config

Functions

"NoReturn" generate_dhcp_config._die (str msg)
None generate_dhcp_config._warn (str msg)
str|None generate_dhcp_config.normalize_mac (str raw)
ipaddress.IPv4Network generate_dhcp_config.resolve_subnet (dict cfg)
str generate_dhcp_config.detect_interface (ipaddress.IPv4Network subnet)
list[str] generate_dhcp_config.interfaces_in_subnet (str ip_addr_output, ipaddress.IPv4Network subnet)
None generate_dhcp_config.write_atomic (Path path, str text)
str generate_dhcp_config.recovery_address (str mac)
list[tuple[str, str, str]] generate_dhcp_config.collect_reservations (dict cfg, ipaddress.IPv4Network subnet)
str generate_dhcp_config.sanitize_hostname (str name)
str generate_dhcp_config.build_hosts (list[tuple[str, str, str]] reservations)
str generate_dhcp_config.build_gui_reservations (list[tuple[str, str, str]] reservations, dict boards)
str generate_dhcp_config.build_conf (*, str interface, ipaddress.IPv4Network subnet, int pool_start, int pool_end, str lease, Path hostsfile, str leasefile)
int generate_dhcp_config.main (list[str]|None argv=None)

Variables

 generate_dhcp_config.ENV_INTERFACE = os.environ.get("DHCP_INTERFACE")
int generate_dhcp_config.DEFAULT_POOL_START = 200
int generate_dhcp_config.DEFAULT_POOL_END = 250
str generate_dhcp_config.DEFAULT_LEASE = "2h"
str generate_dhcp_config.DEFAULT_LEASEFILE = "/var/lib/misc/star-dhcp.leases"
 generate_dhcp_config._MAC_RE = re.compile(r"^([0-9a-f]{2}:){5}[0-9a-f]{2}$")