aboutsummaryrefslogtreecommitdiff
path: root/utils/networks/networks.go
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-10-29 21:58:47 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2024-10-29 21:58:47 +0100
commitab2409752fc8992a172e8caffa64fa19beafbcb7 (patch)
treebec8f72367bba8f584893f76219b034943039247 /utils/networks/networks.go
parentaf7c5d500b76a6f2db790a1a8e0480f370da81ce (diff)
downloadinfra-master.tar.gz
infra-master.tar.bz2
infra-master.tar.xz
infra-master.zip
utils: routersHEADmaster
Diffstat (limited to 'utils/networks/networks.go')
-rw-r--r--utils/networks/networks.go14
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)