[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 / unifiedComposition / cleanMainSt / consolidation / in / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5 - openecomp_heat_index:
6     file: openecomp-heat/_index.yml
7 node_types:
8   org.openecomp.resource.vfc.nodes.heat.FSB1:
9     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
10 topology_template:
11   inputs:
12     fsb1-name:
13       label: FSB1_name
14       hidden: false
15       immutable: false
16       type: string
17       description: FSB1_name
18     fsb1-Internal1-mac:
19       label: FSB1_internal_mac
20       hidden: false
21       immutable: false
22       type: string
23       description: FSB1_internal_mac
24     cps_net_mask:
25       hidden: false
26       immutable: false
27       type: string
28       description: prop
29     fsb1-flavor:
30       label: FSB1_flavor
31       hidden: false
32       immutable: false
33       type: string
34       description: FSB1_flavor
35     fsb1-Internal2-mac:
36       label: FSB1_internal_mac
37       hidden: false
38       immutable: false
39       type: string
40       description: FSB1_internal_mac
41     volume_type:
42       label: volume type
43       hidden: false
44       immutable: false
45       type: string
46       description: volume type Gold
47     fsb_zone:
48       label: FSB1_zone
49       hidden: false
50       immutable: false
51       type: string
52       description: FSB1_zone
53     oam_net_gw:
54       hidden: false
55       immutable: false
56       type: string
57       description: prop
58     network_name:
59       hidden: false
60       immutable: false
61       type: string
62       description: prop
63     cps_net_ip:
64       hidden: false
65       immutable: false
66       type: string
67       description: prop
68     jsa_net_name:
69       label: jsa_net_name
70       hidden: false
71       immutable: false
72       type: string
73       description: jsa_net_name
74       default: jsa_log_net_0
75     pcrf_psm_server_name:
76       label: pcrf_psm_server_name
77       hidden: false
78       immutable: false
79       type: string
80       description: pcrf_psm_server_name
81     pcm_flavor_name:
82       label: pcm_flavor_name
83       hidden: false
84       immutable: false
85       type: string
86       description: pcm_flavor_name
87     oam_net_id:
88       label: oam_net_id
89       hidden: false
90       immutable: false
91       type: string
92       description: oam_net_id
93     oam_net_ip:
94       hidden: false
95       immutable: false
96       type: string
97       description: prop
98     oam_net_mask:
99       hidden: false
100       immutable: false
101       type: string
102       description: prop
103     fsb1-oam-ip:
104       hidden: false
105       immutable: false
106       type: string
107       description: prop
108   node_templates:
109     FSB2_Internal2:
110       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
111       properties:
112         mac_address:
113           get_input: fsb1-Internal2-mac
114         network: Internal2-net
115       requirements:
116       - binding:
117           capability: tosca.capabilities.network.Bindable
118           node: FSB1_template
119           relationship: tosca.relationships.network.BindsTo
120     FSB2_Internal1:
121       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
122       properties:
123         mac_address:
124           get_input: fsb1-Internal2-mac
125         network: Internal2-net
126       requirements:
127       - binding:
128           capability: tosca.capabilities.network.Bindable
129           node: FSB2_template
130           relationship: tosca.relationships.network.BindsTo
131     FSB1_Internal1:
132       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
133       properties:
134         mac_address:
135           get_input: fsb1-Internal1-mac
136         network: Internal1-net
137       requirements:
138       - binding:
139           capability: tosca.capabilities.network.Bindable
140           node: FSB1_template
141           relationship: tosca.relationships.network.BindsTo
142       - link:
143           capability: tosca.capabilities.network.Linkable
144           node: jsa_net1
145           relationship: tosca.relationships.network.LinksTo
146     FSB1_Internal2:
147       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
148       properties:
149         mac_address:
150           get_input: fsb1-Internal1-mac
151         network: Internal1-net
152       requirements:
153       - binding:
154           capability: tosca.capabilities.network.Bindable
155           node: FSB2_template
156           relationship: tosca.relationships.network.BindsTo
157       - link:
158           capability: tosca.capabilities.network.Linkable
159           node: jsa_net1
160           relationship: tosca.relationships.network.LinksTo
161     jsa_net1:
162       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
163       properties:
164         shared: true
165         network_name:
166          get_attribute:
167           - FSB1_Internal1
168           - network_id
169         dhcp_agent_ids:
170          get_attribute:
171           - FSB1_template
172           - addresses
173         tenant_id:
174          get_attribute:
175           - FSB2_Internal2
176           - network_id
177         qos_policy:
178          get_attribute:
179           - FSB2_Internal2
180           - network_id
181     FSB1_template:
182       type: org.openecomp.resource.vfc.nodes.heat.FSB1
183       properties:
184         flavor:
185           get_input: fsb1-flavor
186         availability_zone:
187           get_input: fsb_zone
188         metadata:
189           write_files:
190           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
191             permissions: '0644'
192             content:
193               str_replace:
194                 template:
195                   get_artifact:
196                   - SELF
197                   - nimbus-ethernet
198                 params:
199                   $dev: eth0
200                   $netmask:
201                     get_input: cps_net_mask
202                   $ip:
203                     get_input: cps_net_ip
204           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
205             permissions: '0644'
206             content:
207               str_replace:
208                 template:
209                   get_artifact:
210                   - SELF
211                   - nimbus-ethernet-gw
212                 params:
213                   $dev: eth1
214                   $netmask:
215                     get_input: oam_net_mask
216                   $gateway:
217                     get_input: oam_net_gw
218                   $ip:
219                     get_input: oam_net_ip
220         name:
221           get_input: fsb1-name
222       artifacts:
223         nimbus-ethernet-gw:
224           type: tosca.artifacts.Deployment
225           file: ../Artifacts/nimbus-ethernet-gw
226         nimbus-ethernet:
227           type: tosca.artifacts.Deployment
228           file: ../Artifacts/nimbus-ethernet
229       requirements:
230       - local_storage:
231           capability: tosca.capabilities.Attachment
232           node: cmaui_volume1
233           relationship: cmaui_volume_attachment
234       - local_storage:
235           capability: tosca.capabilities.Attachment
236           node: cmaui_volume2
237           relationship: cmaui_volume_attachment
238     FSB2_template:
239       type: org.openecomp.resource.vfc.nodes.heat.FSB1
240       properties:
241         flavor:
242           get_input: fsb1-flavor
243         availability_zone:
244           get_input: fsb_zone
245         metadata:
246           write_files:
247           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
248             permissions: '0644'
249             content:
250               str_replace:
251                 template:
252                   get_artifact:
253                   - SELF
254                   - nimbus-ethernet
255                 params:
256                   $dev: eth0
257                   $netmask:
258                     get_input: cps_net_mask
259                   $ip:
260                     get_input: cps_net_ip
261           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
262             permissions: '0644'
263             content:
264               str_replace:
265                 template:
266                   get_artifact:
267                   - SELF
268                   - nimbus-ethernet-gw
269                 params:
270                   $dev: eth1
271                   $netmask:
272                     get_input: oam_net_mask
273                   $gateway:
274                     get_input: oam_net_gw
275                   $ip:
276                     get_input: oam_net_ip
277         name:
278           get_input: fsb1-name
279       artifacts:
280         nimbus-ethernet-gw:
281           type: tosca.artifacts.Deployment
282           file: ../Artifacts/nimbus-ethernet-gw
283         nimbus-ethernet:
284           type: tosca.artifacts.Deployment
285           file: ../Artifacts/nimbus-ethernet
286       requirements:
287       - local_storage:
288           capability: tosca.capabilities.Attachment
289           node: cmaui_volume1
290           relationship: cmaui_volume_attachment
291       - local_storage:
292           capability: tosca.capabilities.Attachment
293           node: cmaui_volume2
294           relationship: cmaui_volume_attachment
295     cmaui_volume1:
296       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
297       properties:
298         volume_type:
299           get_input: CMAUI_volume_type
300         size: '(get_input : cmaui_cinder_volume_size) * 1024'
301     cmaui_volume2:
302       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
303       properties:
304         volume_type:
305           get_input: CMAUI_volume_type
306         size: '(get_input : cmaui_cinder_volume_size) * 1024'
307   groups:
308     ep-jsa_net_group:
309       type: org.openecomp.groups.heat.HeatStack
310       properties:
311         heat_file: ../Artifacts/ep-jsa_net.yaml
312         description: |
313           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
314       members:
315       - FSB2_Internal2
316       - FSB2_Internal1
317       - FSB1_Internal1
318       - FSB1_Internal2
319       - FSB1_template
320       - FSB2_template
321   outputs:
322     simpleOutput1:
323        value: {get_attribute: [ FSB1_template, accessIPv4 ] }
324     simpleOutput2:
325        value: {get_attribute: [ FSB2_template, addresses, key1 ] }
326     complexOutput1:
327       value: {get_attribute: [ FSB1_template, addresses, {get_attribute: [ FSB2_Internal2,index ] } ]}
328     complexOutput2:
329       description:  cgi fw01 left interface Mac-Address
330       value: { get_attribute: [FSB1_Internal2, addresses, get_input: [CMAUI_volume_type, {get_attribute: [FSB2_Internal1,oam_index ] }], 0, "OS-EXT-IPS-MAC:mac_addr"] }
331     complexOutput3:
332       description:  cgi fw01 left interface Mac-Address
333       value: { get_input: [a, addresses, get_input: [CMAUI_volume_type, {get_attribute:  [FSB1_Internal1,accessIPv6 ] }], 0, "OS-EXT-IPS-MAC:mac_addr"] }