[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / resources / OS_Contrail_Network_Rule / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5 - openecomp_heat_index:
6     file: openecomp-heat/_index.yml
7 topology_template:
8   inputs:
9     start_src_ports:
10       hidden: false
11       immutable: false
12       type: float
13       description: Start of src port
14     private_net_1_gateway:
15       hidden: false
16       immutable: false
17       type: string
18       description: Private network gateway address
19     private_net_2_name:
20       hidden: false
21       immutable: false
22       type: string
23       description: Name of private network to be created
24     private_net_2_gateway:
25       hidden: false
26       immutable: false
27       type: string
28       description: Private network gateway address
29     policy_name:
30       hidden: false
31       immutable: false
32       type: string
33       description: Virtual network id
34     private_net_1_name:
35       hidden: false
36       immutable: false
37       type: string
38       description: Name of private network to be created
39     private_net_2_pool_start:
40       hidden: false
41       immutable: false
42       type: string
43       description: Start of private network IP address allocation pool
44     private_net_2_cidr:
45       hidden: false
46       immutable: false
47       type: string
48       description: Private network address (CIDR notation)
49     private_net_1_pool_end:
50       hidden: false
51       immutable: false
52       type: string
53       description: End of private network IP address allocation pool
54     end_src_ports:
55       hidden: false
56       immutable: false
57       type: float
58       description: End of src port
59     apply_service:
60       hidden: false
61       immutable: false
62       type: string
63       description: service to apply
64     start_dst_ports:
65       hidden: false
66       immutable: false
67       type: float
68       description: Start of dst port
69     end_dst_ports:
70       hidden: false
71       immutable: false
72       type: float
73       description: End of dst port
74     private_net_1_cidr:
75       hidden: false
76       immutable: false
77       type: string
78       description: Private network address (CIDR notation)
79     private_net_1_pool_start:
80       hidden: false
81       immutable: false
82       type: string
83       description: Start of private network IP address allocation pool
84     private_net_2_pool_end:
85       hidden: false
86       immutable: false
87       type: string
88       description: End of private network IP address allocation pool
89     direction:
90       hidden: false
91       immutable: false
92       type: string
93       description: Direction of Policy
94   node_templates:
95     private_net_1:
96       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
97       properties:
98         network_name:
99           get_input: private_net_1_name
100         subnets:
101           private_subnet_1:
102             cidr:
103               get_input: private_net_1_cidr
104             gateway_ip:
105               get_input: private_net_1_gateway
106             allocation_pools:
107             - start:
108                 get_input: private_net_1_pool_start
109               end:
110                 get_input: private_net_1_pool_end
111     private_policy:
112       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
113       properties:
114         entries:
115           policy_rule:
116           - src_ports:
117             - start_port:
118                 get_input: start_src_ports
119               end_port:
120                 get_input: end_src_ports
121             protocol: any
122             action_list:
123               apply_service:
124               - get_input: apply_service
125             dst_addresses:
126             - virtual_network: private_net_1
127             dst_ports:
128             - start_port:
129                 get_input: start_dst_ports
130               end_port:
131                 get_input: end_dst_ports
132             src_addresses:
133             - virtual_network: private_net_2
134             direction:
135               get_input: direction
136         name:
137           get_input: policy_name
138       requirements:
139       - network:
140           capability: tosca.capabilities.Attachment
141           node: private_net_1
142           relationship: org.openecomp.relationships.AttachesTo
143       - network:
144           capability: tosca.capabilities.Attachment
145           node: private_net_2
146           relationship: org.openecomp.relationships.AttachesTo
147     private_net_2:
148       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
149       properties:
150         network_name:
151           get_input: private_net_2_name
152         subnets:
153           private_subnet_2:
154             cidr:
155               get_input: private_net_2_cidr
156             gateway_ip:
157               get_input: private_net_2_gateway
158             allocation_pools:
159             - start:
160                 get_input: private_net_2_pool_start
161               end:
162                 get_input: private_net_2_pool_end
163   groups:
164     network_policy_chain_group:
165       type: org.openecomp.groups.heat.HeatStack
166       properties:
167         heat_file: ../Artifacts/network_policy_chain.yaml
168         description: |
169           HOT template to creates two virtual network with one subnet each.  Creates a network policy for applying service between two VNs created before. Attach the network policy to two virtual networks
170       members:
171       - private_net_1
172       - private_policy
173       - private_net_2