diff options
author | Michal Chabiera <michal.chabiera@orange.com> | 2020-12-22 11:55:52 +0100 |
---|---|---|
committer | Michal Chabiera <michal.chabiera@orange.com> | 2020-12-22 12:33:11 +0100 |
commit | 1e501466e21b774ccaadef19f4618decc0650001 (patch) | |
tree | b12748758546d5545b2587aea061fa9bd5836c3a /heat/vFW_CNF_CDS/automation/delete.py | |
parent | 6a7d598d08aa0e145a5aff71c4ed6deafb098e39 (diff) |
Check orchestration status during instantiation and deletion vFW_CNF_CDS usecase
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
Diffstat (limited to 'heat/vFW_CNF_CDS/automation/delete.py')
-rwxr-xr-x | heat/vFW_CNF_CDS/automation/delete.py | 8 |
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}") |