VOL-1357 BBSim - OMCI status management
AddFlow() triggers the update of ONU status into ONU_OMCIACTIVE.
The ONU status update is notified to the mediator, and then, it activates the tester.
Change-Id: I1a077026b872868a74a4b5d9849b65cf52baeaa4
diff --git a/core/mediator.go b/core/mediator.go
index b973493..89715c6 100644
--- a/core/mediator.go
+++ b/core/mediator.go
@@ -170,7 +170,7 @@
func transitOlt (s *Server, current device.DeviceState, next device.DeviceState, tester *Tester, o *option) error {
if current == device.OLT_PREACTIVE && next == device.OLT_ACTIVE {
- tester.Start(s)
+
} else if current == device.OLT_ACTIVE && next == device.OLT_PREACTIVE{
tester.Stop(s)
}
@@ -178,5 +178,12 @@
}
func transitOnu (s *Server, key device.Devkey, current device.DeviceState, next device.DeviceState, tester *Tester, o *option) error {
+ if current == device.ONU_ACTIVE && next == device.ONU_OMCIACTIVE {
+ if s.isAllOnuOmciActive(){ //TODO: This should be per-ONU control, not by cheking All ONU's status
+ tester.Start(s)
+ }
+ } else if (current == device.ONU_OMCIACTIVE || current == device.ONU_ACTIVE) &&
+ next == device.ONU_INACTIVE {
+ }
return nil
}
\ No newline at end of file