[VOL-2529]:changes to handle UNI port state change as ONUEthernetUNIEvent

Change-Id: I73b06f2bfeab8dfb352a0383eb7b14c15fe1d805
diff --git a/VERSION b/VERSION
index 9fa5f12..f470771 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.10
+2.3.11
diff --git a/pyvoltha/adapters/extensions/events/device_events/onu/onu_ethernet_uni_event.py b/pyvoltha/adapters/extensions/events/device_events/onu/onu_ethernet_uni_event.py
new file mode 100644
index 0000000..9a8cc0f
--- /dev/null
+++ b/pyvoltha/adapters/extensions/events/device_events/onu/onu_ethernet_uni_event.py
@@ -0,0 +1,33 @@
+# Copyright 2017-present Adtran, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from __future__ import absolute_import
+from voltha_protos.events_pb2 import EventType, EventCategory, EventSubCategory
+from pyvoltha.adapters.extensions.events.adapter_events import DeviceEventBase
+
+
+class ONUEthernetUNIEvent(DeviceEventBase):
+    def __init__(self, event_mgr, onu_id, intf_id, serial_number, raised_ts):
+        super(ONUEthernetUNIEvent, self).__init__(event_mgr, raised_ts, object_type='Ethernet UNI',
+                                          event='ONU_Ethernet_UNI',
+                                          category=EventCategory.EQUIPMENT,
+                                          sub_category=EventSubCategory.ONU)
+        self._onu_id = onu_id
+        self._intf_id = intf_id
+        self._serial_number = serial_number
+
+    def get_context_data(self):
+        return {'onu-id': self._onu_id,
+                'onu-intf-id': self._intf_id,
+                'onu-serial-number': self._serial_number}
+
diff --git a/pyvoltha/adapters/extensions/omci/onu_device_entry.py b/pyvoltha/adapters/extensions/omci/onu_device_entry.py
index 10d8aac..2a0e51a 100644
--- a/pyvoltha/adapters/extensions/omci/onu_device_entry.py
+++ b/pyvoltha/adapters/extensions/omci/onu_device_entry.py
@@ -29,7 +29,7 @@
 from pyvoltha.adapters.extensions.omci.omci_me import OntGFrame
 from pyvoltha.adapters.extensions.omci.state_machines.image_agent import ImageAgent
 from pyvoltha.adapters.extensions.events.device_events.onu.onu_los_event import OnuLosEvent
-
+from pyvoltha.adapters.extensions.events.device_events.onu.onu_ethernet_uni_event import ONUEthernetUNIEvent
 from twisted.internet import reactor, defer
 from enum import IntEnum
 import six
@@ -645,7 +645,7 @@
         
     def raise_onu_event(self, event, active):
         # Notify any event listeners
-        if isinstance(event, OnuLosEvent):
+        if isinstance(event, ONUEthernetUNIEvent):
             topic = OnuDeviceEntry.event_bus_topic(self.device_id,
                                                    OnuDeviceEvents.PortEvent)
             context = event.get_context_data()
diff --git a/pyvoltha/adapters/extensions/omci/state_machines/alarm_sync.py b/pyvoltha/adapters/extensions/omci/state_machines/alarm_sync.py
index 6efa260..dadad13 100644
--- a/pyvoltha/adapters/extensions/omci/state_machines/alarm_sync.py
+++ b/pyvoltha/adapters/extensions/omci/state_machines/alarm_sync.py
@@ -599,7 +599,7 @@
         from pyvoltha.adapters.extensions.events.device_events.onu.onu_high_rx_optical_power_event import OnuHighRxOpticalEvent
         from pyvoltha.adapters.extensions.events.device_events.onu.onu_low_tx_optical_power_event import OnuLowTxOpticalEvent
         from pyvoltha.adapters.extensions.events.device_events.onu.onu_high_tx_optical_power_event import OnuHighTxOpticalEvent
-
+        from pyvoltha.adapters.extensions.events.device_events.onu.onu_ethernet_uni_event import ONUEthernetUNIEvent
         mgr = self._alarm_manager
         if class_id in (CircuitPack.class_id, PptpEthernetUni.class_id):
             intf_id = self.select_uni_port(class_id, entity_id)
@@ -618,7 +618,7 @@
             (CircuitPack.class_id, 4): OnuTempYellowEvent,
             (CircuitPack.class_id, 5): OnuTempRedEvent,
 
-            (PptpEthernetUni.class_id, 0): OnuLosEvent,
+            (PptpEthernetUni.class_id, 0): ONUEthernetUNIEvent,
 
             (OntG.class_id, 0): OnuEquipmentEvent,
             (OntG.class_id, 6): OnuSelfTestFailureEvent,