[VOL-5206] ONU Dying gasp event should contains RAISE or CLEAR in its device event name
Signed-off-by: Marcos Aurelio Carrero (Furukawa) <mcarrero@furukawalatam.com>
Change-Id: Ia981c59db5654b80452298c614eb8d815180877e
diff --git a/VERSION b/VERSION
index f12d1f2..615a86c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.4.8
+4.4.9
diff --git a/internal/pkg/core/openolt_eventmgr.go b/internal/pkg/core/openolt_eventmgr.go
index 3740cf4..257aaa1 100644
--- a/internal/pkg/core/openolt_eventmgr.go
+++ b/internal/pkg/core/openolt_eventmgr.go
@@ -384,7 +384,13 @@
/* Populating device event body */
de.Context = context
de.ResourceId = deviceID
- de.DeviceEventName = fmt.Sprintf("%s_%s", onuDyingGaspEvent, "EVENT")
+
+ if dgi.Status == statusCheckOn {
+ de.DeviceEventName = fmt.Sprintf("%s_%s", onuDyingGaspEvent, "RAISE_EVENT")
+ } else {
+ de.DeviceEventName = fmt.Sprintf("%s_%s", onuDyingGaspEvent, "CLEAR_EVENT")
+ }
+
/* Send event to KAFKA */
if err := em.eventProxy.SendDeviceEventWithKey(ctx, &de, voltha.EventCategory_COMMUNICATION, voltha.EventSubCategory_ONU, raisedTs, onuDeviceID); err != nil {
return err