aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/cloud/cloud_region_create.py
blob: dafd6ec7f5eb2385eef9d487d7a1b1c0e5cd9a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
        )