[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 / VlanToNetConnection / shared / inputfiles / nested1.yml
1 heat_template_version: 2013-05-23
2
3 description: cmaui server template for vMMSC
4
5 parameters:
6   shared_network_id1:
7     type: string
8     description: UID of OAM network
9   p2:
10     type: string
11     description: UID of OAM network
12   cmaui_names:
13     type: comma_delimited_list
14     description: CMAUI1, CMAUI2 server names
15   abc_names:
16     type: comma_delimited_list
17     description: CMAUI1, CMAUI2 server names
18   security_group_name:
19     type: not_important
20     description: not impotrtant
21   cmaui_image:
22     type: string
23     description: Image for CMAUI server
24   abc_image:
25     type: string
26     description: Image for CMAUI server
27   availability_zone_0:
28     type: string
29     label: availabilityzone name
30     description: availabilityzone name
31   cmaui_flavor:
32     type: string
33     description: Flavor for CMAUI server
34   abc_flavor:
35     type: string
36     description: Flavor for CMAUI server
37   cmaui_oam_ips:
38     type: string
39   abc_oam_ips:
40     type: string
41   oam_sec_group_name:
42     type: string
43   lb_st_interface_type_oam:
44     type: string
45   template_PortTuple_LB1:
46     type: string
47   lb_st_vlan_type_oam:
48     description: dummy
49     type: string
50   mac_address:
51     type: string
52   virtual_ip_address:
53     type: string
54   virtual_ipv6_address:
55     type: string
56   vlan_ids:
57     type: string
58   subinterface_name_prefix:
59     type: string
60   subinterface_instance_index:
61     type: number
62 resources:
63
64   template_VMInt_OAM_lb_1:
65     type: OS::ContrailV2::VirtualMachineInterface
66     properties:
67       virtual_machine_interface_properties:
68         {
69           virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
70         }
71       virtual_network_refs: [{ get_param: shared_network_id1 }]
72       port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
73       security_group_refs: [{ get_param: oam_sec_group_name}]
74
75   template_Vlan_1:
76     type: OS::ContrailV2::VirtualMachineInterface
77     properties:
78       name:
79         str_replace:
80           template: $NAME$VLAN
81           params:
82             $NAME: { get_param: subinterface_name_prefix }
83             $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] }
84       virtual_machine_interface_properties:
85         {
86           virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam }
87         }
88       virtual_machine_interface_mac_addresses:
89         {
90         virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }],
91         }
92       virtual_machine_interface_allowed_address_pairs:
93         {
94         virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [
95             {
96               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
97               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
98               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
99               {
100                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address },
101                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
102               }
103             },
104             {
105               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
106               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
107               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
108               {
109                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address },
110                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
111               }
112             }
113           ]
114         }
115       virtual_network_refs: [{ get_param: shared_network_id1 }]
116       virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_1 }]
117
118   template_VMInt_OAM_lb_2:
119     type: OS::ContrailV2::VirtualMachineInterface
120     properties:
121       virtual_machine_interface_properties:
122         {
123           virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
124         }
125       virtual_network_refs: [{ get_param: p2 }]
126       port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
127       security_group_refs: [{ get_param: oam_sec_group_name}]
128
129   template_Vlan_2:
130     type: OS::ContrailV2::VirtualMachineInterface
131     properties:
132       name:
133         str_replace:
134           template: $NAME$VLAN
135           params:
136             $NAME: { get_param: subinterface_name_prefix }
137             $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] }
138       virtual_machine_interface_properties:
139         {
140           virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam }
141         }
142       virtual_machine_interface_mac_addresses:
143         {
144         virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }],
145         }
146       virtual_machine_interface_allowed_address_pairs:
147         {
148         virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [
149             {
150               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
151               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
152               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
153               {
154                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address },
155                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
156               }
157             },
158             {
159               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
160               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
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: virtual_ipv6_address },
164                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
165               }
166             }
167           ]
168         }
169       virtual_network_refs: [{ get_param: p2 }]
170       virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_2 }]
171
172   template_VMInt_OAM_lb_3:
173     type: OS::ContrailV2::VirtualMachineInterface
174     properties:
175       virtual_machine_interface_properties:
176         {
177           virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
178         }
179       virtual_network_refs: [{ get_param: p2 },{ get_param: shared_network_id1 }]
180       port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
181       security_group_refs: [{ get_param: oam_sec_group_name}]
182
183   template_Vlan_3:
184     type: OS::ContrailV2::VirtualMachineInterface
185     properties:
186       name:
187         str_replace:
188           template: $NAME$VLAN
189           params:
190             $NAME: { get_param: subinterface_name_prefix }
191             $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] }
192       virtual_machine_interface_properties:
193         {
194           virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam }
195         }
196       virtual_machine_interface_mac_addresses:
197         {
198         virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }],
199         }
200       virtual_machine_interface_allowed_address_pairs:
201         {
202         virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [
203             {
204               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
205               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
206               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
207               {
208                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address },
209                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
210               }
211             },
212             {
213               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby,
214               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address },
215               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
216               {
217                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address },
218                 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
219               }
220             }
221           ]
222         }
223       virtual_network_refs: [{ get_param: p2 },{ get_param: shared_network_id1 }]
224       virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_3 }]
225
226   abc_port_1:
227     type: OS::Neutron::Port
228     properties:
229       network: { get_param: p2 }
230       fixed_ips: [{"ip_address": {get_param: [abc_oam_ips, 0]}}]
231       security_groups: [{get_param: security_group_name}]
232       replacement_policy: AUTO
233
234   server_cmaui:
235     type: OS::Nova::Server
236     properties:
237       name: { get_param: [cmaui_names, 0]}
238       image: { get_param: cmaui_image }
239       availability_zone: { get_param: availability_zone_0 }
240       flavor: { get_param: cmaui_flavor }
241       networks:
242       - port: { get_resource: template_VMInt_OAM_lb_1 }
243       - port: { get_resource: template_VMInt_OAM_lb_2 }
244       - port: { get_resource: template_VMInt_OAM_lb_3 }
245
246   server_abc:
247     type: OS::Nova::Server
248     properties:
249       name: { get_param: [abc_names, 0]}
250       image: { get_param: abc_image }
251       availability_zone: { get_param: availability_zone_0 }
252       flavor: { get_param: abc_flavor }
253       networks:
254       - port: { get_resource: abc_port_1 }