aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/instantiate
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2020-09-04 17:03:23 +0200
committermrichomme <morgan.richomme@orange.com>2020-09-08 11:03:28 +0200
commit076a0030b70a875535f7fcabb7acafe7cf478746 (patch)
tree0f5a62fad16fa4fb930ae0436bf158c20d9ff6b1 /src/onaptests/steps/instantiate
parent6022ac2e68ece3720bcfa57b290d73ac0eb238c1 (diff)
Support non multicloud configuration
Add tenant and availability zone manually It is done by multicloud in multicloud mode Use settings.py as the main settings and specific settings per use case Issue-ID: TEST-256 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I3a66a8416cddb546780f784568e7a88f2bd1781b Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'src/onaptests/steps/instantiate')
-rw-r--r--src/onaptests/steps/instantiate/service_ala_carte.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/onaptests/steps/instantiate/service_ala_carte.py b/src/onaptests/steps/instantiate/service_ala_carte.py
index dad6563..011528d 100644
--- a/src/onaptests/steps/instantiate/service_ala_carte.py
+++ b/src/onaptests/steps/instantiate/service_ala_carte.py
@@ -50,7 +50,12 @@ class ServiceAlaCarteInstantiateStep(BaseStep):
cloud_region_id=settings.CLOUD_REGION_ID,
)
tenant: Tenant = cloud_region.get_tenant(settings.TENANT_ID)
- owning_entity = AaiOwningEntity.get_by_owning_entity_name(settings.OWNING_ENTITY)
+ try:
+ owning_entity = AaiOwningEntity.get_by_owning_entity_name(
+ settings.OWNING_ENTITY)
+ except ValueError:
+ self._logger.info("Owning entity not found, create it")
+ owning_entity = AaiOwningEntity.create(settings.OWNING_ENTITY)
vid_project = Project.create(settings.PROJECT)
service_instantiation = ServiceInstantiation.instantiate_so_ala_carte(