Correct EPON link support
Change-Id: I1284a903aa0d7677e55e29a6c39b13aac082c3db
diff --git a/voltha/adapters/tibit_olt/tibit_olt.py b/voltha/adapters/tibit_olt/tibit_olt.py
index 3d9e264..7e26d2c 100644
--- a/voltha/adapters/tibit_olt/tibit_olt.py
+++ b/voltha/adapters/tibit_olt/tibit_olt.py
@@ -52,7 +52,7 @@
handle_get_value, get_value_from_msg, check_set_resp, check_resp
from voltha.extensions.eoam.EOAM_TLV import DOLTObject, \
- NetworkToNetworkPortObject, OLTUnicastLogicalLink, \
+ NetworkToNetworkPortObject, OLTUnicastLogicalLink, OLTEPONUnicastLogicalLink, \
PortIngressRuleClauseMatchLength01, AddStaticMacAddress, \
PortIngressRuleClauseMatchLength02, PortIngressRuleResultForward, \
PortIngressRuleResultSet, PortIngressRuleResultInsert, \
@@ -402,7 +402,7 @@
resultOltQueue = "PortIngressRuleResultOLTQueue(unicastvssn=vssn, unicastlink=link)"
else: # EPON
vssn = int(onu_mac_string[0:8].rjust(8,"0"), 16)
- link = int((onu_mac_string[8:10]+"02").ljust(8,"0"), 16)
+ link = int((onu_mac_string[8:12]).ljust(8,"0"), 16)
resultOltQueue = "PortIngressRuleResultOLTEPONQueue(unicastvssn=vssn, unicastlink=link)"
packet_out_rule = (
@@ -439,7 +439,6 @@
self.vlan_to_device_ids[vlan_id] = (device.id, device.parent_id, linkAddr)
-
self.adapter_agent.child_device_detected(
parent_device_id=device.id,
parent_port_no=1,
@@ -642,15 +641,18 @@
if self.mode.upper()[0] == "G": # GPON
vssn = "TBIT"
link = int(onu_mac_address[4:12], 16)
+ logical_link = "OLTUnicastLogicalLink(unicastvssn=vssn, unicastlink=link)"
else: # EPON
vssn = int(onu_mac_address[0:8].rjust(8,"0"), 16)
- link = int((onu_mac_address[8:10]+"02").ljust(8,"0"), 16)
+ link = int((onu_mac_address[8:12]).ljust(8,"0"), 16)
+ logical_link = "OLTEPONUnicastLogicalLink(unicastvssn=vssn, unicastlink=link)"
+
frame = (
Ether(dst=olt_mac_address) /
Dot1Q(vlan=TIBIT_MGMT_VLAN, prio=TIBIT_MGMT_PRIORITY) /
EOAMPayload() / EOAM_VendSpecificMsg(oui=Tibit_OUI) /
EOAM_TibitMsg(dpoe_opcode=Dpoe_Opcodes["Get Request"],
- body=OLTUnicastLogicalLink(unicastvssn=vssn, unicastlink=link)/
+ body=eval(logical_link)/
#RxFramesGreen()/
#TxFramesGreen()/
RxFrame_64()/
@@ -866,7 +868,7 @@
resultOltQueue = "PortIngressRuleResultOLTQueue(unicastvssn=vssn, unicastlink=link)"
else: # EPON
vssn = int(mac_address[0:8].rjust(8,"0"), 16)
- link = int((mac_address[8:10]+"02").ljust(8,"0"), 16)
+ link = int((mac_address[8:12]).ljust(8,"0"), 16)
resultOltQueue = "PortIngressRuleResultOLTEPONQueue(unicastvssn=vssn, unicastlink=link)"
dn_req /= eval(resultOltQueue)
@@ -988,7 +990,7 @@
logical_link = "OLTUnicastLogicalLink(unicastvssn=vssn, unicastlink=link)"
else: # EPON
vssn = int(mac_address[0:8].rjust(8,"0"), 16)
- link = int((mac_address[8:10]+"02").ljust(8,"0"), 16)
+ link = int((mac_address[8:12]).ljust(8,"0"), 16)
logical_link = "OLTEPONUnicastLogicalLink(unicastvssn=vssn, unicastlink=link)"
up_req_link /= eval(logical_link)