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/ipam/yaml_model | |
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/ipam/yaml_model')
-rw-r--r-- | utils/ipam/yaml_model/yaml_model.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/ipam/yaml_model/yaml_model.go b/utils/ipam/yaml_model/yaml_model.go index 6e5b0f8..4109e12 100644 --- a/utils/ipam/yaml_model/yaml_model.go +++ b/utils/ipam/yaml_model/yaml_model.go @@ -3,8 +3,8 @@ package yaml_model import "gopkg.in/yaml.v3" type Ipam struct { - Ipam6 Ipam6 `yaml:"ipam6,omitempty"` - Routers []Router `yaml:"routers,omitempty"` + Ipam6 Ipam6 `yaml:"ipam6,omitempty"` + Routers map[string]Router `yaml:"routers,omitempty"` } type Ipam6 struct { @@ -17,12 +17,12 @@ type Network6Yaml struct { } type Router struct { - As string `yaml:"as,omitempty"` - Peer []Peer `yaml:"peer,omitempty"` + As string `yaml:"as,omitempty"` + Peers map[string]Peer `yaml:"peers,omitempty"` } type Peer struct { - Name string `yaml:"name"` + As string `yaml:"as"` } func Parse(bs []byte) (Ipam, error) { |