Force region to RegionOne if OS_REGION_NAME is unset
[functest.git] / functest / opnfv_tests / vnf / ims / cloudify_ims.py
index 71aaa30..786c535 100644 (file)
@@ -250,7 +250,8 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
             keystone_password=snaps_creds.password,
             keystone_tenant_name=snaps_creds.project_name,
             keystone_url=public_auth_url,
-            region=snaps_creds.region_name,
+            region=snaps_creds.region_name if snaps_creds.region_name else (
+                'RegionOne'),
             user_domain_name=snaps_creds.user_domain_name,
             project_domain_name=snaps_creds.project_domain_name)
         self.__logger.info("Set creds for cloudify manager %s", cfy_creds)
@@ -348,11 +349,10 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
                                       descriptor.get('name'),
                                       self.vnf.get('inputs'))
 
-        wait_for_execution(cfy_client,
-                           _get_deployment_environment_creation_execution(
-                               cfy_client, descriptor.get('name')),
-                           self.__logger,
-                           timeout=300)
+        wait_for_execution(
+            cfy_client,
+            get_execution_id(cfy_client, descriptor.get('name')),
+            self.__logger, timeout=300)
 
         self.__logger.info("Start the VNF Instance deployment")
         execution = cfy_client.executions.start(descriptor.get('name'),
@@ -530,7 +530,7 @@ def wait_for_execution(client, execution, logger, timeout=3600, ):
     return execution
 
 
-def _get_deployment_environment_creation_execution(client, deployment_id):
+def get_execution_id(client, deployment_id):
     """
     Get the execution id of a env preparation.