aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/cloud/cloud_region_create.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/cloud/cloud_region_create.py')
-rw-r--r--src/onaptests/steps/cloud/cloud_region_create.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/onaptests/steps/cloud/cloud_region_create.py b/src/onaptests/steps/cloud/cloud_region_create.py
new file mode 100644
index 0000000..dafd6ec
--- /dev/null
+++ b/src/onaptests/steps/cloud/cloud_region_create.py
@@ -0,0 +1,28 @@
+from onapsdk.aai.cloud_infrastructure import CloudRegion
+from onapsdk.configuration import settings
+
+from ..base import BaseStep
+
+
+class CloudRegionCreateStep(BaseStep):
+ """Cloud region creation step."""
+
+ def execute(self):
+ """Create cloud region.
+
+ Use settings values:
+ - CLOUD_REGION_CLOUD_OWNER,
+ - CLOUD_REGION_ID,
+ - CLOUD_REGION_TYPE,
+ - CLOUD_REGION_VERSION.
+
+ """
+ super().execute()
+ CloudRegion.create(
+ cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
+ cloud_region_id=settings.CLOUD_REGION_ID,
+ orchestration_disabled=False,
+ in_maint=False,
+ cloud_type=settings.CLOUD_REGION_TYPE,
+ cloud_region_version=settings.CLOUD_REGION_VERSION
+ )