push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / resource_group_with_dynamic_count / expectedoutputfiles / mvs.nested.heatServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: mvs.nested.heat
4 imports:
5   ContrailComputeGlobalTypes:
6     file: ContrailComputeGlobalTypesServiceTemplate.yaml
7   CinderVolumeGlobalTypes:
8     file: CinderVolumeGlobalTypesServiceTemplate.yaml
9   ContrailVirtualNetworkGlobalType:
10     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
11   AbstractSubstituteGlobalTypes:
12     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
13   ContrailPortGlobalTypes:
14     file: ContrailPortGlobalTypesServiceTemplate.yaml
15   GlobalSubstitutionTypes:
16     file: GlobalSubstitutionTypesServiceTemplate.yaml
17   NeutronPortGlobalTypes:
18     file: NeutronPortGlobalTypesServiceTemplate.yaml
19   NeutronNetGlobalTypes:
20     file: NeutronNetGlobalTypesServiceTemplate.yaml
21   CommonGlobalTypes:
22     file: CommonGlobalTypesServiceTemplate.yaml
23   ContrailAbstractSubstituteGlobalTypes:
24     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
25   ContrailNetworkRuleGlobalType:
26     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
27   NeutronSecurityRulesGlobalTypes:
28     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
29   NovaServerGlobalTypes:
30     file: NovaServerGlobalTypesServiceTemplate.yaml
31   ContrailV2VirtualMachineInterfaceGlobalType:
32     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
33 node_types:
34   org.openecomp.resource.vfc.nodes.heat.vnfci:
35     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
36 topology_template:
37   inputs:
38     vf_module_id:
39       hidden: false
40       immutable: false
41       type: string
42       description: Unique ID for this VF_MODULE instance
43     vf_name:
44       hidden: false
45       immutable: false
46       type: string
47       description: The VF Name; defaults to VMVM for the virtual MVM VNF.
48       constraints:
49       - pattern: '[a-zA-Z0-9]+'
50       - max_length: 4
51       - min_length: 4
52     cloud_zone_id:
53       hidden: false
54       immutable: false
55       type: string
56       description: The cloud zone for this VF instance
57     vf_instance_num:
58       hidden: false
59       immutable: false
60       type: string
61       description: The number for this VF instance
62       constraints:
63       - pattern: '[0-9]+'
64       - max_length: 2
65       - min_length: 2
66     virtual_mgmt_ip_0:
67       hidden: false
68       immutable: false
69       type: string
70       description: Virtual management network ip address
71     indx:
72       hidden: false
73       immutable: false
74       type: float
75       description: Index of the current instance
76     mvs_mgmt_ip_0:
77       hidden: false
78       immutable: false
79       type: list
80       description: List of Management network IP addresses for IPv4
81       entry_schema:
82         type: string
83     flavor:
84       hidden: false
85       immutable: false
86       type: string
87       description: Server flavor
88       constraints: [
89         ]
90     key_name:
91       hidden: false
92       immutable: false
93       type: string
94       description: SSH key name
95       constraints: [
96         ]
97     vnf_id:
98       hidden: false
99       immutable: false
100       type: string
101       description: Unique ID for this VF instance
102     availability_zone_0:
103       hidden: false
104       immutable: false
105       type: list
106       description: List of Availability Zone IDs or Names
107       entry_schema:
108         type: string
109     mgmt_net_id:
110       hidden: false
111       immutable: false
112       type: string
113       description: Neutron UUID for the Management network
114       constraints: [
115         ]
116     vm_instance_num:
117       hidden: false
118       immutable: false
119       type: list
120       description: VM instance number list must be a list of three-digit numeric value
121       entry_schema:
122         type: string
123     bootimage:
124       hidden: false
125       immutable: false
126       type: string
127       description: Master bootimage volume id
128     sec_groups:
129       hidden: false
130       immutable: false
131       type: list
132       description: Security groups
133       entry_schema:
134         type: string
135     vf_component:
136       hidden: false
137       immutable: false
138       type: string
139       description: The component that this VF instance is running
140       constraints:
141       - pattern: '[a-zA-Z0-9]+'
142       - max_length: 3
143       - min_length: 3
144   node_templates:
145     boot_volume:
146       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
147       properties:
148         availability_zone:
149           Fn::Select:
150           - get_input: indx
151           - get_input:
152             - availability_zone_0
153         image:
154           get_input: bootimage
155         size: 35*1024
156         name:
157           str_replace:
158             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
159             params:
160               $VF_NAME:
161                 get_input: vf_name
162               $CLOUD_ZONE_ID:
163                 get_input: cloud_zone_id
164               $VM_INSTANCE_NUM:
165                 Fn::Select:
166                 - get_input: indx
167                 - get_input:
168                   - vm_instance_num
169               $VF_COMPONENT:
170                 get_input: vf_component
171               $VF_INSTANCE_NUM:
172                 get_input: vf_instance_num
173     vnfci:
174       type: org.openecomp.resource.vfc.nodes.heat.vnfci
175       properties:
176         flavor:
177           get_input: flavor
178         key_name:
179           get_input: key_name
180         availability_zone:
181           Fn::Select:
182           - get_input: indx
183           - get_input:
184             - availability_zone_0
185         name:
186           str_replace:
187             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
188             params:
189               $VF_NAME:
190                 get_input: vf_name
191               $CLOUD_ZONE_ID:
192                 get_input: cloud_zone_id
193               $VM_INSTANCE_NUM:
194                 Fn::Select:
195                 - get_input: indx
196                 - get_input:
197                   - vm_instance_num
198               $VF_COMPONENT:
199                 get_input: vf_component
200               $VF_INSTANCE_NUM:
201                 get_input: vf_instance_num
202       requirements:
203       - local_storage:
204           capability: tosca.capabilities.Attachment
205           node: boot_volume
206           relationship: tosca.relationships.AttachesTo
207       - local_storage:
208           capability: tosca.capabilities.Attachment
209           node: data_volume
210           relationship: tosca.relationships.AttachesTo
211     data_volume:
212       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
213       properties:
214         availability_zone:
215           Fn::Select:
216           - get_input: indx
217           - get_input:
218             - availability_zone_0
219         size: 265*1024
220         name:
221           str_replace:
222             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
223             params:
224               $VF_NAME:
225                 get_input: vf_name
226               $CLOUD_ZONE_ID:
227                 get_input: cloud_zone_id
228               $VM_INSTANCE_NUM:
229                 Fn::Select:
230                 - get_input: indx
231                 - get_input:
232                   - vm_instance_num
233               $VF_COMPONENT:
234                 get_input: vf_component
235               $VF_INSTANCE_NUM:
236                 get_input: vf_instance_num
237     mgmt_port:
238       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
239       properties:
240         security_groups:
241         - get_input: sec_groups
242         fixed_ips:
243         - ip_address:
244             Fn::Select:
245             - get_input: indx
246             - get_input:
247               - get_input: mvs_mgmt_ip_0
248         allowed_address_pairs:
249         - ip_address:
250             get_input: virtual_mgmt_ip_0
251         name:
252           str_replace:
253             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
254             params:
255               $VF_NAME:
256                 get_input: vf_name
257               $CLOUD_ZONE_ID:
258                 get_input: cloud_zone_id
259               $VM_INSTANCE_NUM:
260                 Fn::Select:
261                 - get_input: indx
262                 - get_input:
263                   - vm_instance_num
264               $VF_COMPONENT:
265                 get_input: vf_component
266               $VF_INSTANCE_NUM:
267                 get_input: vf_instance_num
268         network:
269           get_input: mgmt_net_id
270       requirements:
271       - binding:
272           capability: tosca.capabilities.network.Bindable
273           node: vnfci
274           relationship: tosca.relationships.network.BindsTo
275   groups:
276     mvs.nested.heat:
277       type: org.openecomp.groups.heat.HeatStack
278       properties:
279         heat_file: ../Artifacts/mvs.nested.heat.yaml
280         description: |
281           Metaswitch MVS (Metaview Server)
282       members:
283       - boot_volume
284       - vnfci
285       - data_volume
286       - mgmt_port
287   substitution_mappings:
288     node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
289     capabilities:
290       os_vnfci:
291       - vnfci
292       - os
293       attachment_mgmt_port:
294       - mgmt_port
295       - attachment
296       endpoint_vnfci:
297       - vnfci
298       - endpoint
299       host_vnfci:
300       - vnfci
301       - host
302       binding_vnfci:
303       - vnfci
304       - binding
305       attachment_boot_volume:
306       - boot_volume
307       - attachment
308       scalable_vnfci:
309       - vnfci
310       - scalable
311       attachment_data_volume:
312       - data_volume
313       - attachment
314     requirements:
315       local_storage_vnfci:
316       - vnfci
317       - local_storage
318       link_mgmt_port:
319       - mgmt_port
320       - link