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