VOL-1710 Generate OLT connectivity related alarms in golang OpenOLT adapter
Change-Id: Icd7758385ad7b6b358bf54edc33f71e0469a8f8e
diff --git a/adaptercore/device_handler.go b/adaptercore/device_handler.go
index 96e6189..a2dec0a 100644
--- a/adaptercore/device_handler.go
+++ b/adaptercore/device_handler.go
@@ -292,11 +292,14 @@
}
func (dh *DeviceHandler) handleOltIndication(oltIndication *oop.OltIndication) {
+ raisedTs := time.Now().UnixNano()
if oltIndication.OperState == "up" {
dh.transitionMap.Handle(DeviceUpInd)
} else if oltIndication.OperState == "down" {
dh.transitionMap.Handle(DeviceDownInd)
}
+ // Send or clear Alarm
+ dh.eventMgr.oltUpDownIndication(oltIndication, dh.deviceID, raisedTs)
}
func (dh *DeviceHandler) handleIndication(indication *oop.Indication) {