994b08155946ab4a010c2adbd58d0d83470fe816
[sdc.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
5
6 parameters:
7   aap_address_mode:
8     description: "Address mode for the vDBE cluster IP"
9     type: string
10   control_int_net_forwarding_mode:
11     description: "forwarding mode of the control virtual network"
12     type: string
13   control_int_net_rpf:
14     description: "Reverse Path Filtering enable or disable for the control virtual network"
15     type: string
16   control_int_net_shared:
17     description: "control virtual network shared"
18     type: boolean
19   control_int_net_flood_unknown_unicast:
20     description: "forwarding mode of the control virtual network"
21     type: boolean
22   oam_net_name:
23     description: "Name of NSDNet network from which the management IP addresses will be allocated"
24     type: string
25   untrusted_net_name:
26     description: "Name of public untrusted network into which this vDBE HA cluster is deployed"
27     type: string
28   untrusted_num_vn:
29     constraints:
30       -
31         range:
32           max: 77
33           min: 1
34     description: "Number of vDBE subinterface virtual Networks"
35     type: number
36   untrusted_vlan_tags:
37     description: "List of subinterface vlan tags"
38     type: comma_delimited_list
39   untrusted_vn_networks:
40     description: "List of subinterface virtual networks"
41     type: comma_delimited_list
42   vdbe_aap_sec_untrusted_ip_prefix:
43     description: "ip prefix for secondary vDBE VM aap on the VAN untrusted network"
44     type: string
45   vdbe_aap_sec_untrusted_ip_prefix_len:
46     description: "ip prefix length for the secondary DBE VM aap on the VAN untrusted network"
47     type: string
48   vdbe_aap_untrusted_ip_prefix:
49     description: "ip prefix for primary vDBE VM on the VAN untrusted network"
50     type: string
51   vdbe_aap_untrusted_ip_prefix_len:
52     description: "ip prefix length for the primary vDBE VM on the VAN untrusted network"
53     type: string
54   vdbe_aap_untrusted_v6_ip_prefix:
55     description: "ipv6 prefix for the primary vDBE VM on the VAN untrusted network"
56     type: string
57   vdbe_aap_untrusted_v6_ip_prefix_len:
58     description: "ipv6 prefix length for the primary vDBE VM on the VAN untrusted network"
59     type: string
60   vdbe_device_name:
61     description: "VDBE device Name for this vdbe VNF"
62     type: string
63   vdbe_hw_untr_mac_1:
64     description: "Secondary MAC address of the secondary vDBE VM on the VAN untrusted network"
65     type: string
66   vdbe_name_1:
67     description: "VM Name for this vdbe node 1"
68     type: string
69   vdbe_untrusted_ip_1:
70     description: "IPV4 address of the secondary vDBE VM on the VAN untrusted network"
71     type: string
72   vdbe_untrusted_v6_ip_1:
73     description: "IPV6 address of the secondary vDBE VM on the VAN untrusted network"
74     type: string
75   vdbe_untrusted_vmac_address:
76     description: "Virtual MAC of the primary vDBE VM on the VAN untrusted network"
77     type: string
78   vdbe_flavor_name:
79     description: "Flavor to use for vDBE"
80     type: string
81   vdbe_image_name:
82     description: "Image to use for vDBE"
83     type: string
84   vnf_id:
85     description: "Unique ID for this VF inst"
86     type: string
87   vnf_name:
88     description: "Unique name for this VF instance"
89     type: string
90   vf_module_id:
91     description: "Unique ID for this VF module inst"
92     type: string
93   availability_zone_1:
94     description: "The availability zone of secondary node1 vDBE vm in the local HA pair."
95     type: string
96 resources:
97   vdbe_node_1:
98     type: OS::Nova::Server
99     properties:
100       availability_zone:
101         get_param: availability_zone_1
102       flavor:
103         get_param: vdbe_flavor_name
104       image:
105         get_param: vdbe_image_name
106       metadata:
107         vf_module_id:
108           get_param: vf_module_id
109         vnf_id:
110           get_param: vnf_id
111         vnf_name:
112           get_param: vnf_name
113       name:
114         get_param: vdbe_name_1
115       networks:
116         - port: {get_resource: vdbe_0_untr_vmi_0}
117         - port: {get_resource: vdbe_untr_vmi}
118         - port: {get_resource: vdbe_0_oam_port_1}
119         - port: {get_resource: vdbe_oam_port}
120         - port: {get_resource: vdbe_oam_port_2}
121         - port: {get_resource: vdbe_0_oam_neutronNotFollowingHeatGuidelines_2}
122         - port: {get_resource: vdbe_0_untr_vmiNotFollowingHeatGuidelines_1}
123   vdbe_untr_1_subports:
124     type: OS::Heat::ResourceGroup
125     depends_on: control_int_net
126     properties:
127       count:
128         get_param: untrusted_num_vn
129       resource_def:
130         type: nested.yml
131         properties:
132           attr_test: { get_attr: [ vdbe_0_untr_vmi_0, name ] }
133           aap_address_mode:
134             get_param: aap_address_mode
135           aap_sec_untrusted_ip_prefix:
136             get_param: vdbe_aap_sec_untrusted_ip_prefix
137           aap_sec_untrusted_ip_prefix_len:
138             get_param: vdbe_aap_sec_untrusted_ip_prefix_len
139           aap_untrusted_ip_prefix:
140             get_param: vdbe_aap_untrusted_ip_prefix
141           aap_untrusted_ip_prefix_len:
142             get_param: vdbe_aap_untrusted_ip_prefix_len
143           aap_untrusted_v6_ip_prefix:
144             get_param: vdbe_aap_untrusted_v6_ip_prefix
145           aap_untrusted_v6_ip_prefix_len:
146             get_param: vdbe_aap_untrusted_v6_ip_prefix_len
147           counter:
148             get_param: vnf_id
149           ip_address:
150             get_param: vdbe_untrusted_ip_1
151           ip_v6_address:
152             get_param: vdbe_untrusted_v6_ip_1
153           mac_address:
154             get_param: vdbe_hw_untr_mac_1
155           parent_interface:
156             get_resource: vdbe_0_untr_vmi_0
157           subinterfaces_name_prefix:
158             str_replace:
159               params:
160                 DBE:
161                   get_param: vdbe_device_name
162                 VM_NAME:
163                   get_param: vdbe_name_1
164               template: VM_NAMEDBE001p1n004
165           vlan_tag_list:
166             get_param: untrusted_vlan_tags
167           vmac_address:
168             get_param: vdbe_untrusted_vmac_address
169           vdbe_subport_network:
170             get_resource: control_int_net
171   vdbe_0_untr_vmi_0:
172     properties:
173       name:
174         str_replace:
175           params:
176             DBE:
177               get_param: vdbe_device_name
178             VM_NAME:
179               get_param: vdbe_name_1
180           template: VM_NAMEDBE001p1n004
181       virtual_machine_interface_allowed_address_pairs:
182         virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
183           -
184             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
185               get_param: aap_address_mode
186             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
187               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
188                 get_param: vdbe_aap_untrusted_ip_prefix
189               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
190                 get_param: vdbe_aap_untrusted_ip_prefix_len
191             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
192               get_param: vdbe_untrusted_vmac_address
193           -
194             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
195               get_param: aap_address_mode
196             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
197               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
198                 get_param: vdbe_aap_sec_untrusted_ip_prefix
199               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
200                 get_param: vdbe_aap_sec_untrusted_ip_prefix_len
201             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
202               get_param: vdbe_hw_untr_mac_1
203           -
204             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
205               get_param: aap_address_mode
206             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
207               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
208                 get_param: vdbe_aap_untrusted_v6_ip_prefix
209               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
210                 get_param: vdbe_aap_untrusted_v6_ip_prefix_len
211             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
212               get_param: vdbe_untrusted_vmac_address
213       virtual_machine_interface_mac_addresses:
214         virtual_machine_interface_mac_addresses_mac_address:
215           -
216             get_param: vdbe_hw_untr_mac_1
217       virtual_network_refs:
218         -
219           get_param: untrusted_net_name
220     type: OS::ContrailV2::VirtualMachineInterface
221
222   vdbe_untr_vmi:
223     properties:
224       name:
225         str_replace:
226           params:
227             DBE:
228               get_param: vdbe_device_name
229             VM_NAME:
230               get_param: vdbe_name_1
231           template: VM_NAMEDBE001p1n004
232       virtual_machine_interface_allowed_address_pairs:
233         virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
234           -
235             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
236               get_param: aap_address_mode
237             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
238               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
239                 get_param: vdbe_aap_untrusted_ip_prefix
240               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
241                 get_param: vdbe_aap_untrusted_ip_prefix_len
242             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
243               get_param: vdbe_untrusted_vmac_address
244           -
245             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
246               get_param: aap_address_mode
247             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
248               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
249                 get_param: vdbe_aap_sec_untrusted_ip_prefix
250               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
251                 get_param: vdbe_aap_sec_untrusted_ip_prefix_len
252             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
253               get_param: vdbe_hw_untr_mac_1
254           -
255             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
256               get_param: aap_address_mode
257             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
258               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
259                 get_param: vdbe_aap_untrusted_v6_ip_prefix
260               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
261                 get_param: vdbe_aap_untrusted_v6_ip_prefix_len
262             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
263               get_param: vdbe_untrusted_vmac_address
264       virtual_machine_interface_mac_addresses:
265         virtual_machine_interface_mac_addresses_mac_address:
266           -
267             get_param: vdbe_hw_untr_mac_1
268       virtual_network_refs:
269         -
270           get_param: untrusted_net_name
271     type: OS::ContrailV2::VirtualMachineInterface
272
273   vdbe_0_oam_port_1:
274     type: OS::Neutron::Port
275     properties:
276       network: Test
277       fixed_ips: [{"ip_address": 1.2.3.4}]
278       replacement_policy: AUTO
279
280   vdbe_oam_port:
281     type: OS::Neutron::Port
282     properties:
283       network: Test
284       fixed_ips: [{"ip_address": 1.2.3.4}]
285       replacement_policy: AUTO
286
287   vdbe_oam_port_2:
288     type: OS::Neutron::Port
289     properties:
290       network: Test
291       fixed_ips: [{"ip_address": 1.2.3.4}]
292       replacement_policy: AUTO
293
294   vdbe_0_oam_neutronNotFollowingHeatGuidelines_2:
295     type: OS::Neutron::Port
296     properties:
297       network: Test
298       fixed_ips: [{"ip_address": 1.2.3.4}]
299       replacement_policy: AUTO
300
301   vdbe_0_untr_vmiNotFollowingHeatGuidelines_1:
302     properties:
303       name:
304         str_replace:
305           params:
306             DBE:
307               get_param: vdbe_device_name
308             VM_NAME:
309               get_param: vdbe_name_1
310           template: VM_NAMEDBE001p1n004
311       virtual_machine_interface_allowed_address_pairs:
312         virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
313           -
314             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
315               get_param: aap_address_mode
316             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
317               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
318                 get_param: vdbe_aap_untrusted_ip_prefix
319               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
320                 get_param: vdbe_aap_untrusted_ip_prefix_len
321             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
322               get_param: vdbe_untrusted_vmac_address
323           -
324             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
325               get_param: aap_address_mode
326             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
327               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
328                 get_param: vdbe_aap_sec_untrusted_ip_prefix
329               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
330                 get_param: vdbe_aap_sec_untrusted_ip_prefix_len
331             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
332               get_param: vdbe_hw_untr_mac_1
333           -
334             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode:
335               get_param: aap_address_mode
336             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
337               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
338                 get_param: vdbe_aap_untrusted_v6_ip_prefix
339               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len:
340                 get_param: vdbe_aap_untrusted_v6_ip_prefix_len
341             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
342               get_param: vdbe_untrusted_vmac_address
343       virtual_machine_interface_mac_addresses:
344         virtual_machine_interface_mac_addresses_mac_address:
345           -
346             get_param: vdbe_hw_untr_mac_1
347       virtual_network_refs:
348         -
349           get_param: untrusted_net_name
350     type: OS::ContrailV2::VirtualMachineInterface
351
352   control_int_net:
353     type: OS::ContrailV2::VirtualNetwork
354     depends_on: vdbe_untr_1_subports
355     properties:
356       network_ipam_refs: { get_attr: [ vdbe_untr_1_subports, count ] }
357       flood_unknown_unicast:
358         get_param: control_int_net_flood_unknown_unicast
359       is_shared:
360         get_param: control_int_net_shared
361       name:
362         str_replace:
363           params:
364             VNF_NAME:
365               get_param: vnf_name
366           template: VNF_NAME_control_net
367       virtual_network_properties:
368         virtual_network_properties_forwarding_mode:
369           get_param: control_int_net_forwarding_mode
370         virtual_network_properties_rpf:
371           get_param: control_int_net_rpf
372 outputs:
373   out1:
374       description: output_test
375       value: {get_attr: [vdbe_untr_1_subports, name]}