push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / porttocontrailv2virtualnetworkconnection / shared / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   ContrailComputeGlobalTypes:
6     file: ContrailComputeGlobalTypesServiceTemplate.yaml
7   CinderVolumeGlobalTypes:
8     file: CinderVolumeGlobalTypesServiceTemplate.yaml
9   ContrailVirtualNetworkGlobalType:
10     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
11   AbstractSubstituteGlobalTypes:
12     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
13   ContrailPortGlobalTypes:
14     file: ContrailPortGlobalTypesServiceTemplate.yaml
15   GlobalSubstitutionTypes:
16     file: GlobalSubstitutionTypesServiceTemplate.yaml
17   NeutronPortGlobalTypes:
18     file: NeutronPortGlobalTypesServiceTemplate.yaml
19   NeutronNetGlobalTypes:
20     file: NeutronNetGlobalTypesServiceTemplate.yaml
21   CommonGlobalTypes:
22     file: CommonGlobalTypesServiceTemplate.yaml
23   ContrailAbstractSubstituteGlobalTypes:
24     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
25   ContrailNetworkRuleGlobalType:
26     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
27   NeutronSecurityRulesGlobalTypes:
28     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
29   NovaServerGlobalTypes:
30     file: NovaServerGlobalTypesServiceTemplate.yaml
31   ContrailV2VirtualMachineInterfaceGlobalType:
32     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
33 topology_template:
34   inputs:
35     left_vn_fqdn:
36       hidden: false
37       immutable: false
38       type: string
39       description: dummy
40     Internal1_cidr:
41       hidden: false
42       immutable: false
43       type: string
44     src_port_start:
45       hidden: false
46       immutable: false
47       type: string
48       description: dummy
49     Internal1_default_gateway:
50       hidden: false
51       immutable: false
52       type: string
53     Internal1_dhcp:
54       hidden: false
55       immutable: false
56       type: string
57     src_port_end:
58       hidden: false
59       immutable: false
60       type: string
61       description: dummy
62     policy_name:
63       hidden: false
64       immutable: false
65       type: string
66       description: dummy
67     dst_port_end:
68       hidden: false
69       immutable: false
70       type: string
71       description: dummy
72     simple_action:
73       hidden: false
74       immutable: false
75       type: string
76       description: dummy
77     service_instance_fq_name:
78       hidden: false
79       immutable: false
80       type: string
81     jsa_net_name:
82       hidden: false
83       immutable: false
84       type: string
85       description: network name of jsa log network
86     Internal2_cidr:
87       hidden: false
88       immutable: false
89       type: string
90     protocol:
91       hidden: false
92       immutable: false
93       type: string
94       description: dummy
95     shared_network_id1:
96       hidden: false
97       immutable: false
98       type: string
99       description: network name of jsa log network
100     Internal2_dhcp:
101       hidden: false
102       immutable: false
103       type: string
104     shared_network_id2:
105       hidden: false
106       immutable: false
107       type: string
108       description: network name of jsa log network
109     dst_port_start:
110       hidden: false
111       immutable: false
112       type: string
113       description: dummy
114     network_ipam_refs_data_ipam_subnets_addr_from_start_true:
115       hidden: false
116       immutable: false
117       type: string
118       description: dummy
119     Internal2_default_gateway:
120       hidden: false
121       immutable: false
122       type: string
123     right_vn_fqdn:
124       hidden: false
125       immutable: false
126       type: string
127       description: dummy
128     network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
129       hidden: false
130       immutable: false
131       type: string
132       description: dummy
133     left_vn:
134       hidden: false
135       immutable: false
136       type: string
137       description: dummy
138     direction:
139       hidden: false
140       immutable: false
141       type: string
142       description: dummy
143     network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
144       hidden: false
145       immutable: false
146       type: string
147       description: dummy
148   node_templates:
149     template_NetworkPolicy:
150       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
151       properties:
152         name:
153           get_input: policy_name
154         network_policy_entries:
155           network_policy_entries_policy_rule:
156           - network_policy_entries_policy_rule_dst_addresses:
157             - network_policy_entries_policy_rule_dst_addresses_virtual_network:
158                 get_input: right_vn_fqdn
159             network_policy_entries_policy_rule_dst_ports:
160             - network_policy_entries_policy_rule_dst_ports_start_port:
161                 get_input: dst_port_start
162               network_policy_entries_policy_rule_dst_ports_end_port:
163                 get_input: dst_port_end
164             network_policy_entries_policy_rule_protocol:
165               get_input: protocol
166             network_policy_entries_policy_rule_src_addresses:
167             - network_policy_entries_policy_rule_src_addresses_virtual_network:
168                 get_input: left_vn_fqdn
169             network_policy_entries_policy_rule_direction:
170               get_input: direction
171             network_policy_entries_policy_rule_src_ports:
172             - network_policy_entries_policy_rule_src_ports_start_port:
173                 get_input: src_port_start
174               network_policy_entries_policy_rule_src_ports_end_port:
175                 get_input: src_port_end
176             network_policy_entries_policy_rule_action_list:
177               network_policy_entries_policy_rule_action_list_simple_action:
178                 get_input: simple_action
179               network_policy_entries_policy_rule_action_list_apply_service:
180               - get_input: service_instance_fq_name
181       requirements:
182       - network:
183           capability: tosca.capabilities.Attachment
184           node: test_net1
185           relationship: org.openecomp.relationships.AttachesTo
186       - network:
187           capability: tosca.capabilities.Attachment
188           node: test_net2
189           relationship: org.openecomp.relationships.AttachesTo
190     test_net2:
191       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
192       properties:
193         network_ipam_refs_data:
194         - network_ipam_refs_data_ipam_subnets:
195           - network_ipam_refs_data_ipam_subnets_subnet:
196               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
197                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
198               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
199                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
200             network_ipam_refs_data_ipam_subnets_addr_from_start:
201               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
202         network_policy_refs_data:
203         - network_policy_refs_data_sequence:
204             network_policy_refs_data_sequence_major: 0
205             network_policy_refs_data_sequence_minor: 0
206         network_name:
207           get_input: left_vn
208         network_ipam_refs:
209         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
210         network_policy_refs:
211         - list_join:
212           - ':'
213           - get_attribute:
214             - template_NetworkPolicy
215             - fq_name
216       requirements:
217       - dependency:
218           capability: tosca.capabilities.Node
219           node: template_NetworkPolicy
220           relationship: tosca.relationships.DependsOn
221     test_nested2:
222       type: org.openecomp.resource.abstract.nodes.heat.nested2
223       directives:
224       - substitutable
225       properties:
226         p1:
227           get_input: shared_network_id1
228         service_template_filter:
229           substitute_service_template: nested2ServiceTemplate.yaml
230       requirements:
231       - link_cmaui_port_1:
232           capability: tosca.capabilities.network.Linkable
233           node: test_net1
234           relationship: tosca.relationships.network.LinksTo
235     test_nested3:
236       type: org.openecomp.resource.abstract.nodes.heat.nested1
237       directives:
238       - substitutable
239       properties:
240         p1:
241           get_input: shared_network_id1
242         service_template_filter:
243           substitute_service_template: nested1ServiceTemplate.yaml
244         p2:
245           get_input: shared_network_id2
246       requirements:
247       - link_cmaui_port_2:
248           capability: tosca.capabilities.network.Linkable
249           node: test_net2
250           relationship: tosca.relationships.network.LinksTo
251       - link_abc_port_1:
252           capability: tosca.capabilities.network.Linkable
253           node: test_net2
254           relationship: tosca.relationships.network.LinksTo
255       - link_cmaui_port_1:
256           capability: tosca.capabilities.network.Linkable
257           node: test_net1
258           relationship: tosca.relationships.network.LinksTo
259     test_net1:
260       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
261       properties:
262         network_ipam_refs_data:
263         - network_ipam_refs_data_ipam_subnets:
264           - network_ipam_refs_data_ipam_subnets_subnet:
265               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
266                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
267               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
268                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
269             network_ipam_refs_data_ipam_subnets_addr_from_start:
270               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
271         network_policy_refs_data:
272         - network_policy_refs_data_sequence:
273             network_policy_refs_data_sequence_major: 0
274             network_policy_refs_data_sequence_minor: 0
275         network_name:
276           get_input: left_vn
277         network_ipam_refs:
278         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
279         network_policy_refs:
280         - list_join:
281           - ':'
282           - get_attribute:
283             - template_NetworkPolicy
284             - fq_name
285       requirements:
286       - dependency:
287           capability: tosca.capabilities.Node
288           node: template_NetworkPolicy
289           relationship: tosca.relationships.DependsOn
290     test_nested1:
291       type: org.openecomp.resource.abstract.nodes.heat.nested1
292       directives:
293       - substitutable
294       properties:
295         p1:
296           get_input: shared_network_id1
297         service_template_filter:
298           substitute_service_template: nested1ServiceTemplate.yaml
299         p2:
300           get_input: shared_network_id2
301       requirements:
302       - link_cmaui_port_2:
303           capability: tosca.capabilities.network.Linkable
304           node: test_net2
305           relationship: tosca.relationships.network.LinksTo
306       - link_abc_port_1:
307           capability: tosca.capabilities.network.Linkable
308           node: test_net2
309           relationship: tosca.relationships.network.LinksTo
310       - link_cmaui_port_1:
311           capability: tosca.capabilities.network.Linkable
312           node: test_net1
313           relationship: tosca.relationships.network.LinksTo
314   groups:
315     addOn:
316       type: org.openecomp.groups.heat.HeatStack
317       properties:
318         heat_file: ../Artifacts/addOn.yml
319         description: |
320           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
321       members:
322       - test_nested2
323       - test_nested3
324       - test_nested1
325     main:
326       type: org.openecomp.groups.heat.HeatStack
327       properties:
328         heat_file: ../Artifacts/main.yml
329         description: |
330           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
331       members:
332       - template_NetworkPolicy
333       - test_net2
334       - test_net1