diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-10-29 21:13:43 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-10-29 21:13:43 +0100 |
commit | 0f51c7d542227f1f4c9895db36007b9d95963d99 (patch) | |
tree | a7d57e15a783b5dd3180e8923f88cfb0a8bc8bab /utils/yaml_ipam | |
parent | 19822dde9f01d54776233fe153b6ea5d5b21c454 (diff) | |
download | infra-0f51c7d542227f1f4c9895db36007b9d95963d99.tar.gz infra-0f51c7d542227f1f4c9895db36007b9d95963d99.tar.bz2 infra-0f51c7d542227f1f4c9895db36007b9d95963d99.tar.xz infra-0f51c7d542227f1f4c9895db36007b9d95963d99.zip |
utils: networks
Diffstat (limited to 'utils/yaml_ipam')
-rw-r--r-- | utils/yaml_ipam/yaml_ipam.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/utils/yaml_ipam/yaml_ipam.go b/utils/yaml_ipam/yaml_ipam.go deleted file mode 100644 index ff65155..0000000 --- a/utils/yaml_ipam/yaml_ipam.go +++ /dev/null @@ -1,26 +0,0 @@ -package yaml_ipam - -import "gopkg.in/yaml.v3" - -type Ipam struct { - Ipam6 Ipam6 `yaml:"ipam6"` -} - -type Ipam6 struct { - Networks map[string]Network6Yaml `yaml:"networks"` -} - -type Network6Yaml struct { - Range string `yaml:"range"` - Hosts map[string]string `yaml:"hosts"` -} - -func Parse(bs []byte) (Ipam, error) { - var ipam Ipam - err := yaml.Unmarshal(bs, &ipam) - if err != nil { - return Ipam{}, err - } - - return ipam, nil -} |