aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/instantiate/service_macro.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/instantiate/service_macro.py')
-rw-r--r--src/onaptests/steps/instantiate/service_macro.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/onaptests/steps/instantiate/service_macro.py b/src/onaptests/steps/instantiate/service_macro.py
index 36f0130..04c3931 100644
--- a/src/onaptests/steps/instantiate/service_macro.py
+++ b/src/onaptests/steps/instantiate/service_macro.py
@@ -9,6 +9,7 @@ from onapsdk.aai.business.owning_entity import OwningEntity
from onapsdk.aai.cloud_infrastructure.cloud_region import CloudRegion
from onapsdk.aai.cloud_infrastructure.tenant import Tenant
from onapsdk.configuration import settings
+from onapsdk.exceptions import ResourceNotFound
from onapsdk.sdc.service import Service
from onapsdk.so.instantiation import ServiceInstantiation
from onapsdk.vid import LineOfBusiness, Platform, Project
@@ -137,7 +138,7 @@ class YamlTemplateServiceMacroInstantiateStep(YamlTemplateBaseStep):
try:
owning_entity = OwningEntity.get_by_owning_entity_name(
settings.OWNING_ENTITY)
- except ValueError:
+ except ResourceNotFound:
self._logger.info("Owning entity not found, create it")
owning_entity = OwningEntity.create(settings.OWNING_ENTITY)
vid_project: Project = Project(settings.PROJECT)