push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / securityruletosharedportlinking / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   NeutronPortGlobalTypes:
6     file: NeutronPortGlobalTypesServiceTemplate.yaml
7   NeutronNetGlobalTypes:
8     file: NeutronNetGlobalTypesServiceTemplate.yaml
9   CommonGlobalTypes:
10     file: CommonGlobalTypesServiceTemplate.yaml
11   CinderVolumeGlobalTypes:
12     file: CinderVolumeGlobalTypesServiceTemplate.yaml
13   ContrailNetworkRuleGlobalType:
14     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
15   NeutronSecurityRulesGlobalTypes:
16     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
17   NovaServerGlobalTypes:
18     file: NovaServerGlobalTypesServiceTemplate.yaml
19   ContrailVirtualNetworkGlobalType:
20     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
21   AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 topology_template:
24   inputs:
25     security_group_name:
26       label: security group name
27       hidden: false
28       immutable: false
29       type: string
30       description: the name of security group
31     shared_security_group_id2:
32       hidden: false
33       immutable: false
34       type: string
35       description: network name of jsa log network
36     jsa_net_name:
37       hidden: false
38       immutable: false
39       type: string
40       description: network name of jsa log network
41     shared_security_group_id1:
42       hidden: false
43       immutable: false
44       type: string
45       description: network name of jsa log network
46   node_templates:
47     jsa_security_group1:
48       type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
49       properties:
50         name:
51           get_input: security_group_name
52         description: ems security group
53         rules:
54         - protocol: tcp
55           ethertype: IPv4
56           port_range_max: 65535
57           remote_ip_prefix: 0.0.0.0/0
58           direction: egress
59           port_range_min: 1
60         - protocol: udp
61           ethertype: IPv4
62           port_range_max: 65535
63           remote_ip_prefix: 0.0.0.0/0
64           direction: egress
65           port_range_min: 1
66         - protocol: icmp
67           ethertype: IPv4
68           remote_ip_prefix: 0.0.0.0/0
69           direction: egress
70         - protocol: tcp
71           ethertype: IPv6
72           port_range_max: 65535
73           remote_ip_prefix: ::/0
74           direction: egress
75           port_range_min: 1
76         - protocol: udp
77           ethertype: IPv6
78           port_range_max: 65535
79           remote_ip_prefix: ::/0
80           direction: egress
81           port_range_min: 1
82         - protocol: icmp
83           ethertype: IPv6
84           remote_ip_prefix: ::/0
85           direction: egress
86         - protocol: tcp
87           ethertype: IPv4
88           port_range_max: 65535
89           remote_ip_prefix: 0.0.0.0/0
90           direction: ingress
91           port_range_min: 1
92         - protocol: udp
93           ethertype: IPv4
94           port_range_max: 65535
95           remote_ip_prefix: 0.0.0.0/0
96           direction: ingress
97           port_range_min: 1
98         - protocol: icmp
99           ethertype: IPv4
100           remote_ip_prefix: 0.0.0.0/0
101           direction: ingress
102         - protocol: tcp
103           ethertype: IPv6
104           port_range_max: 65535
105           remote_ip_prefix: ::/0
106           direction: ingress
107           port_range_min: 1
108         - protocol: udp
109           ethertype: IPv6
110           port_range_max: 65535
111           remote_ip_prefix: ::/0
112           direction: ingress
113           port_range_min: 1
114         - protocol: icmp
115           ethertype: IPv6
116           remote_ip_prefix: ::/0
117           direction: ingress
118       requirements:
119       - port:
120           capability: attachment_cmaui_port_2
121           node: test_nested
122           relationship: org.openecomp.relationships.AttachesTo
123       - port:
124           capability: attachment_cmaui_port_1
125           node: test_nested
126           relationship: org.openecomp.relationships.AttachesTo
127     jsa_security_group2:
128       type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
129       properties:
130         name:
131           get_input: security_group_name
132         description: ems security group
133         rules:
134         - protocol: tcp
135           ethertype: IPv4
136           port_range_max: 65535
137           remote_ip_prefix: 0.0.0.0/0
138           direction: egress
139           port_range_min: 1
140         - protocol: udp
141           ethertype: IPv4
142           port_range_max: 65535
143           remote_ip_prefix: 0.0.0.0/0
144           direction: egress
145           port_range_min: 1
146         - protocol: icmp
147           ethertype: IPv4
148           remote_ip_prefix: 0.0.0.0/0
149           direction: egress
150         - protocol: tcp
151           ethertype: IPv6
152           port_range_max: 65535
153           remote_ip_prefix: ::/0
154           direction: egress
155           port_range_min: 1
156         - protocol: udp
157           ethertype: IPv6
158           port_range_max: 65535
159           remote_ip_prefix: ::/0
160           direction: egress
161           port_range_min: 1
162         - protocol: icmp
163           ethertype: IPv6
164           remote_ip_prefix: ::/0
165           direction: egress
166         - protocol: tcp
167           ethertype: IPv4
168           port_range_max: 65535
169           remote_ip_prefix: 0.0.0.0/0
170           direction: ingress
171           port_range_min: 1
172         - protocol: udp
173           ethertype: IPv4
174           port_range_max: 65535
175           remote_ip_prefix: 0.0.0.0/0
176           direction: ingress
177           port_range_min: 1
178         - protocol: icmp
179           ethertype: IPv4
180           remote_ip_prefix: 0.0.0.0/0
181           direction: ingress
182         - protocol: tcp
183           ethertype: IPv6
184           port_range_max: 65535
185           remote_ip_prefix: ::/0
186           direction: ingress
187           port_range_min: 1
188         - protocol: udp
189           ethertype: IPv6
190           port_range_max: 65535
191           remote_ip_prefix: ::/0
192           direction: ingress
193           port_range_min: 1
194         - protocol: icmp
195           ethertype: IPv6
196           remote_ip_prefix: ::/0
197           direction: ingress
198       requirements:
199       - port:
200           capability: attachment_cmaui_port_1
201           node: test_nested
202           relationship: org.openecomp.relationships.AttachesTo
203     test_nested:
204       type: org.openecomp.resource.abstract.nodes.heat.nested
205       directives:
206       - substitutable
207       properties:
208         service_template_filter:
209           substitute_service_template: nestedServiceTemplate.yaml
210         p2:
211           get_input: shared_security_group_id2
212         shared_security_group_id1:
213           get_input: shared_security_group_id1
214   groups:
215     addOn:
216       type: org.openecomp.groups.heat.HeatStack
217       properties:
218         heat_file: ../Artifacts/addOn.yml
219         description: |
220           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
221       members:
222       - test_nested
223     main:
224       type: org.openecomp.groups.heat.HeatStack
225       properties:
226         heat_file: ../Artifacts/main.yml
227         description: |
228           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
229       members:
230       - jsa_security_group1
231       - jsa_security_group2