[SDC-29] rebase continue work to align source
[sdc.git] / test-apis-ci / src / test / resources / CI / tests / tmp / positive_artifact_number2.yaml
1 heat_template_version: 2013-05-23
2 #################################
3 #
4 #  Changes in v0.2:
5 #  - Unique availability zone for each VM
6 #  - LAN8 and SLAN networks removed according to latest Prod/Type I diagram
7 #  - 2 DB VMs added
8 #  - Images corrected
9 #  - VM start-up order: SMP->DB->BE->FE (no error handling yet)
10 #  - Provisioning scripts placeholders
11 #
12 #################################
13
14 description: ASC Template
15
16 parameters:
17   city_name:
18     type: number
19     description: city name
20     default: 12.12
21   address:
22     type: string
23     description: address
24     default: Alonim
25   home_number:
26     type: number
27     description: home_number
28     default: 8
29 resources:
30 #  scp_be_wait_condition:
31 #    type: OS::Heat::WaitCondition
32 #    properties:
33 #      handle: { get_resource: scp_be_wait_handle }
34 #      count: 5
35 #      timeout: 300
36 #  scp_be_wait_handle:
37 #    type: OS::Heat::WaitConditionHandle
38 #
39 #  scp_fe_wait_condition:
40 #    type: OS::Heat::WaitCondition
41 #    properties:
42 #      handle: { get_resource: scp_fe_wait_handle }
43 #      count: 2
44 #      timeout: 300
45 #  scp_fe_wait_handle:
46 #    type: OS::Heat::WaitConditionHandle
47 #
48 #  smp_wait_condition:
49 #    type: OS::Heat::WaitCondition
50 #    properties:
51 #      handle: { get_resource: smp_wait_handle }
52 #      count: 2
53 #      timeout: 300
54 #  smp_wait_handle:
55 #    type: OS::Heat::WaitConditionHandle
56 #
57 #  db_wait_condition:
58 #    type: OS::Heat::WaitCondition
59 #    properties:
60 #      handle: { get_resource: db_wait_handle }
61 #      count: 2
62 #      timeout: 300
63 #  db_wait_handle:
64 #    type: OS::Heat::WaitConditionHandle
65
66   FE_Affinity:
67     type: OS::Nova::ServerGroup
68     properties:
69       policies: ["anti-affinity"] 
70   BE_Affinity:
71     type: OS::Nova::ServerGroup
72     properties:
73       policies: ["anti-affinity"]
74   SMP_Affinity:
75     type: OS::Nova::ServerGroup
76     properties:
77       policies: ["anti-affinity"]
78   DB_Affinity:
79     type: OS::Nova::ServerGroup
80     properties:
81       policies: ["anti-affinity"]
82       
83   FE_Clustering_KA:
84     type: OS::Contrail::VirtualNetwork
85     properties:
86       name: { get_param: int_vscp_fe_cluster_net_id }
87
88   FE_Clustering_subnet:
89     type: OS::Neutron::Subnet
90     properties:
91       network_id: { get_resource: FE_Clustering_KA }
92       cidr: { get_param: int_vscp_fe_cluster_cidr }
93
94   Clustering_Network:
95     type: OS::Contrail::VirtualNetwork
96     properties:
97       name: { get_param: int_vscp_cluster_net_id }
98
99   Clustering_Network_subnet:
100     type: OS::Neutron::Subnet
101     properties:
102       network_id: { get_resource: Clustering_Network }
103       cidr: { get_param: int_vscp_cluster_cidr }
104
105   DB_Network:
106     type: OS::Contrail::VirtualNetwork
107     properties:
108       name: { get_param: int_vscp_db_network_net_id }
109
110   DB_Network_subnet:
111     type: OS::Neutron::Subnet
112     properties:
113       network_id: { get_resource: DB_Network }
114       cidr: { get_param: int_vscp_db_network_cidr }
115
116   server_scp_be0:
117     type: OS::Nova::Server
118 #    depends on: db_wait_condition
119     properties:
120       name: { get_param: vm_scp_be0_name }
121       image: { get_param: image_scp_be_id }
122 #      availability_zone: { get_param: availability_zone_be0 }
123       flavor: { get_param: flavor_scp_be_id }
124       scheduler_hints: { group: { get_resource: BE_Affinity } }
125       networks:
126       - port: { get_resource: be0_port_3 }
127       - port: { get_resource: be0_port_4 }
128       - port: { get_resource: be0_port_5 }
129       - port: { get_resource: be0_port_7 }
130       metadata:
131         vnf_id: { get_param: vnf_id }
132       user_data:
133         str_replace:
134           template: |
135             #!/bin/bash
136             #todo: provision $vm_name
137             wc_notify --data-binary '{"status": "SUCCESS"}'
138           params:
139             $vm_name: {get_param: vm_scp_be0_name}
140 #            wc_notify: { get_attr: ['scp_be_wait_handle', 'curl_cli'] }