push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / novatovolumemulticonnection / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   NeutronPortGlobalTypes:
6     file: NeutronPortGlobalTypesServiceTemplate.yaml
7   NeutronNetGlobalTypes:
8     file: NeutronNetGlobalTypesServiceTemplate.yaml
9   CommonGlobalTypes:
10     file: CommonGlobalTypesServiceTemplate.yaml
11   CinderVolumeGlobalTypes:
12     file: CinderVolumeGlobalTypesServiceTemplate.yaml
13   ContrailNetworkRuleGlobalType:
14     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
15   NeutronSecurityRulesGlobalTypes:
16     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
17   NovaServerGlobalTypes:
18     file: NovaServerGlobalTypesServiceTemplate.yaml
19   ContrailVirtualNetworkGlobalType:
20     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
21   AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 node_types:
24   org.openecomp.resource.vfc.nodes.heat.cmaui_image:
25     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
26 topology_template:
27   inputs:
28     cmaui_names:
29       hidden: false
30       immutable: false
31       type: list
32       description: CMAUI1, CMAUI2 server names
33       entry_schema:
34         type: String
35     cmaui_cinder_volume_size:
36       label: CMAUI Cinder volume size
37       hidden: false
38       immutable: false
39       type: float
40       description: the size of the CMAUI Cinder volume
41     timezone:
42       label: timezone
43       hidden: false
44       immutable: false
45       type: string
46       description: timezone
47     security_group_name:
48       label: security group name
49       hidden: false
50       immutable: false
51       type: string
52       description: the name of security group
53     cmaui_volume:
54       label: CMAUI vm volume type
55       hidden: false
56       immutable: false
57       type: string
58       description: the name of the target volume backend
59     oam_network_netmask:
60       label: oam network netmask
61       hidden: false
62       immutable: false
63       type: string
64       description: oam network gateway
65     cmaui_volume_param1:
66       hidden: false
67       immutable: false
68       type: string
69       description: nova server id
70     cmaui_image:
71       hidden: false
72       immutable: false
73       type: string
74       description: Image for CMAUI server
75     vnf_id:
76       hidden: false
77       immutable: false
78       type: string
79       description: Unique ID for this VNF instance
80       default: This_is_ths_MMSC-CMAUI_id
81     cmaui_flavor:
82       hidden: false
83       immutable: false
84       type: string
85       description: Flavor for CMAUI server
86     oam_network_gateway:
87       label: oam network gateway
88       hidden: false
89       immutable: false
90       type: string
91       description: oam network gateway
92     cmaui_volume_param2:
93       hidden: false
94       immutable: false
95       type: string
96       description: nova server id
97     availability_zone_0:
98       label: availabilityzone name
99       hidden: false
100       immutable: false
101       type: string
102       description: availabilityzone name
103     cmaui_oam_ips:
104       label: CMAUI oam_net IP addresses
105       hidden: false
106       immutable: false
107       type: list
108       description: CMAUI oam_net IP addresses
109       entry_schema:
110         type: String
111     external_dns:
112       label: dns server
113       hidden: false
114       immutable: false
115       type: string
116       description: dns server
117     oam_net_name:
118       hidden: false
119       immutable: false
120       type: string
121       description: UID of OAM network
122     CMAUI_volume_type:
123       label: CMAUI vm volume type
124       hidden: false
125       immutable: false
126       type: string
127       description: the name of the target volume backend
128     external_ntp:
129       label: ntp server
130       hidden: false
131       immutable: false
132       type: string
133       description: ntp server
134   node_templates:
135     cmaui_port_2:
136       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
137       properties:
138         replacement_policy: AUTO
139         security_groups:
140         - get_input: security_group_name
141         fixed_ips:
142         - ip_address:
143             get_input:
144             - cmaui_oam_ips
145             - 0
146         network:
147           get_input: oam_net_name
148       requirements:
149       - binding:
150           capability: tosca.capabilities.network.Bindable
151           node: server_cmaui2
152           relationship: tosca.relationships.network.BindsTo
153     server_cmaui2:
154       type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
155       properties:
156         flavor:
157           get_input: cmaui_flavor
158         availability_zone:
159           get_input: availability_zone_0
160         image:
161           get_input: cmaui_image
162         metadata:
163           vnf_id:
164             get_input: vnf_id
165         user_data_format: RAW
166         name:
167           get_input:
168           - cmaui_names
169           - 0
170         user_data:
171           str_replace:
172             template: |
173               cmaui.mgmt.ip=${cmaui.mgmt.ip}
174               cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
175               cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
176               cmaui.external.dns=${cmaui.external.dns}
177               cmaui.external.ntp=${cmaui.external.ntp}
178               cmaui.node=${cmaui.node}
179               cmaui.timezone=${cmaui.timezone}
180             params:
181               ${cmaui.mgmt.netmask}:
182                 get_input: oam_network_netmask
183               ${cmaui.node}:
184                 get_input:
185                 - cmaui_names
186                 - 0
187               ${cmaui.mgmt.gateway}:
188                 get_input: oam_network_gateway
189               ${cmaui.mgmt.ip}:
190                 get_input:
191                 - cmaui_oam_ips
192                 - 0
193               ${cmaui.external.ntp}:
194                 get_input: external_ntp
195               ${cmaui.timezone}:
196                 get_input: timezone
197               ${cmaui.external.dns}:
198                 get_input: external_dns
199       requirements:
200       - local_storage:
201           capability: tosca.capabilities.Attachment
202           node: cmaui_volume2
203           relationship: cmaui_volume_attachment3
204     server_cmaui1:
205       type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
206       properties:
207         flavor:
208           get_input: cmaui_flavor
209         availability_zone:
210           get_input: availability_zone_0
211         image:
212           get_input: cmaui_image
213         metadata:
214           vnf_id:
215             get_input: vnf_id
216         user_data_format: RAW
217         name:
218           get_input:
219           - cmaui_names
220           - 0
221         user_data:
222           str_replace:
223             template: |
224               cmaui.mgmt.ip=${cmaui.mgmt.ip}
225               cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
226               cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
227               cmaui.external.dns=${cmaui.external.dns}
228               cmaui.external.ntp=${cmaui.external.ntp}
229               cmaui.node=${cmaui.node}
230               cmaui.timezone=${cmaui.timezone}
231             params:
232               ${cmaui.mgmt.netmask}:
233                 get_input: oam_network_netmask
234               ${cmaui.node}:
235                 get_input:
236                 - cmaui_names
237                 - 0
238               ${cmaui.mgmt.gateway}:
239                 get_input: oam_network_gateway
240               ${cmaui.mgmt.ip}:
241                 get_input:
242                 - cmaui_oam_ips
243                 - 0
244               ${cmaui.external.ntp}:
245                 get_input: external_ntp
246               ${cmaui.timezone}:
247                 get_input: timezone
248               ${cmaui.external.dns}:
249                 get_input: external_dns
250       requirements:
251       - local_storage:
252           capability: tosca.capabilities.Attachment
253           node: cmaui_volume1
254           relationship: cmaui_volume_attachment1
255       - local_storage:
256           capability: tosca.capabilities.Attachment
257           node: cmaui_volume2
258           relationship: cmaui_volume_attachment2
259     cmaui_volume1:
260       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
261       properties:
262         volume_type:
263           get_input: CMAUI_volume_type
264         size: '(get_input : cmaui_cinder_volume_size) * 1024'
265     cmaui_volume2:
266       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
267       properties:
268         volume_type:
269           get_input: CMAUI_volume_type
270         size: '(get_input : cmaui_cinder_volume_size) * 1024'
271     cmaui_port_1:
272       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
273       properties:
274         replacement_policy: AUTO
275         security_groups:
276         - get_input: security_group_name
277         fixed_ips:
278         - ip_address:
279             get_input:
280             - cmaui_oam_ips
281             - 0
282         network:
283           get_input: oam_net_name
284       requirements:
285       - binding:
286           capability: tosca.capabilities.network.Bindable
287           node: server_cmaui1
288           relationship: tosca.relationships.network.BindsTo
289   relationship_templates:
290     cmaui_volume_attachment2:
291       type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
292       properties:
293         volume_id:
294           get_input: cmaui_volume_param2
295         instance_uuid: server_cmaui1
296     cmaui_volume_attachment3:
297       type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
298       properties:
299         volume_id:
300           get_input: cmaui_volume_param2
301         instance_uuid: server_cmaui2
302     cmaui_volume_attachment1:
303       type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
304       properties:
305         volume_id:
306           get_input: cmaui_volume_param1
307         instance_uuid: server_cmaui1
308   groups:
309     addOn:
310       type: org.openecomp.groups.heat.HeatStack
311       properties:
312         heat_file: ../Artifacts/addOn.yml
313         description: cmaui server template for vMMSC
314       members:
315       - cmaui_port_2
316       - server_cmaui2
317       - server_cmaui1
318       - cmaui_port_1
319     main:
320       type: org.openecomp.groups.heat.HeatStack
321       properties:
322         heat_file: ../Artifacts/main.yml
323         description: volume
324       members:
325       - cmaui_volume1
326       - cmaui_volume2