VOL-1489: Uni in tunnel id. Push onu/uni flows only if onu id exists

Push onu flows only if there is an onu id. Otherwise BAL
does not know what to do and errors on parameters. Future
refactor required to push NNI only flows outside of
divide_and_add_flow with its onu/uni/intf id requirements.

Also make use of uni port id in flow tunnel id provided
by decomposer to find in or out port. This allows
resource mgr and ultimately BAL to assign resources
as needed by UNI id.

Change-Id: I8cf86ba0fc36168cd66557098ddd9cc0c3b93c20
diff --git a/python/adapters/openolt/openolt_platform.py b/python/adapters/openolt/openolt_platform.py
index 9f63af0..d39afc7 100644
--- a/python/adapters/openolt/openolt_platform.py
+++ b/python/adapters/openolt/openolt_platform.py
@@ -151,7 +151,7 @@
 
     def is_upstream(self, out_port):
 
-        if out_port in [0xfffd, 0xfffffffd]:
+        if out_port in [0xfffd, 0x7ffffffd, 0xfffffffd]:
             # To Controller
             return True
         if (out_port & (0x1 << 16)) == (0x1 << 16):
@@ -159,6 +159,13 @@
             return True
 
         return False
+
+    def is_controller(self, out_port):
+        if out_port in [0xfffd, 0x7ffffffd, 0xfffffffd]:
+            return True
+        else:
+            return False
+
     #
     #def max_onus_per_pon(self):
     #    return OpenOltPlatform.MAX_ONUS_PER_PON