aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/automation/delete.py
diff options
context:
space:
mode:
Diffstat (limited to 'heat/vFW_CNF_CDS/automation/delete.py')
-rwxr-xr-xheat/vFW_CNF_CDS/automation/delete.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/automation/delete.py b/heat/vFW_CNF_CDS/automation/delete.py
index 435d04ae..c5ac334a 100755
--- a/heat/vFW_CNF_CDS/automation/delete.py
+++ b/heat/vFW_CNF_CDS/automation/delete.py
@@ -16,8 +16,10 @@
# ============LICENSE_END=========================================================
import logging
+from time import sleep
from onapsdk.aai.business import Customer
+from onapsdk.so.so_element import OrchestrationRequest
from config import Config
@@ -59,3 +61,9 @@ if not service_instance:
logger.info("******** Delete Service %s *******", service_instance.instance_name)
service_deletion = service_instance.delete()
+status = None
+while not (status == OrchestrationRequest.StatusEnum.COMPLETED
+ or status == OrchestrationRequest.StatusEnum.FAILED):
+ sleep(10)
+ status = service_deletion.status
+ logger.info(f"Orchestration status is: {status.value}")