push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / ContrailV2_translation / ContrailV2_Multi_net_single_policy_translation / 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   NeutronPortGlobalTypes:
16     file: NeutronPortGlobalTypesServiceTemplate.yaml
17   NeutronNetGlobalTypes:
18     file: NeutronNetGlobalTypesServiceTemplate.yaml
19   CommonGlobalTypes:
20     file: CommonGlobalTypesServiceTemplate.yaml
21   ContrailAbstractSubstituteGlobalTypes:
22     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
23   ContrailNetworkRuleGlobalType:
24     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
25   NeutronSecurityRulesGlobalTypes:
26     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
27   NovaServerGlobalTypes:
28     file: NovaServerGlobalTypesServiceTemplate.yaml
29   ContrailV2VirtualMachineInterfaceGlobalType:
30     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
31 topology_template:
32   inputs:
33     left_vn_fqdn:
34       hidden: false
35       immutable: false
36       type: string
37       description: dummy
38     Internal1_cidr:
39       hidden: false
40       immutable: false
41       type: string
42     src_port_start:
43       hidden: false
44       immutable: false
45       type: string
46       description: dummy
47     Internal1_default_gateway:
48       hidden: false
49       immutable: false
50       type: string
51     Internal1_dhcp:
52       hidden: false
53       immutable: false
54       type: string
55     src_port_end:
56       hidden: false
57       immutable: false
58       type: string
59       description: dummy
60     policy_name:
61       hidden: false
62       immutable: false
63       type: string
64       description: dummy
65     dst_port_end:
66       hidden: false
67       immutable: false
68       type: string
69       description: dummy
70     simple_action:
71       hidden: false
72       immutable: false
73       type: string
74       description: dummy
75     service_instance_fq_name:
76       hidden: false
77       immutable: false
78       type: string
79     Internal2_cidr:
80       hidden: false
81       immutable: false
82       type: string
83     protocol:
84       hidden: false
85       immutable: false
86       type: string
87       description: dummy
88     Internal2_dhcp:
89       hidden: false
90       immutable: false
91       type: string
92     dst_port_start:
93       hidden: false
94       immutable: false
95       type: string
96       description: dummy
97     network_ipam_refs_data_ipam_subnets_addr_from_start_true:
98       hidden: false
99       immutable: false
100       type: string
101       description: dummy
102     Internal2_default_gateway:
103       hidden: false
104       immutable: false
105       type: string
106     right_vn_fqdn:
107       hidden: false
108       immutable: false
109       type: string
110       description: dummy
111     network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
112       hidden: false
113       immutable: false
114       type: string
115       description: dummy
116     left_vn:
117       hidden: false
118       immutable: false
119       type: string
120       description: dummy
121     direction:
122       hidden: false
123       immutable: false
124       type: string
125       description: dummy
126     network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
127       hidden: false
128       immutable: false
129       type: string
130       description: dummy
131   node_templates:
132     template_NetworkPolicy:
133       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
134       properties:
135         name:
136           get_input: policy_name
137         network_policy_entries:
138           network_policy_entries_policy_rule:
139           - network_policy_entries_policy_rule_dst_addresses:
140             - network_policy_entries_policy_rule_dst_addresses_virtual_network:
141                 get_input: right_vn_fqdn
142             network_policy_entries_policy_rule_dst_ports:
143             - network_policy_entries_policy_rule_dst_ports_start_port:
144                 get_input: dst_port_start
145               network_policy_entries_policy_rule_dst_ports_end_port:
146                 get_input: dst_port_end
147             network_policy_entries_policy_rule_protocol:
148               get_input: protocol
149             network_policy_entries_policy_rule_src_addresses:
150             - network_policy_entries_policy_rule_src_addresses_virtual_network:
151                 get_input: left_vn_fqdn
152             network_policy_entries_policy_rule_direction:
153               get_input: direction
154             network_policy_entries_policy_rule_src_ports:
155             - network_policy_entries_policy_rule_src_ports_start_port:
156                 get_input: src_port_start
157               network_policy_entries_policy_rule_src_ports_end_port:
158                 get_input: src_port_end
159             network_policy_entries_policy_rule_action_list:
160               network_policy_entries_policy_rule_action_list_simple_action:
161                 get_input: simple_action
162               network_policy_entries_policy_rule_action_list_apply_service:
163               - get_input: service_instance_fq_name
164       requirements:
165       - network:
166           capability: tosca.capabilities.Attachment
167           node: template_VirtualNetwork_1
168           relationship: org.openecomp.relationships.AttachesTo
169       - network:
170           capability: tosca.capabilities.Attachment
171           node: template_VirtualNetwork_2
172           relationship: org.openecomp.relationships.AttachesTo
173       - network:
174           capability: tosca.capabilities.Attachment
175           node: template_VirtualNetwork_3
176           relationship: org.openecomp.relationships.AttachesTo
177     template_VirtualNetwork_2:
178       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
179       properties:
180         dhcp_enabled:
181           get_input: Internal1_dhcp
182         network_ipam_refs_data:
183         - network_ipam_refs_data_ipam_subnets:
184           - network_ipam_refs_data_ipam_subnets_subnet:
185               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
186                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
187               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
188                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
189             network_ipam_refs_data_ipam_subnets_addr_from_start:
190               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
191         network_policy_refs_data:
192         - network_policy_refs_data_sequence:
193             network_policy_refs_data_sequence_major: 0
194             network_policy_refs_data_sequence_minor: 0
195         network_name:
196           get_input: left_vn
197         network_ipam_refs:
198         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
199         network_policy_refs:
200         - get_attribute:
201           - template_NetworkPolicy
202           - fq_name
203         subnets:
204           Internal-subnet-1:
205             enable_dhcp:
206               get_input: Internal1_dhcp
207             cidr:
208               get_input: Internal1_cidr
209             gateway_ip:
210               get_input: Internal1_default_gateway
211           Internal-subnet-2:
212             enable_dhcp:
213               get_input: Internal2_dhcp
214             cidr:
215               get_input: Internal2_cidr
216             gateway_ip:
217               get_input: Internal2_default_gateway
218       requirements:
219       - dependency:
220           capability: tosca.capabilities.Node
221           node: template_NetworkPolicy
222           relationship: tosca.relationships.DependsOn
223     template_VirtualNetwork_1:
224       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
225       properties:
226         network_ipam_refs_data:
227         - network_ipam_refs_data_ipam_subnets:
228           - network_ipam_refs_data_ipam_subnets_subnet:
229               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
230                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
231               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
232                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
233             network_ipam_refs_data_ipam_subnets_addr_from_start:
234               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
235         network_policy_refs_data:
236         - network_policy_refs_data_sequence:
237             network_policy_refs_data_sequence_major: 0
238             network_policy_refs_data_sequence_minor: 0
239         network_name:
240           get_input: left_vn
241         network_ipam_refs:
242         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
243         network_policy_refs:
244         - list_join:
245           - ':'
246           - get_attribute:
247             - template_NetworkPolicy
248             - fq_name
249       requirements:
250       - dependency:
251           capability: tosca.capabilities.Node
252           node: template_NetworkPolicy
253           relationship: tosca.relationships.DependsOn
254     template_VirtualNetwork_3:
255       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
256       properties:
257         network_ipam_refs_data:
258         - network_ipam_refs_data_ipam_subnets:
259           - network_ipam_refs_data_ipam_subnets_subnet:
260               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
261                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
262               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
263                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
264             network_ipam_refs_data_ipam_subnets_addr_from_start:
265               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
266         network_policy_refs_data:
267         - network_policy_refs_data_sequence:
268             network_policy_refs_data_sequence_major: 0
269             network_policy_refs_data_sequence_minor: 0
270         network_name:
271           get_input: left_vn
272         network_ipam_refs:
273         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
274         network_policy_refs:
275         - template_NetworkPolicy
276       requirements:
277       - dependency:
278           capability: tosca.capabilities.Node
279           node: template_NetworkPolicy
280           relationship: tosca.relationships.DependsOn
281   groups:
282     main:
283       type: org.openecomp.groups.heat.HeatStack
284       properties:
285         heat_file: ../Artifacts/main.yml
286         description: cmaui server template for vMMSC
287       members:
288       - template_NetworkPolicy
289       - template_VirtualNetwork_2
290       - template_VirtualNetwork_1
291       - template_VirtualNetwork_3