-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathenvironment.py
66 lines (51 loc) · 1.55 KB
/
environment.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# THIS FILE IS AUTOMATICALLY GENERATED.
# Disclaimer: Please test this file before using in production.
"""
Generated environment DSL (.py)
"""
from calm.dsl.builtins import *
# Secret Variables
BP_CRED_test_creds_PASSWORD = read_local_file("BP_CRED_test_creds_PASSWORD")
BP_CRED_test_creds = basic_cred(
"admin",
BP_CRED_test_creds_PASSWORD,
name="test_creds",
type="PASSWORD",
)
class vmcalm_array_indexcalm_timeResources(AhvVmResources):
memory = 1
vCPUs = 1
cores_per_vCPU = 1
disks = [
AhvVmDisk.Disk.Scsi.cloneFromImageService("Centos7HadoopMaster", bootable=True)
]
class vmcalm_array_indexcalm_time(AhvVm):
name = "vm-@@{calm_array_index}@@-@@{calm_time}@@"
resources = vmcalm_array_indexcalm_timeResources
cluster = Ref.Cluster(name="auto_cluster_prod_4faf4699cdea")
class Untitled(Substrate):
account = Ref.Account("NTNX_LOCAL_AZ")
os_type = "Linux"
provider_type = "AHV_VM"
provider_spec = vmcalm_array_indexcalm_time
readiness_probe = readiness_probe(
connection_type="SSH",
disabled=True,
retries="5",
connection_port=22,
delay_secs="0",
)
class ENV_test_decompile_env(Environment):
substrates = [Untitled]
credentials = [BP_CRED_test_creds]
providers = [
Provider.Ntnx(
account=Ref.Account("NTNX_LOCAL_AZ"),
subnets=[
Ref.Subnet(
name="vlan.154",
cluster="auto_cluster_prod_4faf4699cdea",
)
],
),
]