diff options
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) |