push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / resourceGroupIndexVar / 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     vnfci:
146       type: org.openecomp.resource.vfc.nodes.heat.vnfci
147       properties:
148         flavor:
149           get_input: flavor
150         key_name:
151           get_input: key_name
152         availability_zone:
153           Fn::Select:
154           - get_input: indx
155           - get_input:
156             - availability_zone_0
157         name:
158           str_replace:
159             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
160             params:
161               $VF_NAME:
162                 get_input: vf_name
163               $CLOUD_ZONE_ID:
164                 get_input: cloud_zone_id
165               $VM_INSTANCE_NUM:
166                 Fn::Select:
167                 - get_input: indx
168                 - get_input:
169                   - vm_instance_num
170               $VF_COMPONENT:
171                 get_input: vf_component
172               $VF_INSTANCE_NUM:
173                 get_input: vf_instance_num
174     mgmt_port:
175       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
176       properties:
177         security_groups:
178         - get_input: sec_groups
179         fixed_ips:
180         - ip_address:
181             Fn::Select:
182             - get_input: indx
183             - get_input:
184               - get_input: mvs_mgmt_ip_0
185         allowed_address_pairs:
186         - ip_address:
187             get_input: virtual_mgmt_ip_0
188         name:
189           str_replace:
190             template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
191             params:
192               $VF_NAME:
193                 get_input: vf_name
194               $CLOUD_ZONE_ID:
195                 get_input: cloud_zone_id
196               $VM_INSTANCE_NUM:
197                 Fn::Select:
198                 - get_input: indx
199                 - get_input:
200                   - vm_instance_num
201               $VF_COMPONENT:
202                 get_input: vf_component
203               $VF_INSTANCE_NUM:
204                 get_input: vf_instance_num
205         network:
206           get_input: mgmt_net_id
207       requirements:
208       - binding:
209           capability: tosca.capabilities.network.Bindable
210           node: vnfci
211           relationship: tosca.relationships.network.BindsTo
212   groups:
213     mvs.nested.heat:
214       type: org.openecomp.groups.heat.HeatStack
215       properties:
216         heat_file: ../Artifacts/mvs.nested.heat.yaml
217         description: |
218           Metaswitch MVS (Metaview Server)
219       members:
220       - vnfci
221       - mgmt_port
222   outputs:
223     vnfci_id_2:
224       value: vnfci
225     vnfci_id_1:
226       value: vnfci
227   substitution_mappings:
228     node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
229     capabilities:
230       os_vnfci:
231       - vnfci
232       - os
233       attachment_mgmt_port:
234       - mgmt_port
235       - attachment
236       endpoint_vnfci:
237       - vnfci
238       - endpoint
239       host_vnfci:
240       - vnfci
241       - host
242       binding_vnfci:
243       - vnfci
244       - binding
245       scalable_vnfci:
246       - vnfci
247       - scalable
248     requirements:
249       local_storage_vnfci:
250       - vnfci
251       - local_storage
252       link_mgmt_port:
253       - mgmt_port
254       - link