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