コード例 #1
0
class SampleDslProject(Project):
    """Sample DSL Project with environments"""

    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_1_NAME),
            subnets=[
                Ref.Subnet(
                    name=NTNX_ACCOUNT_1_SUBNET_2,
                    cluster=NTNX_ACCOUNT_1_SUBNET_2_CLUSTER,
                ),
                Ref.Subnet(
                    name=NTNX_ACCOUNT_1_SUBNET_1,
                    cluster=NTNX_ACCOUNT_1_SUBNET_1_CLUSTER,
                ),
            ],
        ),
        Provider.Gcp(account=Ref.Account(GCP_ACCOUNT_NAME)),
        Provider.Vmware(account=Ref.Account(VMWARE_ACCOUNT_NAME)),
        Provider.K8s(account=Ref.Account(K8S_ACCOUNT_NAME)),
        Provider.Aws(account=Ref.Account(AWS_ACCOUNT_NAME)),
        Provider.Azure(account=Ref.Account(AZURE_ACCOUNT_NAME)),
    ]

    users = [Ref.User(USER_NAME)]

    quotas = {
        "vcpus": 1,
        "storage": 2,
        "memory": 1,
    }
コード例 #2
0
class TestDslProjectWithEnv(Project):
    """Sample DSL Project with environments"""

    providers = [
        Provider.Ntnx(
            account=Ref.Account("NTNX_LOCAL_AZ"),
            subnets=[Ref.Subnet(name="vlan.0", cluster="calmdev1")],
        ),
        Provider.Aws(account=Ref.Account("AWS account")),
        Provider.Azure(account=Ref.Account("AZURE_account")),
        Provider.Gcp(account=Ref.Account("GCP Account")),
        Provider.Vmware(account=Ref.Account("Vmware Account")),
        Provider.K8s(account=Ref.Account("K8S_account_basic_auth")),
    ]

    users = [
        Ref.User(name="*****@*****.**"),
    ]

    envs = [ProjEnvironment]

    groups = [
        Ref.Group(name="cn=sspgroup1,ou=pc,dc=systest,dc=nutanix,dc=com"),
    ]

    quotas = {
        "vcpus": 1,
        "storage": 2,
        "memory": 1,
    }
コード例 #3
0
class SampleDslProject(Project):
    """
    Sample DSL Project with environments
    NOTE: AWS account is added to environment module and not to project module, 
        By default project command will also attach the accounts attached to any environment
        to this project
    """

    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_NAME),
            subnets=[
                Ref.Subnet(
                    name=NTNX_SUBNET,
                    cluster=NTNX_SUBNET_CLUSTER,
                )
            ],
        ),
        Provider.Gcp(account=Ref.Account(GCP_ACCOUNT_NAME)),
        Provider.Vmware(account=Ref.Account(VMWARE_ACCOUNT_NAME)),
        Provider.K8s(account=Ref.Account(K8S_ACCOUNT_NAME)),
    ]

    users = [Ref.User(USER)]

    envs = [ProjEnvironment1]
    default_environment = ref(ProjEnvironment1)
    quotas = {
        "vcpus": 1,
        "storage": 2,
        "memory": 1,
    }
コード例 #4
0
class DSL_PROJECT(Project):
    """Test project"""

    providers = [
        Provider.Ntnx(
            account=Ref.Account(ACCOUNT_NAME),
            subnets=[Ref.Subnet(name=SUBNET_NAME, cluster=CLUSTER_NAME)],
        )
    ]

    quotas = {"vcpus": VCPUS, "storage": STORAGE, "memory": MEMORY}
コード例 #5
0
class TestDemoProject(Project):
    """Test project"""

    providers = [
        Provider.Ntnx(
            account=Ref.Account(ACCOUNT),
            subnets=[Ref.Subnet(name=SUBNET, cluster=CLUSTER)],
        )
    ]

    users = [Ref.User(name=USER)]

    groups = [Ref.Group(name=GROUP)]

    quotas = {"vcpus": VCPUS, "storage": STORAGE, "memory": MEMORY}
コード例 #6
0
class ProjEnvironment2(Environment):

    substrates = [AhvWindowsVmSubstrate]
    credentials = [Centos]
    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_2_NAME),
            subnets=[
                Ref.Subnet(
                    name=NTNX_ACCOUNT_2_SUBNET_1,
                    cluster=NTNX_ACCOUNT_2_SUBNET_1_CLUSTER,
                )
            ],
        ),
        Provider.Gcp(account=Ref.Account(GCP_ACCOUNT_NAME)),
    ]
コード例 #7
0
class ProjEnvironment1(Environment):

    substrates = [AhvVmSubstrate]
    credentials = [Centos]
    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_1_NAME),
            subnets=[
                Ref.Subnet(
                    name=NTNX_ACCOUNT_1_SUBNET_1,
                    cluster=NTNX_ACCOUNT_1_SUBNET_1_CLUSTER,
                )
            ],
        ),
        Provider.Aws(account=Ref.Account(AWS_ACCOUNT_NAME)),
        Provider.Azure(account=Ref.Account(AZURE_ACCOUNT_NAME)),
    ]
コード例 #8
0
class SampleDslEnvironment(Environment):

    substrates = [AhvVmSubstrate]
    credentials = [Centos]
    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_1_NAME),
            subnets=[
                Ref.Subnet(
                    name=NTNX_ACCOUNT_1_SUBNET_1,
                    cluster=NTNX_ACCOUNT_1_SUBNET_1_CLUSTER,
                )
            ],
        ),
        Provider.Aws(account=Ref.Account(AWS_ACCOUNT_NAME)),
        Provider.Gcp(account=Ref.Account(GCP_ACCOUNT_NAME)),
        Provider.Vmware(account=Ref.Account(VMWARE_ACCOUNT_NAME)),
    ]
コード例 #9
0
class TestDslProject(Project):
    """Sample DSL Project"""

    providers = [
        Provider.Ntnx(
            account=Ref.Account(NTNX_ACCOUNT_NAME),
            subnets=[
                Ref.Subnet(name=NTNX_SUBNET, cluster=NTNX_SUBNET_CLUSTER)
            ],
        ),
        Provider.Aws(account=Ref.Account(AWS_ACCOUNT_NAME)),
        Provider.Azure(account=Ref.Account(AZURE_ACCOUNT_NAME)),
        Provider.Gcp(account=Ref.Account(GCP_ACCOUNT_NAME)),
        Provider.Vmware(account=Ref.Account(VMWARE_ACCOUNT_NAME)),
        Provider.K8s(account=Ref.Account(K8S_ACCOUNT_NAME)),
    ]

    users = [Ref.User(name=USER_NAME)]

    quotas = {"vcpus": 1, "storage": 2, "memory": 1}