Add a test for the location submodule: Addressing.

This commit is contained in:
Yaro Kasear 2025-11-28 18:55:16 -06:00
parent 896c5ff939
commit 9b9cfb76a9
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,36 @@
let
lib = import <nixpkgs/lib> { };
addressing = import ./lib/addressing { inherit lib; };
spec = {
domain = "kasear.net";
locations = {
home = {
# note: owner/admins/users are *ignored* by mkNetworkFromSpec
owner = "yaro";
admins = [ "ops" ];
main = {
vlan = 10;
hosts = {
deimos = {
role = "server";
hostId = 1;
};
router = {
role = "router";
hostId = 1;
};
};
};
};
};
};
network = addressing.mkNetworkFromSpec spec;
in
{
inherit spec network;
}