aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/cloud/complex_create.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/cloud/complex_create.py')
-rw-r--r--src/onaptests/steps/cloud/complex_create.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/onaptests/steps/cloud/complex_create.py b/src/onaptests/steps/cloud/complex_create.py
index 1bb7e51..60565f4 100644
--- a/src/onaptests/steps/cloud/complex_create.py
+++ b/src/onaptests/steps/cloud/complex_create.py
@@ -1,5 +1,6 @@
from onapsdk.aai.cloud_infrastructure import Complex
from onapsdk.configuration import settings
+from onapsdk.exceptions import APIError
from ..base import BaseStep
@@ -27,8 +28,10 @@ class ComplexCreateStep(BaseStep):
"""
super().execute()
- Complex.create(
- physical_location_id=settings.COMPLEX_PHYSICAL_LOCATION_ID,
- data_center_code=settings.COMPLEX_DATA_CENTER_CODE,
- name=settings.COMPLEX_PHYSICAL_LOCATION_ID
- )
+ try:
+ Complex.create(
+ physical_location_id=settings.COMPLEX_PHYSICAL_LOCATION_ID,
+ data_center_code=settings.COMPLEX_DATA_CENTER_CODE,
+ name=settings.COMPLEX_PHYSICAL_LOCATION_ID)
+ except APIError:
+ self._logger.warn("Try to update the complex failed.")