@@ -5,11 +5,17 @@ import "gopkg.in/yaml.v3"
55type DockerRoutingConfigMode string
66
77const (
8- DockerRoutingConfigModeSeparated DockerRoutingConfigMode = "separated"
9- DockerRoutingConfigModeSplit DockerRoutingConfigMode = "split"
10- DockerRoutingConfigModeUnified DockerRoutingConfigMode = "unified"
8+ DockerRoutingConfigModeSeparated DockerRoutingConfigMode = "separated"
9+ DockerRoutingConfigModeSplit DockerRoutingConfigMode = "split"
10+ DockerRoutingConfigModeSplitUnified DockerRoutingConfigMode = "split-unified"
11+ DockerRoutingConfigModeUnified DockerRoutingConfigMode = "unified"
1112)
1213
14+ type Feature struct {
15+ AutoRestart bool `yaml:"auto_restart"`
16+ Enabled bool `yaml:"enabled"`
17+ }
18+
1319type FECMode string
1420
1521const (
@@ -18,81 +24,81 @@ const (
1824)
1925
2026type Interconnect struct {
21- VNI string `yaml:"vni,omitempty "`
22- VRF string `yaml:"vrf,omitempty "`
27+ VNI string `yaml:"vni"`
28+ VRF string `yaml:"vrf"`
2329}
2430
2531type MCLAG struct {
26- KeepaliveVLAN string `yaml:"keepalive_vlan,omitempty "`
27- MemberPortChannels []string `yaml:"member_port_channels,omitempty "`
28- PeerIP string `yaml:"peer_ip,omitempty "`
29- PeerLink string `yaml:"peer_link,omitempty "`
30- SourceIP string `yaml:"source_ip,omitempty "`
31- SystemMAC string `yaml:"system_mac,omitempty "`
32+ KeepaliveVLAN string `yaml:"keepalive_vlan"`
33+ MemberPortChannels []string `yaml:"member_port_channels"`
34+ PeerIP string `yaml:"peer_ip"`
35+ PeerLink string `yaml:"peer_link"`
36+ SourceIP string `yaml:"source_ip"`
37+ SystemMAC string `yaml:"system_mac"`
3238}
3339
3440type Port struct {
35- IPs []string `yaml:"ips,omitempty "`
36- FECMode `yaml:"fec,omitempty "`
37- MTU int `yaml:"mtu,omitempty "`
38- Name string `yaml:"name,omitempty "`
39- Speed int `yaml:"speed,omitempty "`
40- VRF string `yaml:"vrf,omitempty "`
41+ IPs []string `yaml:"ips"`
42+ FECMode `yaml:"fec"`
43+ MTU int `yaml:"mtu"`
44+ Name string `yaml:"name"`
45+ Speed int `yaml:"speed"`
46+ VRF string `yaml:"vrf"`
4147}
4248
4349type PortChannel struct {
44- Number string `yaml:"number,omitempty "`
45- MTU int `yaml:"mtu,omitempty "`
46- Fallback bool `yaml:"fallback,omitempty "`
47- Members []string `yaml:"members,omitempty "`
50+ Number string `yaml:"number"`
51+ MTU int `yaml:"mtu"`
52+ Fallback bool `yaml:"fallback"`
53+ Members []string `yaml:"members"`
4854}
4955
5056type SAG struct {
51- MAC string `yaml:"mac,omitempty "`
57+ MAC string `yaml:"mac"`
5258}
5359
5460type Values struct {
55- BGPPorts []string `yaml:"bgp_ports,omitempty "`
56- Breakouts map [string ]string `yaml:"breakouts,omitempty "`
57- DHCPRelayEnabled bool `yaml:"dhcp_relay_enabled "`
58- DockerRoutingConfigMode `yaml:"docker_routing_config_mode,omitempty "`
59- FRRMgmtFrameworkConfig bool `yaml:"frr_mgmt_framework_config,omitempty "`
60- Hostname string `yaml:"hostname,omitempty "`
61- Interconnects map [string ]Interconnect `yaml:"interconnects,omitempty "`
62- LLDPHelloTime int `yaml:"lldp_hello_time,omitempty "`
63- LoopbackAddress string `yaml:"loopback_address,omitempty "`
64- MCLAG * MCLAG `yaml:"mclag,omitempty "`
65- MgmtIfGateway string `yaml:"mgmtif_gateway,omitempty "`
66- MgmtIfIP string `yaml:"mgmtif_ip,omitempty "`
67- MgmtVRF bool `yaml:"mgmt_vrf,omitempty "`
68- Nameservers []string `yaml:"nameservers,omitempty "`
69- NTPServers []string `yaml:"ntpservers,omitempty "`
70- PortChannels []PortChannel `yaml:"portchannels,omitempty "`
71- PortChannelsDefaultMTU int `yaml:"portchannels_default_mtu,omitempty "`
72- Ports []Port `yaml:"ports,omitempty "`
73- PortsDefaultFEC FECMode `yaml:"ports_default_fec,omitempty "`
74- PortsDefaultMTU int `yaml:"ports_default_mtu,omitempty "`
75- SAG `yaml:"sag,omitempty "`
76- SSHSourceranges []string `yaml:"ssh_sourceranges,omitempty "`
77- VLANMembers bool `yaml:"vlan_members,omitempty "`
78- VLANs []VLAN `yaml:"vlans,omitempty "`
79- VTEPs []VTEP `yaml:"vteps,omitempty "`
61+ BGPPorts []string `yaml:"bgp_ports"`
62+ Breakouts map [string ]string `yaml:"breakouts"`
63+ DockerRoutingConfigMode `yaml:"docker_routing_config_mode "`
64+ Features map [ string ] Feature `yaml:"features "`
65+ FRRMgmtFrameworkConfig bool `yaml:"frr_mgmt_framework_config"`
66+ Hostname string `yaml:"hostname"`
67+ Interconnects map [string ]Interconnect `yaml:"interconnects"`
68+ LLDPHelloTime int `yaml:"lldp_hello_time"`
69+ LoopbackAddress string `yaml:"loopback_address"`
70+ MCLAG * MCLAG `yaml:"mclag"`
71+ MgmtIfGateway string `yaml:"mgmtif_gateway"`
72+ MgmtIfIP string `yaml:"mgmtif_ip"`
73+ MgmtVRF bool `yaml:"mgmt_vrf"`
74+ Nameservers []string `yaml:"nameservers"`
75+ NTPServers []string `yaml:"ntpservers"`
76+ PortChannels []PortChannel `yaml:"portchannels"`
77+ PortChannelsDefaultMTU int `yaml:"portchannels_default_mtu"`
78+ Ports []Port `yaml:"ports"`
79+ PortsDefaultFEC FECMode `yaml:"ports_default_fec"`
80+ PortsDefaultMTU int `yaml:"ports_default_mtu"`
81+ SAG `yaml:"sag"`
82+ SSHSourceranges []string `yaml:"ssh_sourceranges"`
83+ VLANMembers bool `yaml:"vlan_members"`
84+ VLANs []VLAN `yaml:"vlans"`
85+ VTEPs []VTEP `yaml:"vteps"`
8086}
8187
8288type VLAN struct {
83- DHCPServers []string `yaml:"dhcp_servers,omitempty "`
84- ID string `yaml:"id,omitempty "`
85- IP string `yaml:"ip,omitempty "`
86- SAG bool `yaml:"sag,omitempty "`
87- TaggedPorts []string `yaml:"tagged_ports,omitempty "`
88- UntaggedPorts []string `yaml:"untagged_ports,omitempty "`
89- VRF string `yaml:"vrf,omitempty "`
89+ DHCPServers []string `yaml:"dhcp_servers"`
90+ ID string `yaml:"id"`
91+ IP string `yaml:"ip"`
92+ SAG bool `yaml:"sag"`
93+ TaggedPorts []string `yaml:"tagged_ports"`
94+ UntaggedPorts []string `yaml:"untagged_ports"`
95+ VRF string `yaml:"vrf"`
9096}
9197
9298type VTEP struct {
93- Comment string `yaml:"comment,omitempty "`
94- VNI string `yaml:"vni,omitempty "`
95- VLAN string `yaml:"vlan,omitempty "`
99+ Comment string `yaml:"comment"`
100+ VNI string `yaml:"vni"`
101+ VLAN string `yaml:"vlan"`
96102}
97103
98104func UnmarshalValues (in []byte ) (* Values , error ) {
0 commit comments