Revert assert removed in previous commit
The previous commit removed a call to resource_mgr
that would assert if (uni_id != 0).
This commit adds that assert back (but as a local assert, not a
call to resource_mgr).
At this time multiple unis per onu is not supported.
This assert should be removed once multi unis are supported.
Change-Id: Id5b1f04cc7469a9979fa3fb73ba767c03a3fc5b2
diff --git a/voltha/adapters/openolt/openolt_platform.py b/voltha/adapters/openolt/openolt_platform.py
index 0607d51..ec37a0d 100644
--- a/voltha/adapters/openolt/openolt_platform.py
+++ b/voltha/adapters/openolt/openolt_platform.py
@@ -14,7 +14,6 @@
# limitations under the License.
#
-import structlog
from voltha.protos.device_pb2 import Port
import voltha.protos.device_pb2 as dev_pb2
@@ -87,6 +86,8 @@
assert intf_id < OpenOltPlatform.MAX_PONS_PER_OLT
assert onu_id < OpenOltPlatform.MAX_ONUS_PER_PON
assert uni_id < OpenOltPlatform.MAX_UNIS_PER_ONU
+ # Multiple unis not supported. Physical ONU equates to single UNI.
+ assert uni_id == 0
return intf_id << 11 | onu_id << 4 | uni_id
def uni_id_from_port_num(self, port_num):