diff options
author | andreasgeissler <andreas-geissler@telekom.de> | 2020-09-09 18:01:12 +0200 |
---|---|---|
committer | andreasgeissler <andreas-geissler@telekom.de> | 2020-09-10 17:49:24 +0200 |
commit | a5c39a3409a795fb0709b952e15ac2746364358b (patch) | |
tree | fb887c560ce1699543d54572279207830c92ef31 /src/onaptests/steps/cloud | |
parent | 80e8e99d9b33fc5929c253aba84d330ae68f01de (diff) |
Updated yaml-based instantiation and MultiCloud registry
Correction for linter and updated run script
Issue-ID: TEST-256
Signed-off-by: andreasgeissler <andreas-geissler@telekom.de>
Change-Id: Ia1f6f41f8fc6ed74c836ea7aa987f10487f377a6
Diffstat (limited to 'src/onaptests/steps/cloud')
-rw-r--r-- | src/onaptests/steps/cloud/register_cloud_to_multicloud.py | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/onaptests/steps/cloud/register_cloud_to_multicloud.py b/src/onaptests/steps/cloud/register_cloud_to_multicloud.py index c3a001c..4a1b577 100644 --- a/src/onaptests/steps/cloud/register_cloud_to_multicloud.py +++ b/src/onaptests/steps/cloud/register_cloud_to_multicloud.py @@ -1,3 +1,4 @@ +import time from uuid import uuid4 from onapsdk.aai.cloud_infrastructure import CloudRegion @@ -25,11 +26,11 @@ class RegisterCloudRegionToMulticloudStep(BaseStep): Use settings values: - CLOUD_REGION_CLOUD_OWNER, - CLOUD_REGION_ID, - - CLOUD_REGION_TYPE, - CLOUD_DOMAIN, - VIM_USERNAME, - VIM_PASSWORD, - - VIM_SERVICE_URL. + - VIM_SERVICE_URL, + - TENANT_NAME. """ super().execute() cloud_region = CloudRegion.get_by_id( @@ -40,8 +41,21 @@ class RegisterCloudRegionToMulticloudStep(BaseStep): esr_system_info_id=str(uuid4()), user_name=settings.VIM_USERNAME, password=settings.VIM_PASSWORD, - system_type=settings.CLOUD_REGION_TYPE, + system_type="VIM", service_url=settings.VIM_SERVICE_URL, - cloud_domain=settings.CLOUD_DOMAIN + ssl_insecure=False, + system_status="active", + cloud_domain=settings.CLOUD_DOMAIN, + default_tenant=settings.TENANT_NAME ) cloud_region.register_to_multicloud() + + time.sleep(20) + nb_try = 0 + nb_try_max = 3 + while nb_try < nb_try_max: + if not cloud_region.tenants: + time.sleep(20) + else: + break + nb_try += 1 |