From ab2409752fc8992a172e8caffa64fa19beafbcb7 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 29 Oct 2024 21:58:47 +0100 Subject: utils: routers --- utils/networks/networks.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'utils/networks') 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) -- cgit v1.2.3