VOL-2448: Nokia onu cannot create() already created gem
Delete gem IW and TP before creating if they exist.
Otherwise disable/enable and remove/add subscriber fails
Or reboot fails. Workaround is to run remove/add subscriber
one more time.
Also start 2.3.0-dev
Change-Id: I4b512ee85490365e2e6bb523dec71d6c6e3bfa52
diff --git a/VERSION b/VERSION
index 5bc1cc4..d64a644 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.7
+2.3.0-dev
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 6af1a73..cca0b06 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
@@ -21,7 +21,8 @@
Ieee8021pMapperServiceProfileFrame, MacBridgePortConfigurationDataFrame
from pyvoltha.adapters.extensions.omci.tasks.task import Task
from pyvoltha.adapters.extensions.omci.omci_defs import EntityOperations, ReasonCodes
-from pyvoltha.adapters.extensions.omci.omci_entities import OntG, Tcont, PriorityQueueG, Ieee8021pMapperServiceProfile
+from pyvoltha.adapters.extensions.omci.omci_entities import OntG, Tcont, PriorityQueueG, Ieee8021pMapperServiceProfile, \
+ GemPortNetworkCtp
OP = EntityOperations
RC = ReasonCodes
@@ -222,9 +223,7 @@
results = yield tcont.add_to_hardware(omci_cc, free_entity_id)
self.check_status_and_state(results, 'new-tcont-added')
else:
- # likely already added given entity_id is set, but no harm in doing it again
- results = yield tcont.add_to_hardware(omci_cc, tcont.entity_id)
- self.check_status_and_state(results, 'existing-tcont-added')
+ self.log.debug('tcont-already-assigned', tcont_entity_id=tcont.entity_id, alloc_id=tcont.alloc_id)
################################################################################
# GEMS (GemPortNetworkCtp and GemInterworkingTp)
@@ -333,7 +332,14 @@
assert ul_prior_q_entity_id is not None and \
dl_prior_q_entity_id is not None
- # TODO: Need to restore on failure. Need to check status/results
+ existing = self._onu_device.query_mib(GemPortNetworkCtp.class_id, gem_port.entity_id)
+ self.log.debug('looking-for-gemport-before-create', existing=existing,
+ class_id=GemPortNetworkCtp.class_id,
+ entity_id=gem_port.entity_id)
+ if existing:
+ results = yield gem_port.remove_from_hardware(omci_cc)
+ self.check_status_and_state(results, 'remove-existing-gem-port')
+
results = yield gem_port.add_to_hardware(omci_cc,
tcont.entity_id,
self._ieee_mapper_service_profile_entity_id +