[VVP] add bug fixes and reserve port updates
[vvp/validation-scripts.git] / ice_validator / tests / fixtures / test_fixed_ips_include_vm_type_network_role / pass / valid_template.yaml
1 # -*- coding: utf8 -*-
2 # ============LICENSE_START=======================================================
3 # org.onap.vvp/validation-scripts
4 # ===================================================================
5 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 # ===================================================================
7 #
8 # Unless otherwise specified, all software contained herein is licensed
9 # under the Apache License, Version 2.0 (the “License”);
10 # you may not use this software except in compliance with the License.
11 # You may obtain a copy of the License at
12 #
13 #             http://www.apache.org/licenses/LICENSE-2.0
14 #
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 #
21 #
22 #
23 # Unless otherwise specified, all documentation contained herein is licensed
24 # under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
25 # you may not use this documentation except in compliance with the License.
26 # You may obtain a copy of the License at
27 #
28 #             https://creativecommons.org/licenses/by/4.0/
29 #
30 # Unless required by applicable law or agreed to in writing, documentation
31 # distributed under the License is distributed on an "AS IS" BASIS,
32 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 # See the License for the specific language governing permissions and
34 # limitations under the License.
35 #
36 # ============LICENSE_END============================================
37 #
38 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
39 #
40 ---
41 heat_template_version: 2015-04-30
42
43 description: Heat template description
44
45 parameters:
46
47   vnf_id:
48     type: string
49     description: Unique ID for this VNF instance
50
51   vf_module_id:
52     type: string
53     description: Unique ID for this VF module
54
55   vnf_name:
56     type: string
57     description: Unique name for this VNF instance
58
59   db_names:
60     type: comma_delimited_list
61     description: Names attribute for the VMs
62
63   lb_names:
64     type: comma_delimited_list
65     description: Names attribute for the VMs
66
67   lb_flavor_name:
68     type: string
69     description: flavor to be used to create this vm must be one of the following flavors
70
71   db_flavor_name:
72     type: string
73     description: flavor to be used to create this vm must be one of the following flavors
74
75   availability_zone_0:
76     type: string
77     description: availability zone to be used
78
79   exnet_net_name:
80     type: string
81     description: network name for the external network extnet
82
83   exnet_net_id:
84     type: string
85     description: network id for the external network extnet
86
87   int_intranet_net_id:
88     type: string
89     description: network id for the internal network intranet 
90
91   db_int_intranet_ip_0:
92     type: string
93     description: db_int_intranet_ip_0 
94
95   db_int_intranet_v6_ip_0:
96     type: string
97     description: db_int_intranet_v6_ip_0 
98
99   db_int_intranet_ips:
100     type: string
101     description: db_int_intranet_ips 
102
103   db_int_intranet_v6_ips:
104     type: string
105     description: db_int_intranet_v6_ips 
106
107   lb_extnet_ip_0:
108     type: string
109     description: lb_extnet_ip_0 
110
111   lb_extnet_ip_1:
112     type: string
113     description: lb_extnet_ip_1 
114
115   lb_extnet_v6_ip_0:
116     type: string
117     description: lb_extnet_v6_ip_0
118
119   lb_extnet_ips:
120     type: string
121     description: lb_extnet_ips 
122
123   lb_extnet_v6_ips:
124     type: string
125     description: lb_extnet_v6_ips 
126
127 resources:
128
129   lb_server_0:
130     type: OS::Nova::Server
131     properties:
132       availability_zone: { get_param: availability_zone_0 }
133       name: { get_param: [lb_names, 0]  }
134       flavor: { get_param: lb_flavor_name}
135       networks:
136         - port: { get_resource: lb_0_extnet_0_port }
137         - port: { get_resource: lb_1_extnet_0_port }
138         - port: { get_resource: lb_2_extnet_0_port }
139         - port: { get_resource: lb_3_extnet_0_port }  
140       metadata:
141         vnf_name: { get_param: vnf_name }
142         vnf_id: { get_param: vnf_id }
143         vf_module_id: { get_param: vf_module_id }
144
145   db_server_0:
146     type: OS::Nova::Server
147     properties:
148       availability_zone: { get_param: availability_zone_0 }
149       name: { get_param: [db_names, 1]  }
150       flavor: { get_param: db_flavor_name}
151       networks:
152         - port: { get_resource: db_0_int_intranet_0_port }
153         - port: { get_resource: db_1_int_intranet_0_port }
154         - port: { get_resource: db_2_int_intranet_0_port }
155       metadata:
156         vnf_name: { get_param: vnf_name }
157         vnf_id: { get_param: vnf_id }
158         vf_module_id: { get_param: vf_module_id }
159
160   db_0_int_intranet_0_port:
161         type: OS::Neutron::Port
162         properties:
163           network: { get_param: int_intranet_net_id }
164           fixed_ips:
165             - ip_address: { get_param: db_int_intranet_ip_0 }
166             - ip_address: { get_param: db_int_intranet_v6_ip_0 }
167
168   db_1_int_intranet_0_port:
169         type: OS::Neutron::Port
170         properties:
171           network: { get_param: int_intranet_net_id }
172           fixed_ips:
173             - ip_address: { get_param: [db_int_intranet_ips, 0] }
174             - ip_address: { get_param: [db_int_intranet_v6_ips, 0] }
175
176   db_2_int_intranet_0_port:
177         type: OS::Neutron::Port
178         properties:
179           network: { get_param: int_intranet_net_id }
180           fixed_ips:
181             - ip_address: { get_param: [db_int_intranet_ips, 1] }
182
183   lb_0_extnet_0_port:
184         type: OS::Neutron::Port
185         properties:
186           network: { get_param: extnet_net_name }
187           fixed_ips:
188             - ip_address: { get_param: lb_extnet_ip_0 }
189             - ip_address: { get_param: lb_extnet_v6_ip_0 }
190
191   lb_1_extnet_0_port:
192         type: OS::Neutron::Port
193         properties:
194           network: { get_param: extnet_net_id }
195           fixed_ips:
196             - ip_address: { get_param: [lb_extnet_ips, 0] }
197             - ip_address: { get_param: [lb_extnet_v6_ips, 0] }
198
199   lb_2_extnet_0_port:
200         type: OS::Neutron::Port
201         properties:
202           network: { get_param: extnet_net_name }
203           fixed_ips:
204             - ip_address: { get_param: lb_extnet_ip_1 }
205             - subnet_id: { get_param: extnet_subnet_id }
206
207   lb_3_extnet_0_port:
208         type: OS::Neutron::Port
209         properties:
210           network: { get_param: extnet_net_id }
211           fixed_ips:
212             - subnet_id: { get_param: extnet_subnet_id }
213             - subnet_id: { get_param: extnet_v6_subnet_id }
214   reserve_port_vm_type_1_network_role_a_floating_ip_0:
215         type: OS::Neutron::Port
216         properties:
217           network: { get_param: network_role_a_net_id }
218           fixed_ips:
219             - ip_address : { get_param: vm_type_1_network_role_a_floating_ip }
220   reserve_port_vm_type_1_network_role_a_floating_v6_ip_0:
221         type: OS::Neutron::Port
222         properties:
223           network: { get_param: network_role_a_net_id }
224           fixed_ips:
225             - ip_address : { get_param: vm_type_1_network_role_a_floating_v6_ip }