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.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/onaptests/steps/cloud/complex_create.py b/src/onaptests/steps/cloud/complex_create.py
new file mode 100644
index 0000000..37ad49f
--- /dev/null
+++ b/src/onaptests/steps/cloud/complex_create.py
@@ -0,0 +1,23 @@
+from onapsdk.aai.cloud_infrastructure import Complex
+from onapsdk.configuration import settings
+
+from ..base import BaseStep
+
+
+class ComplexCreateStep(BaseStep):
+ """Complex creation step."""
+
+ def execute(self):
+ """Create complex.
+
+ Use settings values:
+ - COMPLEX_PHYSICAL_LOCATION_ID,
+ - COMPLEX_DATA_CENTER_CODE.
+
+ """
+ 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
+ )