aboutsummaryrefslogtreecommitdiff
path: root/utils/ipam/yaml_model/yaml_model.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/ipam/yaml_model/yaml_model.go')
-rw-r--r--utils/ipam/yaml_model/yaml_model.go10
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) {