aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/automation/delete.py
diff options
context:
space:
mode:
authorMichal Chabiera <michal.chabiera@orange.com>2020-12-22 11:55:52 +0100
committerMichal Chabiera <michal.chabiera@orange.com>2020-12-22 11:48:52 +0000
commit39c2b877126da78057a02030064b22452c51a3b9 (patch)
tree97a4a01b2ce1a2930f02e1f778aa07123aa5bca2 /heat/vFW_CNF_CDS/automation/delete.py
parent303fe3b4343838ae4c7b7a2511cb065f3abe7699 (diff)
Check orchestration status during instantiation and deletion vFW_CNF_CDS usecase7.0.1guilin
Check orchestration status during instantiation and deletion vFW_CNF_CDS usecase Issue-ID: INT-1658 Signed-off-by: Michal Chabiera <michal.chabiera@orange.com> Change-Id: Iffeda65393cea55a8108b91f282b7ee9d6e6f7c8 (cherry picked from commit 1e501466e21b774ccaadef19f4618decc0650001)
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}")