[VOL-4518] - Stop using the direction of flow when storing OLT flows since the flowID's are unique
Change-Id: Iea66fc148c6ad299376eaf5ac0be049cd53d4eb1
diff --git a/VERSION b/VERSION
index 5ad2491..587c5f0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.10.2
+1.10.3
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 8520bf2..ef95ad6 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -1034,7 +1034,7 @@
flowKey := FlowKey{}
if !o.enablePerf {
- flowKey = FlowKey{ID: flow.FlowId, Direction: flow.FlowType}
+ flowKey = FlowKey{ID: flow.FlowId}
olt.Flows.Store(flowKey, *flow)
}
@@ -1151,11 +1151,7 @@
olt.freeAllocId(flow)
if !o.enablePerf { // remove only if flow were stored
- flowKey := FlowKey{
- ID: flow.FlowId,
- Direction: flow.FlowType,
- }
-
+ flowKey := FlowKey{ID: flow.FlowId}
// Check if flow exists
storedFlowIntf, ok := o.Flows.Load(flowKey)
if !ok {
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index cfc7099..845067a 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -94,8 +94,7 @@
)
type FlowKey struct {
- ID uint64
- Direction string
+ ID uint64
}
type Onu struct {
diff --git a/internal/bbsim/devices/onu_state_machine_test.go b/internal/bbsim/devices/onu_state_machine_test.go
index c1f6d8e..1c8470c 100644
--- a/internal/bbsim/devices/onu_state_machine_test.go
+++ b/internal/bbsim/devices/onu_state_machine_test.go
@@ -41,8 +41,8 @@
assert.Equal(t, onu.InternalState.Current(), OnuStateEnabled)
onu.Flows = []FlowKey{
- {ID: 1, Direction: "upstream"},
- {ID: 2, Direction: "downstream"},
+ {ID: 1},
+ {ID: 2},
}
key := omcilib.OnuAlarmInfoMapKey{
MeInstance: 257,