fix: addrtype issue and SlotsOccupied value type issue

This commit is contained in:
simon
2025-08-20 15:22:22 +08:00
parent 5dfa6fa04d
commit 7b6ad5ccab
2 changed files with 2 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ func SyncNbiCM() error {
addrPool := AddrPool{ addrPool := AddrPool{
Id: fmt.Sprintf("%s-%s-AddrPool", ne.NeType, ne.NeId), Id: fmt.Sprintf("%s-%s-AddrPool", ne.NeType, ne.NeId),
UserLabel: ne.NeName + "-AddrPool", UserLabel: ne.NeName + "-AddrPool",
AddrType: "UE", AddrType: "Static",
IpVersion: "IPv4", IpVersion: "IPv4",
AddrSegList: `{{StartIp:10.60.1.100,SegLen:100},{StartIp:10.61.1.100,SegLen:100}}`, AddrSegList: `{{StartIp:10.60.1.100,SegLen:100},{StartIp:10.61.1.100,SegLen:100}}`,
} }

View File

@@ -207,7 +207,7 @@ func SyncNbiCM() error {
ManufacturerData: "{}", ManufacturerData: "{}",
PortsInformation: `{{"port-1","Ethernet 10Gbs",Used},{"port-2","Ethernet 10Gbps",Used}, {"port-3","optical 50Gbps",Used}, {"port-4","optical 50Gbps",Unused}}`, PortsInformation: `{{"port-1","Ethernet 10Gbs",Used},{"port-2","Ethernet 10Gbps",Used}, {"port-3","optical 50Gbps",Used}, {"port-4","optical 50Gbps",Unused}}`,
PackPosition: "2-2", PackPosition: "2-2",
SlotsOccupied: "2", SlotsOccupied: `{"3","4"}`,
} }
packJSON, err := json.Marshal(inventoryUnitPack) packJSON, err := json.Marshal(inventoryUnitPack)
if err != nil { if err != nil {