summaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/automation/instantiate.py
diff options
context:
space:
mode:
Diffstat (limited to 'heat/vFW_CNF_CDS/automation/instantiate.py')
-rwxr-xr-xheat/vFW_CNF_CDS/automation/instantiate.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/automation/instantiate.py b/heat/vFW_CNF_CDS/automation/instantiate.py
index 0316f113..fb461862 100755
--- a/heat/vFW_CNF_CDS/automation/instantiate.py
+++ b/heat/vFW_CNF_CDS/automation/instantiate.py
@@ -18,6 +18,7 @@
import logging
import zipfile
from io import BytesIO
+from time import sleep
from uuid import uuid4
import oyaml as yaml
@@ -37,6 +38,7 @@ from onapsdk.so.instantiation import (
InstantiationParameter, VnfParameters, VfmoduleParameters)
from onapsdk.sdc.service import Service
from onapsdk.vid import LineOfBusiness, OwningEntity, Platform, Project
+from onapsdk.so.so_element import OrchestrationRequest
logger = logging.getLogger("")
logger.setLevel(logging.DEBUG)
@@ -207,3 +209,9 @@ if not service_instance:
service_instance_name=Config.SERVICE_INSTANCE_NAME,
vnf_parameters=[vnf_params]
)
+ status = None
+ while not (status == OrchestrationRequest.StatusEnum.COMPLETED
+ or status == OrchestrationRequest.StatusEnum.FAILED):
+ sleep(10)
+ status = service_instantiation.status
+ logger.info(f"Orchestration status is: {status.value}")