@@ -24,7 +24,7 @@ type ConfigDB struct {
2424 MCLAGDomains map [string ]MCLAGDomain `json:"MCLAG_DOMAIN,omitempty"`
2525 MCLAGInterfaces map [string ]MCLAGInterface `json:"MCLAG_INTERFACE,omitempty"`
2626 MCLAGUniqueIPs map [string ]MCLAGUniqueIP `json:"MCLAG_UNIQUE_IP,omitempty"`
27- MgmtInterface map [string ]MgmtInterface `json:"MGMT_INTERFACE,omitempty"`
27+ MgmtInterfaces map [string ]MgmtInterface `json:"MGMT_INTERFACE,omitempty"`
2828 MgmtPorts map [string ]MgmtPort `json:"MGMT_PORT,omitempty"`
2929 MgmtVRFConfig MgmtVRFConfig `json:"MGMT_VRF_CONFIG"`
3030 NTP NTP `json:"NTP"`
@@ -73,7 +73,7 @@ func GenerateConfigDB(input *values.Values, platform *p.Platform, currentDeviceM
7373 MCLAGDomains : getMCLAGDomains (input .MCLAG ),
7474 MCLAGInterfaces : getMCLAGInterfaces (input .MCLAG ),
7575 MCLAGUniqueIPs : getMCLAGUniqueIPs (input .MCLAG ),
76- MgmtInterface : getMgmtInterface (input .MgmtInterface ),
76+ MgmtInterfaces : getMgmtInterfaces (input .MgmtInterface ),
7777 MgmtPorts : map [string ]MgmtPort {
7878 "eth0" : {
7979 AdminStatus : AdminStatusUp ,
@@ -308,18 +308,16 @@ func getMCLAGUniqueIPs(mclag values.MCLAG) map[string]MCLAGUniqueIP {
308308 }
309309}
310310
311- func getMgmtInterface (mgmtif values.MgmtInterface ) map [string ]MgmtInterface {
311+ func getMgmtInterfaces (mgmtif values.MgmtInterface ) map [string ]MgmtInterface {
312312 if mgmtif .IP == "" {
313313 return nil
314314 }
315-
316315 mgmtInterfaces := make (map [string ]MgmtInterface )
317316
318317 eth0 := MgmtInterface {}
319318 if mgmtif .GatewayAddress != "" {
320319 eth0 .GWAddr = mgmtif .GatewayAddress
321320 }
322-
323321 mgmtInterfaces ["eth0|" + mgmtif .IP ] = eth0
324322
325323 return mgmtInterfaces
0 commit comments