push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / ContrailV2_translation / simple / 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_2
168           relationship: org.openecomp.relationships.AttachesTo
169     template_VirtualNetwork_2:
170       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
171       properties:
172         dhcp_enabled:
173           get_input: Internal1_dhcp
174         network_ipam_refs_data:
175         - network_ipam_refs_data_ipam_subnets:
176           - network_ipam_refs_data_ipam_subnets_subnet:
177               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
178                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
179               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
180                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
181             network_ipam_refs_data_ipam_subnets_addr_from_start:
182               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
183         network_policy_refs_data:
184         - network_policy_refs_data_sequence:
185             network_policy_refs_data_sequence_major: 0
186             network_policy_refs_data_sequence_minor: 0
187         network_name:
188           get_input: left_vn
189         network_ipam_refs:
190         - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
191         network_policy_refs:
192         - list_join:
193           - ':'
194           - get_attribute:
195             - template_NetworkPolicy
196             - fq_name
197         subnets:
198           Internal-subnet-1:
199             enable_dhcp:
200               get_input: Internal1_dhcp
201             cidr:
202               get_input: Internal1_cidr
203             gateway_ip:
204               get_input: Internal1_default_gateway
205           Internal-subnet-2:
206             enable_dhcp:
207               get_input: Internal2_dhcp
208             cidr:
209               get_input: Internal2_cidr
210             gateway_ip:
211               get_input: Internal2_default_gateway
212       requirements:
213       - dependency:
214           capability: tosca.capabilities.Node
215           node: template_NetworkPolicy
216           relationship: tosca.relationships.DependsOn
217   groups:
218     main:
219       type: org.openecomp.groups.heat.HeatStack
220       properties:
221         heat_file: ../Artifacts/main.yml
222         description: cmaui server template for vMMSC
223       members:
224       - template_NetworkPolicy
225       - template_VirtualNetwork_2