push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / securityrulestoportconnection / securityruletosharedportlinking / 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     security_group_name:
36       label: security group name
37       hidden: false
38       immutable: false
39       type: string
40       description: the name of security group
41     shared_security_group_id2:
42       hidden: false
43       immutable: false
44       type: string
45       description: network name of jsa log network
46     jsa_net_name:
47       hidden: false
48       immutable: false
49       type: string
50       description: network name of jsa log network
51     shared_security_group_id1:
52       hidden: false
53       immutable: false
54       type: string
55       description: network name of jsa log network
56   node_templates:
57     jsa_security_group1:
58       type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
59       properties:
60         name:
61           get_input: security_group_name
62         description: ems security group
63         rules:
64         - protocol: tcp
65           ethertype: IPv4
66           port_range_max: 65535
67           remote_ip_prefix: 0.0.0.0/0
68           direction: egress
69           port_range_min: 1
70         - protocol: udp
71           ethertype: IPv4
72           port_range_max: 65535
73           remote_ip_prefix: 0.0.0.0/0
74           direction: egress
75           port_range_min: 1
76         - protocol: icmp
77           ethertype: IPv4
78           remote_ip_prefix: 0.0.0.0/0
79           direction: egress
80         - protocol: tcp
81           ethertype: IPv6
82           port_range_max: 65535
83           remote_ip_prefix: ::/0
84           direction: egress
85           port_range_min: 1
86         - protocol: udp
87           ethertype: IPv6
88           port_range_max: 65535
89           remote_ip_prefix: ::/0
90           direction: egress
91           port_range_min: 1
92         - protocol: icmp
93           ethertype: IPv6
94           remote_ip_prefix: ::/0
95           direction: egress
96         - protocol: tcp
97           ethertype: IPv4
98           port_range_max: 65535
99           remote_ip_prefix: 0.0.0.0/0
100           direction: ingress
101           port_range_min: 1
102         - protocol: udp
103           ethertype: IPv4
104           port_range_max: 65535
105           remote_ip_prefix: 0.0.0.0/0
106           direction: ingress
107           port_range_min: 1
108         - protocol: icmp
109           ethertype: IPv4
110           remote_ip_prefix: 0.0.0.0/0
111           direction: ingress
112         - protocol: tcp
113           ethertype: IPv6
114           port_range_max: 65535
115           remote_ip_prefix: ::/0
116           direction: ingress
117           port_range_min: 1
118         - protocol: udp
119           ethertype: IPv6
120           port_range_max: 65535
121           remote_ip_prefix: ::/0
122           direction: ingress
123           port_range_min: 1
124         - protocol: icmp
125           ethertype: IPv6
126           remote_ip_prefix: ::/0
127           direction: ingress
128       requirements:
129       - port:
130           capability: attachment_cmaui_port_2
131           node: test_nested
132           relationship: org.openecomp.relationships.AttachesTo
133       - port:
134           capability: attachment_cmaui_port_1
135           node: test_nested
136           relationship: org.openecomp.relationships.AttachesTo
137     jsa_security_group2:
138       type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
139       properties:
140         name:
141           get_input: security_group_name
142         description: ems security group
143         rules:
144         - protocol: tcp
145           ethertype: IPv4
146           port_range_max: 65535
147           remote_ip_prefix: 0.0.0.0/0
148           direction: egress
149           port_range_min: 1
150         - protocol: udp
151           ethertype: IPv4
152           port_range_max: 65535
153           remote_ip_prefix: 0.0.0.0/0
154           direction: egress
155           port_range_min: 1
156         - protocol: icmp
157           ethertype: IPv4
158           remote_ip_prefix: 0.0.0.0/0
159           direction: egress
160         - protocol: tcp
161           ethertype: IPv6
162           port_range_max: 65535
163           remote_ip_prefix: ::/0
164           direction: egress
165           port_range_min: 1
166         - protocol: udp
167           ethertype: IPv6
168           port_range_max: 65535
169           remote_ip_prefix: ::/0
170           direction: egress
171           port_range_min: 1
172         - protocol: icmp
173           ethertype: IPv6
174           remote_ip_prefix: ::/0
175           direction: egress
176         - protocol: tcp
177           ethertype: IPv4
178           port_range_max: 65535
179           remote_ip_prefix: 0.0.0.0/0
180           direction: ingress
181           port_range_min: 1
182         - protocol: udp
183           ethertype: IPv4
184           port_range_max: 65535
185           remote_ip_prefix: 0.0.0.0/0
186           direction: ingress
187           port_range_min: 1
188         - protocol: icmp
189           ethertype: IPv4
190           remote_ip_prefix: 0.0.0.0/0
191           direction: ingress
192         - protocol: tcp
193           ethertype: IPv6
194           port_range_max: 65535
195           remote_ip_prefix: ::/0
196           direction: ingress
197           port_range_min: 1
198         - protocol: udp
199           ethertype: IPv6
200           port_range_max: 65535
201           remote_ip_prefix: ::/0
202           direction: ingress
203           port_range_min: 1
204         - protocol: icmp
205           ethertype: IPv6
206           remote_ip_prefix: ::/0
207           direction: ingress
208       requirements:
209       - port:
210           capability: attachment_cmaui_port_1
211           node: test_nested
212           relationship: org.openecomp.relationships.AttachesTo
213     test_nested:
214       type: org.openecomp.resource.abstract.nodes.heat.nested
215       directives:
216       - substitutable
217       properties:
218         service_template_filter:
219           substitute_service_template: nestedServiceTemplate.yaml
220         p2:
221           get_input: shared_security_group_id2
222         shared_security_group_id1:
223           get_input: shared_security_group_id1
224   groups:
225     addOn:
226       type: org.openecomp.groups.heat.HeatStack
227       properties:
228         heat_file: ../Artifacts/addOn.yml
229         description: |
230           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
231       members:
232       - test_nested
233     main:
234       type: org.openecomp.groups.heat.HeatStack
235       properties:
236         heat_file: ../Artifacts/main.yml
237         description: |
238           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
239       members:
240       - jsa_security_group1
241       - jsa_security_group2