Add DHCP pool support.
This commit is contained in:
parent
f35e402b4d
commit
bf6ba269af
3 changed files with 141 additions and 39 deletions
37
tests/addressing-dhcp-test.nix
Normal file
37
tests/addressing-dhcp-test.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
let
|
||||
lib = import <nixpkgs/lib>;
|
||||
|
||||
addressing = import ../lib/addressing {
|
||||
inherit lib;
|
||||
};
|
||||
|
||||
spec = {
|
||||
locations = {
|
||||
cloud = {
|
||||
domain = "kasear.net";
|
||||
networks.cloud.subnets.dmz.hosts.eris.role = "router";
|
||||
};
|
||||
|
||||
norfolk = {
|
||||
domain = "kasear.net";
|
||||
networks.norfolk.subnets = {
|
||||
main.hosts.loki.role = "adminWorkstation";
|
||||
|
||||
iot = {
|
||||
dhcpRange = {
|
||||
startIp = "10.1.125.10";
|
||||
endIp = "10.1.127.200";
|
||||
};
|
||||
hosts.thermostat.role = "homeAutomation";
|
||||
};
|
||||
|
||||
lab = {
|
||||
dhcp = false;
|
||||
hosts.testbox.role = "labDevice";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
addressing.mkNetworkFromSpec spec
|
||||
Loading…
Add table
Add a link
Reference in a new issue