Support for Voltha 2.x with only 1 UNI per ONU

With this patch only one UNI per ONU is supported.
The UNI has to be the one with portname (in ONOS) that ends with '-1'.
All the other ports with related events coming from ONOS on the Kafka
topic onu.events are not considered.

Change-Id: I8c250a9a30e53cfbdf41c9810917c92dd95bcbad
diff --git a/xos/synchronizer/event_steps/onu_event.py b/xos/synchronizer/event_steps/onu_event.py
index 9f342df..16d0c0c 100755
--- a/xos/synchronizer/event_steps/onu_event.py
+++ b/xos/synchronizer/event_steps/onu_event.py
@@ -31,6 +31,11 @@
     def process_event(self, event):
         value = json.loads(event.value)
         self.log.info("onu.events: received event", value=value)
+        # This is needed to be compatible with both Voltha 1.7 and Voltha 2.x
+        # It supposes to have only 1 subscriber per ONU and the subscriber is connected to the first port
+        if "-" in value["serialNumber"] and not value["serialNumber"].endswith("-1"):
+            self.log.info("Skip event, only consider [serialNumber]-1 events")
+            return
 
         dt_si = DtHelpers.find_or_create_dt_si(self.model_accessor, self.log, value)
         if value["status"] == "activated":