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