Adding delay in OLT deletion
Change-Id: I461597855424c17d4635f10da82abe68a4d9009f
diff --git a/xos/synchronizer/steps/sync_olt_device.py b/xos/synchronizer/steps/sync_olt_device.py
index 81a9288..241e507 100644
--- a/xos/synchronizer/steps/sync_olt_device.py
+++ b/xos/synchronizer/steps/sync_olt_device.py
@@ -154,6 +154,12 @@
log.error("Failed to disable OLT device in VOLTHA: %s - %s" % (model.name, model.device_id), rest_response=request.text, rest_status_code=request.status_code)
raise Exception("Failed to disable OLT device in VOLTHA")
+ # NOTE [teo] wait some time after the disable to let VOLTHA doing its things
+ i = 0
+ for i in list(reversed(range(10))):
+ sleep(1)
+ log.info("Deleting the OLT in %s seconds" % i)
+
# Delete the OLT device
request = requests.delete("%s:%d/api/v1/devices/%s/delete" % (voltha['url'], voltha['port'], model.device_id))
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index 0df502f..6fdf546 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -67,7 +67,7 @@
# Setting up the config module
from xosconfig import Config
- config = os.path.join(test_path, "../model_policies/test_config.yaml")
+ config = os.path.join(test_path, "../test_config.yaml")
Config.clear()
Config.init(config, "synchronizer-config-schema.yaml")
# END setting up the config module
diff --git a/xos/synchronizer/steps/test_sync_onu_device.py b/xos/synchronizer/steps/test_sync_onu_device.py
index 329774a..abd72f7 100644
--- a/xos/synchronizer/steps/test_sync_onu_device.py
+++ b/xos/synchronizer/steps/test_sync_onu_device.py
@@ -49,7 +49,7 @@
# Setting up the config module
from xosconfig import Config
- config = os.path.join(test_path, "../model_policies/test_config.yaml")
+ config = os.path.join(test_path, "../test_config.yaml")
Config.clear()
Config.init(config, "synchronizer-config-schema.yaml")
# END Setting up the config module
diff --git a/xos/synchronizer/steps/test_sync_volt_service_instance.py b/xos/synchronizer/steps/test_sync_volt_service_instance.py
index efc946d..c247178 100644
--- a/xos/synchronizer/steps/test_sync_volt_service_instance.py
+++ b/xos/synchronizer/steps/test_sync_volt_service_instance.py
@@ -51,7 +51,7 @@
# Setting up the config module
from xosconfig import Config
- config = os.path.join(test_path, "../model_policies/test_config.yaml")
+ config = os.path.join(test_path, "../test_config.yaml")
Config.clear()
Config.init(config, "synchronizer-config-schema.yaml")
# END Setting up the config module