[VOL-5374] Update go version to 1.23
- Upgraded Go version for compatibility with recent toolchain
- Synced with latest dependency requirements
Change-Id: Ib526d29ec9e5d5e08e51354b741541038dcedb35
Signed-off-by: Akash Kankanala <akash.kankanala@radisys.com>
diff --git a/pkg/mocks/mockCoreClient.go b/pkg/mocks/mockCoreClient.go
index bbed76b..dca0e3b 100644
--- a/pkg/mocks/mockCoreClient.go
+++ b/pkg/mocks/mockCoreClient.go
@@ -179,7 +179,7 @@
if onuDevice != nil {
return onuDevice, nil
}
- //return &voltha.Device{}, nil
+ // return &voltha.Device{}, nil
return nil, errors.New("device detection failed")
}
diff --git a/pkg/mocks/mockKVClient.go b/pkg/mocks/mockKVClient.go
index b77498c..39aa35d 100644
--- a/pkg/mocks/mockKVClient.go
+++ b/pkg/mocks/mockKVClient.go
@@ -45,11 +45,11 @@
GemportIDs = "gemport_ids"
// AllocIDs to extract alloc_ids
AllocIDs = "alloc_ids"
- //FlowGroup flow_groups/<flow_group_id>
+ // FlowGroup flow_groups/<flow_group_id>
FlowGroup = "flow_groups"
- //FlowGroupCached flow_groups_cached/<flow_group_id>
+ // FlowGroupCached flow_groups_cached/<flow_group_id>
FlowGroupCached = "flow_groups_cached"
- //OnuPacketIn to extract gem port from packet-in
+ // OnuPacketIn to extract gem port from packet-in
OnuPacketIn = "onu_packetin"
// OnuGemInfoPath has path on the kvstore to store OnuGemInfo info per PON interface
OnuGemInfoPath = "onu_gem_info"
@@ -61,17 +61,17 @@
// OnuGemInfo holds onu information along with gem port list and uni port list
type OnuGemInfo struct {
- OnuID uint32
SerialNumber string
- IntfID uint32
GemPorts []uint32
UniPorts []uint32
+ OnuID uint32
+ IntfID uint32
}
// GroupInfo holds group information
type GroupInfo struct {
- GroupID uint32
OutPorts []uint32
+ GroupID uint32
}
// List mock function implementation for KVClient
@@ -115,7 +115,6 @@
}
if strings.Contains(key, "meter_id/{1,1,1}/{downstream}") {
-
band1 := &ofp.OfpMeterBandHeader{Type: ofp.OfpMeterBandType_OFPMBT_DROP, Rate: 1000, BurstSize: 5000}
band2 := &ofp.OfpMeterBandHeader{Type: ofp.OfpMeterBandType_OFPMBT_DROP, Rate: 2000, BurstSize: 5000}
bands := []*ofp.OfpMeterBandHeader{band1, band2}
@@ -180,16 +179,16 @@
return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
}
- //Interface, GEM port path
+ // Interface, GEM port path
if strings.Contains(key, "0,255") {
- //return onuID, uniID associated with the given interface and GEM port
+ // return onuID, uniID associated with the given interface and GEM port
data := []uint32{1, 0}
str, _ := json.Marshal(data)
return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
}
- //Interface, GEM port path
+ // Interface, GEM port path
if strings.Contains(key, "0,257") {
- //return onuID, uniID associated with the given interface and GEM port
+ // return onuID, uniID associated with the given interface and GEM port
data := []uint32{1, 0}
str, _ := json.Marshal(data)
return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
@@ -248,7 +247,7 @@
// getPacketInGemPort returns the GEM port associated with the given key
func getPacketInGemPort(key string) (*kvstore.KVPair, error) {
- //parse interface, onu, uni, vlan, priority values
+ // parse interface, onu, uni, vlan, priority values
arr := getParamsFromPacketInKey(key)
if len(arr) < 5 {
@@ -271,7 +270,7 @@
// getParamsFromPacketInKey parse packetIn key that is in the format of "onu_packetin/{1,1,1,1,2}"
func getParamsFromPacketInKey(key string) []string {
- //return intfID, onuID, uniID, vlanID, priority
+ // return intfID, onuID, uniID, vlanID, priority
firstIndex := strings.Index(key, "{")
lastIndex := strings.Index(key, "}")
if firstIndex == -1 && lastIndex == -1 {
diff --git a/pkg/mocks/mockOpenOltClient.go b/pkg/mocks/mockOpenOltClient.go
old mode 100755
new mode 100644
index eeae6c3..5c6ed55
--- a/pkg/mocks/mockOpenOltClient.go
+++ b/pkg/mocks/mockOpenOltClient.go
@@ -38,7 +38,7 @@
// DisableOlt mocks the DisableOlt function of Openoltclient.
func (ooc *MockOpenoltClient) DisableOlt(ctx context.Context, in *openolt.Empty, opts ...grpc.CallOption) (*openolt.Empty, error) {
- //return &openolt.Empty{}, nil
+ // return &openolt.Empty{}, nil
if ooc.counter == 0 {
ooc.counter++
return &openolt.Empty{}, nil
@@ -206,12 +206,12 @@
func (mock *mockOpenoltEnableIndicationClient) Recv() (*openolt.Indication, error) {
if mock.count == 0 {
- mock.count = mock.count + 1
+ mock.count++
indi := &openolt.Indication{Data: &openolt.Indication_OltInd{OltInd: &openolt.OltIndication{OperState: "Down"}}}
return indi, nil
}
if mock.count == 1 {
- mock.count = mock.count + 1
+ mock.count++
return nil, errors.New("error, while processing indication")
}
diff --git a/pkg/mocks/mockTechprofile.go b/pkg/mocks/mockTechprofile.go
index d0b9708..3972145 100644
--- a/pkg/mocks/mockTechprofile.go
+++ b/pkg/mocks/mockTechprofile.go
@@ -81,12 +81,10 @@
UpstreamGemPortAttributeList: usGemPortAttributeList,
DownstreamGemPortAttributeList: dsGemPortAttributeList,
}, nil
-
}
// CreateTechProfileInstance to mock techprofile CreateTechProfileInstance method
func (m MockTechProfile) CreateTechProfileInstance(ctx context.Context, techProfiletblID uint32, uniPortName string, intfID uint32) (interface{}, error) {
-
var usGemPortAttributeList []*tp_pb.GemPortAttributes
var dsGemPortAttributeList []*tp_pb.GemPortAttributes
if techProfiletblID == 64 {
@@ -151,13 +149,11 @@
// GetprotoBufParamValue to mock techprofile GetprotoBufParamValue method
func (m MockTechProfile) GetprotoBufParamValue(ctx context.Context, paramType string, paramKey string) int32 {
return 0
-
}
// GetUsScheduler to mock techprofile GetUsScheduler method
func (m MockTechProfile) GetUsScheduler(tpInstance *tp_pb.TechProfileInstance) *tp_pb.SchedulerConfig {
return &tp_pb.SchedulerConfig{}
-
}
// GetDsScheduler to mock techprofile GetDsScheduler method
@@ -169,7 +165,6 @@
func (m MockTechProfile) GetTrafficScheduler(tpInstance *tp_pb.TechProfileInstance, SchedCfg *tp_pb.SchedulerConfig,
ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler {
return &tp_pb.TrafficScheduler{}
-
}
// GetTrafficQueues to mock techprofile GetTrafficQueues method