diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-10-29 21:58:47 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-10-29 21:58:47 +0100 |
commit | ab2409752fc8992a172e8caffa64fa19beafbcb7 (patch) | |
tree | bec8f72367bba8f584893f76219b034943039247 /utils/networks | |
parent | af7c5d500b76a6f2db790a1a8e0480f370da81ce (diff) | |
download | infra-ab2409752fc8992a172e8caffa64fa19beafbcb7.tar.gz infra-ab2409752fc8992a172e8caffa64fa19beafbcb7.tar.bz2 infra-ab2409752fc8992a172e8caffa64fa19beafbcb7.tar.xz infra-ab2409752fc8992a172e8caffa64fa19beafbcb7.zip |
utils: routers
Diffstat (limited to 'utils/networks')
-rw-r--r-- | utils/networks/networks.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/utils/networks/networks.go b/utils/networks/networks.go index f667f05..9ecf256 100644 --- a/utils/networks/networks.go +++ b/utils/networks/networks.go @@ -2,23 +2,11 @@ package networks import ( "fmt" - "os" "slices" Ipam "utils/ipam" ) -func RunNetworks() error { - ipamYaml := "../ansible/group_vars/all/ipam.yml" - bs, err := os.ReadFile(ipamYaml) - if err != nil { - return err - } - - ipam, err := Ipam.LoadIpam(bs) - if err != nil { - return err - } - +func RunNetworks(ipam *Ipam.Ipam) error { networks := slices.SortedFunc(slices.Values(ipam.Networks), Ipam.CompareNetwork) roots := slices.SortedFunc(slices.Values(ipam.FindRoots()), Ipam.CompareNetwork) |