VOL-2373: fix eid for mac bridge and reset alloc id in using spec value

Change-Id: I6efa6380865bff9e6c8777cd88df69c2c01faad4
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
index e8b0841..75f71d5 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
@@ -304,7 +304,7 @@
                 association_type = 2
 
             msg = MacBridgePortConfigurationDataFrame(
-                uni_port.entity_id,            # Entity ID - This is read-only/set-by-create !!!
+                self._mac_bridge_port_ani_entity_id + uni_port.entity_id,  # Entity ID
                 bridge_id_pointer=self._mac_bridge_service_profile_entity_id + uni_port.mac_bridge_port_num,  # Bridge Entity ID
                 port_num=uni_port.mac_bridge_port_num,   # Port ID
                 tp_type=tp_type,                         # PPTP Ethernet or VEIP UNI
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
index a5619c7..b75d791 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
@@ -255,21 +255,7 @@
             ################################################################################
             # TODO: magic. make a static variable for tp_type
             msg = MacBridgePortConfigurationDataFrame(
-                self._mac_bridge_port_ani_entity_id + self._uni_port.mac_bridge_port_num + self._tp_table_id,
-                bridge_id_pointer=(
-                        self._mac_bridge_service_profile_entity_id +
-                        self._uni_port.mac_bridge_port_num +
-                        self._tp_table_id
-                ),
-                # Bridge Entity ID
-                port_num=0xff,  # Port ID - unique number within the bridge
-                tp_type=3,  # TP Type (IEEE 802.1p mapper service)
-                tp_pointer=(
-                        self._ieee_mapper_service_profile_entity_id +
-                        self._uni_port.mac_bridge_port_num +
-                        self._tp_table_id
-                )
-                # TP ID, 8021p mapper ID
+                self._mac_bridge_port_ani_entity_id + self._uni_port.entity_id + self._tp_table_id,  # Entity ID
             )
             frame = msg.delete()
             self.log.debug('openomci-msg', omci_msg=msg)
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
index 6a1bacb..6af1a73 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
@@ -487,7 +487,7 @@
 
             # TODO: magic. make a static variable for tp_type
             msg = MacBridgePortConfigurationDataFrame(
-                self._mac_bridge_port_ani_entity_id + self._uni_port.mac_bridge_port_num + self._tp_table_id,
+                self._mac_bridge_port_ani_entity_id + self._uni_port.entity_id + self._tp_table_id,  # Entity ID
                 bridge_id_pointer=(
                         self._mac_bridge_service_profile_entity_id +
                         self._uni_port.mac_bridge_port_num),
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
index 2589247..3e08584 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
@@ -114,7 +114,8 @@
 
             # Delete bridge ani side vlan filter
             # TODO: check if its in our local mib first before blindly deleting
-            msg = VlanTaggingFilterDataFrame(self._mac_bridge_port_ani_entity_id + self._uni_port.mac_bridge_port_num)
+            eid = self._mac_bridge_port_ani_entity_id + self._uni_port.entity_id  # Entity ID
+            msg = VlanTaggingFilterDataFrame(eid)
             frame = msg.delete()
             self.log.debug('openomci-msg', omci_msg=msg)
             self.strobe_watchdog()
@@ -129,7 +130,7 @@
                 forward_operation = 0x00  # no investigation, ONU transparent
 
             msg = VlanTaggingFilterDataFrame(
-                self._mac_bridge_port_ani_entity_id + self._uni_port.mac_bridge_port_num,  # Entity ID
+                eid,
                 vlan_tcis=[self._set_vlan_id],  # VLAN IDs
                 forward_operation=forward_operation
             )
diff --git a/python/adapters/brcm_openomci_onu/onu_tcont.py b/python/adapters/brcm_openomci_onu/onu_tcont.py
index 80e98a0..647746b 100644
--- a/python/adapters/brcm_openomci_onu/onu_tcont.py
+++ b/python/adapters/brcm_openomci_onu/onu_tcont.py
@@ -109,7 +109,7 @@
         # TODO: magic number, create a named variable
 
         try:
-            msg = TcontFrame(self.entity_id, 0xFFFF)
+            msg = TcontFrame(self.entity_id, 0xFF)
             frame = msg.set()
             self.log.debug('openomci-msg', omci_msg=msg)
             results = yield omci.send(frame)