[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / fulltest / mixPatterns / duplicateResourceIdsInDiffAddOnFiles / in / module_8_lb1_vota.yml
1 heat_template_version: 2015-04-30
2
3 parameters:
4 ####
5   int_oam_int_net_id:
6     type: string
7     description: Name of management network to be created
8   lb1_gwaf_int_net_id:
9     type: string
10     description: Name of mirror network to be created
11   oam_protected_net:
12     type: string
13     description: Name of mirror network to be created
14 ####
15   lb_key_name:
16     type: string
17   LB1_name_0:
18     type: string
19     description: Name of the SVM
20   LB1_name_1:
21     type: string
22     description: Name of the SVM
23   LB1_flavor_name:
24     type: string
25     description: Flavor of the end VMs
26   LB1_image_name:
27     type: string
28     description: Name of the end VM LB_image_name
29 # aap_core
30   aap_core_ip_prefix:
31     type: string
32     description: ip_prefix for the ServiceInstance
33   aap_core_ip_prefix_len:
34     type: number
35     description: ip_prefix_len for the ServiceInstance
36   aap_core_ha_mode:
37     type: string
38     description: address_mode for the ServiceInstance
39   aap_core_mac:
40     type: string
41     description: mac for the VirtualMachineInterface
42   lb_oam_int_ip_0:
43     type: string
44     description: lb ip
45   lb_lb1_gwaf_int_ip_0:
46     type: string
47     description: lb ip
48   lb_oam_protected_ip_0:
49     type: string
50     description: lb ip
51   lb_oam_int_ip_1:
52     type: string
53     description: lb ip
54   lb_lb1_gwaf_int_ip_1:
55     type: string
56     description: lb ip
57   lb_oam_protected_ip_1:
58     type: string
59     description: lb ip
60   vf_module_id:
61     type: string
62     description: Unique ID for this VF Module instance   
63   vnf_id:
64     type: string
65     description: Name of vOTA instance for ECOMP
66   availability_zone_0:
67     type: string
68     description: lb availability zone
69   availability_zone_1:
70     type: string
71     description: lb availability zone
72   int_oam_int_sec_group_id: 
73     type: string
74     description: int oam sec group
75   lb1_gwaf_int_sec_group_id: 
76     type: string
77     description: lb1 gwaf sec group id
78   oam_protected_sec_group_id:
79     type: string
80     description: oam protected sec group
81   shc_enabled:
82     type: string
83     description: health check 
84   shc_monitor_type:
85     type: string
86     description:  health check 
87   shc_delay:
88     type: string
89     description:   health check
90   shc_timeout:
91     type: string
92     description:   health check
93   shc_max_retries:
94     type: string
95     description:  health check
96   shc_url_path:
97     type: string
98     description:  health check
99   ecmp_hashing_include_fields_hashing_configured:
100     type: string
101     description:  health check
102   ecmp_hashing_include_fields_source_ip:
103     type: string
104     description: ecmp hash
105   ecmp_hashing_include_fields_destination_port:
106     type: string
107     description:  ecmp hash 
108   ecmp_hashing_include_fields_source_port:
109     type: string
110     description:  ecmp hash
111   ecmp_hashing_include_fields_destination_ip:
112     type: string
113     description:  ecmp hash
114   ecmp_hashing_include_fields_ip_protocol:
115     type: string
116     description:  ecmp hash
117   oam_gw:
118     type: string
119     description: oam gw
120 resources:
121
122
123
124   lb_0_int_oam_int_0_port:
125     type: OS::ContrailV2::VirtualMachineInterface
126     properties:
127       virtual_machine_interface_properties:
128         {
129           virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
130         }
131       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
132       security_group_refs: [{ get_param: int_oam_int_sec_group_id}]
133
134   lb_0_lb1_gwaf_int_1_port:
135     type: OS::ContrailV2::VirtualMachineInterface
136     properties:
137       virtual_machine_interface_properties:
138         {
139           virtual_machine_interface_properties_service_interface_type: { get_param: lb1_gwaf_int_net_id },
140         }
141       virtual_network_refs: [{ get_param: lb1_gwaf_int_net_id }]
142       security_group_refs: [{ get_param: lb1_gwaf_int_sec_group_id }]
143
144   lb_0_oam_protected_2_port:
145     type: OS::ContrailV2::VirtualMachineInterface
146     properties:
147       virtual_network_refs: [{ get_param: oam_protected_net }]
148       service_health_check_refs: 
149         - get_resource: lb_oam_protected_hc
150       ecmp_hashing_include_fields:
151         ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
152         ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
153         ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
154         ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
155         ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
156         ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
157       virtual_machine_interface_allowed_address_pairs:
158         {
159           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
160             [{
161               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
162                 {
163                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
164                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
165                 },
166               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
167               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
168             }],
169         }
170       security_group_refs: [{ get_param: oam_protected_sec_group_id }]
171
172   lb_1_int_oam_int_0_port:
173     type: OS::ContrailV2::VirtualMachineInterface
174     properties:
175       virtual_machine_interface_properties:
176         {
177           virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
178         }
179       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
180       security_group_refs: [{ get_param: int_oam_int_sec_group_id}]
181
182   lb_1_lb1_gwaf_int_1_port:
183     type: OS::ContrailV2::VirtualMachineInterface
184     properties:
185       virtual_machine_interface_properties:
186         {
187           virtual_machine_interface_properties_service_interface_type: { get_param: lb1_gwaf_int_net_id },
188         }
189       virtual_network_refs: [{ get_param: lb1_gwaf_int_net_id }]
190       security_group_refs: [{ get_param: lb1_gwaf_int_sec_group_id }]
191
192   lb_1_oam_protected_2_port:
193     type: OS::ContrailV2::VirtualMachineInterface
194     properties:
195       virtual_network_refs: [{ get_param: oam_protected_net }]
196       service_health_check_refs: 
197         - get_resource: lb_oam_protected_hc
198       ecmp_hashing_include_fields:
199         ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
200         ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
201         ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
202         ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
203         ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
204         ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
205       virtual_machine_interface_allowed_address_pairs:
206         {
207           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
208             [{
209               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
210                 {
211                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
212                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
213                 },
214               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
215               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
216             }],
217         }
218       security_group_refs: [{ get_param: oam_protected_sec_group_id }]
219
220   lb_0_int_oam_int_0_ip:
221     type: OS::ContrailV2::InstanceIp
222     depends_on: [ lb_0_int_oam_int_0_port ]
223     properties:
224       virtual_machine_interface_refs: [{ get_resource: lb_0_int_oam_int_0_port }]
225       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
226       instance_ip_address: { get_param:  lb_oam_int_ip_0 }
227
228
229   lb_0_lb1_gwaf_int_1_ip:
230     type: OS::ContrailV2::InstanceIp
231     depends_on: [ lb_0_lb1_gwaf_int_1_port ]
232     properties:
233       virtual_machine_interface_refs: [{ get_resource: lb_0_lb1_gwaf_int_1_port }]
234       virtual_network_refs: [{ get_param: lb1_gwaf_int_net_id }]
235       instance_ip_address: { get_param:  lb_lb1_gwaf_int_ip_0 }
236
237
238   lb_0_oam_protected_2_ip:
239     type: OS::ContrailV2::InstanceIp
240     depends_on: [ lb_0_oam_protected_2_port ]
241     properties:
242       virtual_machine_interface_refs: [{ get_resource: lb_0_oam_protected_2_port }]
243       virtual_network_refs: [{ get_param: oam_protected_net }]
244       instance_ip_address: { get_param:  lb_oam_protected_ip_0 }
245
246
247   lb_1_int_oam_int_0_ip:
248     type: OS::ContrailV2::InstanceIp
249     depends_on: [ lb_1_int_oam_int_0_port ]
250     properties:
251       virtual_machine_interface_refs: [{ get_resource: lb_1_int_oam_int_0_port }]
252       virtual_network_refs: [{ get_param: int_oam_int_net_id }]
253       instance_ip_address: { get_param:  lb_oam_int_ip_1 }
254
255
256   lb_1_lb1_gwaf_int_1_ip:
257     type: OS::ContrailV2::InstanceIp
258     depends_on: [ lb_1_lb1_gwaf_int_1_port ]
259     properties:
260       virtual_machine_interface_refs: [{ get_resource: lb_1_lb1_gwaf_int_1_port }]
261       virtual_network_refs: [{ get_param: lb1_gwaf_int_net_id }]
262       instance_ip_address: { get_param:  lb_lb1_gwaf_int_ip_1 }
263
264
265   lb_1_oam_protected_2_ip:
266     type: OS::ContrailV2::InstanceIp
267     depends_on: [ lb_1_oam_protected_2_port ]
268     properties:
269       virtual_machine_interface_refs: [{ get_resource: lb_1_oam_protected_2_port }]
270       virtual_network_refs: [{ get_param: oam_protected_net }]
271       instance_ip_address: { get_param:  lb_oam_protected_ip_1 }
272
273
274   lb_oam_protected_hc:
275     type: OS::ContrailV2::ServiceHealthCheck
276     properties:
277       name: oam_protected_hc_PING
278       service_health_check_properties:
279         service_health_check_properties_enabled: { get_param: shc_enabled }
280         service_health_check_properties_monitor_type: { get_param: shc_monitor_type }
281         service_health_check_properties_delay: { get_param: shc_delay }
282         service_health_check_properties_timeout: { get_param: shc_timeout }
283         service_health_check_properties_max_retries: { get_param: shc_max_retries }
284         service_health_check_properties_url_path: { get_param: shc_url_path }
285
286
287
288   LB1_0:
289     type: OS::Nova::Server
290     depends_on: [ lb_0_int_oam_int_0_ip, lb_0_lb1_gwaf_int_1_ip, lb_0_oam_protected_2_ip ]
291     properties:
292       name: {get_param: LB1_name_0 }
293       image: { get_param:  LB1_image_name }
294       flavor: { get_param: LB1_flavor_name }
295       key_name: { get_param: lb_key_name }
296       availability_zone: { get_param: availability_zone_0 }
297       networks:
298         - port: { get_resource: lb_0_int_oam_int_0_port }
299         - port: { get_resource: lb_0_lb1_gwaf_int_1_port }
300         - port: { get_resource: lb_0_oam_protected_2_port }
301       metadata:
302         vnf_id: { get_param: vnf_id }
303         vf_module_id:  { get_param: vf_module_id }
304       user_data:
305         str_replace:
306           template: |
307             #!/bin/bash
308             sudo ip route del default
309             sudo route add -net 0.0.0.0 netmask 0.0.0.0 gw $oam_gw   
310           params:
311             $oam_gw: { get_param: oam_gw  }
312
313   LB1_1:
314     type: OS::Nova::Server
315     depends_on: [ lb_1_int_oam_int_0_ip, lb_1_lb1_gwaf_int_1_ip, lb_1_oam_protected_2_ip ]
316     properties:
317       name: {get_param: LB1_name_1 }
318       image: { get_param:  LB1_image_name }
319       flavor: { get_param: LB1_flavor_name }
320       availability_zone: { get_param: availability_zone_1 }
321       key_name: { get_param: lb_key_name }
322       networks:
323         - port: { get_resource: lb_1_int_oam_int_0_port }
324         - port: { get_resource: lb_1_lb1_gwaf_int_1_port }
325         - port: { get_resource: lb_1_oam_protected_2_port }
326       metadata:
327         vnf_id: { get_param: vnf_id }
328         vf_module_id:  { get_param: vf_module_id }
329       user_data:
330         str_replace:
331           template: |
332             #!/bin/bash
333             sudo ip route del default
334             sudo route add -net 0.0.0.0 netmask 0.0.0.0 gw $oam_gw   
335           params:
336             $oam_gw: { get_param: oam_gw  }