611052d78784a9aa7df31f4999bf12a9b9094b54
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / unifiedComposition / creSubstitutionServiceTemplate / WithOutputParameters / 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         network: Internal2-net
113       requirements:
114       - binding:
115           capability: tosca.capabilities.network.Bindable
116           node: FSB1_template
117           relationship: tosca.relationships.network.BindsTo
118     FSB2_Internal1:
119       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
120       properties:
121         mac_address:
122           get_input: fsb1-Internal2-mac
123       requirements:
124       - binding:
125           capability: tosca.capabilities.network.Bindable
126           node: FSB2_template
127           relationship: tosca.relationships.network.BindsTo
128     FSB1_Internal1:
129       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
130       properties:
131         mac_address:
132           get_input: fsb1-Internal1-mac
133         network: Internal1-net
134       requirements:
135       - binding:
136           capability: tosca.capabilities.network.Bindable
137           node: FSB1_template
138           relationship: tosca.relationships.network.BindsTo
139       - link:
140           capability: tosca.capabilities.network.Linkable
141           node: jsa_net1
142           relationship: tosca.relationships.network.LinksTo
143     FSB1_Internal2:
144       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
145       properties:
146         mac_address:
147           get_input: fsb1-Internal1-mac
148         network: Internal1-net
149       requirements:
150       - binding:
151           capability: tosca.capabilities.network.Bindable
152           node: FSB2_template
153           relationship: tosca.relationships.network.BindsTo
154       - link:
155           capability: tosca.capabilities.network.Linkable
156           node: jsa_net1
157           relationship: tosca.relationships.network.LinksTo
158     jsa_net1:
159       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
160       properties:
161         shared: true
162         network_name:
163          get_attribute:
164           - FSB1_Internal1
165           - network_id
166         dhcp_agent_ids:
167          get_attribute:
168           - FSB1_template
169           - addresses
170         tenant_id:
171          get_attribute:
172           - FSB2_Internal2
173           - network_id
174         qos_policy:
175          get_attribute:
176           - FSB2_Internal2
177           - network_id
178     FSB1_template:
179       type: org.openecomp.resource.vfc.nodes.heat.FSB1
180       properties:
181         flavor:
182           get_input: fsb1-flavor
183         metadata:
184           write_files:
185           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
186             permissions: '0644'
187             content:
188               str_replace:
189                 template:
190                   get_artifact:
191                   - SELF
192                   - nimbus-ethernet
193                 params:
194                   $dev: eth0
195                   $netmask:
196                     get_input: cps_net_mask
197                   $ip:
198                     get_input: cps_net_ip
199           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
200             permissions: '0644'
201             content:
202               str_replace:
203                 template:
204                   get_artifact:
205                   - SELF
206                   - nimbus-ethernet-gw
207                 params:
208                   $dev: eth1
209                   $netmask:
210                     get_input: oam_net_mask
211                   $gateway:
212                     get_input: oam_net_gw
213                   $ip:
214                     get_input: oam_net_ip
215         name:
216           get_input: fsb1-name
217       artifacts:
218         nimbus-ethernet-gw:
219           type: tosca.artifacts.Deployment
220           file: ../Artifacts/nimbus-ethernet-gw
221         nimbus-ethernet:
222           type: tosca.artifacts.Deployment
223           file: ../Artifacts/nimbus-ethernet
224       requirements:
225       - local_storage:
226           capability: tosca.capabilities.Attachment
227           node: cmaui_volume1
228           relationship: cmaui_volume_attachment
229       - local_storage:
230           capability: tosca.capabilities.Attachment
231           node: cmaui_volume2
232           relationship: cmaui_volume_attachment
233     FSB2_template:
234       type: org.openecomp.resource.vfc.nodes.heat.FSB1
235       properties:
236         flavor:
237           get_input: fsb1-flavor
238         availability_zone:
239           get_input: fsb_zone
240         name:
241           get_input: fsb1-name
242       artifacts:
243         nimbus-ethernet-gw:
244           type: tosca.artifacts.Deployment
245           file: ../Artifacts/nimbus-ethernet-gw
246         nimbus-ethernet:
247           type: tosca.artifacts.Deployment
248           file: ../Artifacts/nimbus-ethernet
249       requirements:
250       - local_storage:
251           capability: tosca.capabilities.Attachment
252           node: cmaui_volume1
253           relationship: cmaui_volume_attachment
254       - local_storage:
255           capability: tosca.capabilities.Attachment
256           node: cmaui_volume2
257           relationship: cmaui_volume_attachment
258     cmaui_volume1:
259       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
260       properties:
261         volume_type: {get_attribute: [ FSB1_template, addresses, {get_attribute: [ FSB2_Internal2,index ] } ]}
262         size: { get_attribute: [FSB1_Internal1, addresses, get_input: [CMAUI_volume_type,{get_attribute: [FSB1_Internal2,oam_index ] }], 0, "OS-EXT-IPS-MAC:mac_addr"] }
263     cmaui_volume2:
264       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
265       properties:
266         volume_type:
267           get_input: CMAUI_volume_type
268         size: { get_input: [a, addresses, get_input: [CMAUI_volume_type, {get_attribute: [FSB1_template,accessIPv6 ] }], 0, "OS-EXT-IPS-MAC:mac_addr"] }
269     cmaui_volume3:
270       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
271       properties:
272         volume_type: {get_attribute: [ FSB2_template, addresses, {get_attribute: [ FSB2_Internal1,index ] } ]}
273         size: { get_attribute: [FSB1_Internal2, addresses, get_input: [CMAUI_volume_type,{get_attribute: [FSB2_template,oam_index ] }], 0, "OS-EXT-IPS-MAC:mac_addr"] }
274   groups:
275     ep-jsa_net_group:
276       type: org.openecomp.groups.heat.HeatStack
277       properties:
278         heat_file: ../Artifacts/ep-jsa_net.yaml
279         description: |
280           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
281       members:
282       - FSB2_Internal2
283       - FSB2_Internal1
284       - FSB1_Internal1
285       - FSB1_Internal2
286       - FSB1_template
287       - FSB2_template