[VVP] updating ports.py to check str_replace params
[vvp/validation-scripts.git] / ice_validator / tests / fixtures / test_allowed_address_pairs_include_vm_type_network_role / pass / pass.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 #
39 ---
40 heat_template_version: 2015-04-30
41
42 description: Heat template description
43
44 parameters:
45
46   vnf_id:
47     type: string
48     description: Unique ID for this VNF instance
49
50   vf_module_id:
51     type: string
52     description: Unique ID for this VF module
53
54   vnf_name:
55     type: string
56     description: Unique name for this VNF instance
57
58   db_names:
59     type: comma_delimited_list
60     description: Names attribute for the VMs
61
62   lb_names:
63     type: comma_delimited_list
64     description: Names attribute for the VMs
65
66   lb_flavor_name:
67     type: string
68     description: flavor to be used to create this vm must be one of the following flavors
69
70   db_flavor_name:
71     type: string
72     description: flavor to be used to create this vm must be one of the following flavors
73
74   availability_zone_0:
75     type: string
76     description: availability zone to be used
77
78   exnet_net_name:
79     type: string
80     description: network name for the external network extnet
81
82   exnet_net_id:
83     type: string
84     description: network id for the external network extnet
85
86   int_intranet_net_id:
87     type: string
88     description: network id for the internal network intranet 
89
90   db_int_intranet_floating_ip:
91     type: string
92     description: db_int_intranet_floating_ip
93
94   db_int_intranet_floating_v6_ip:
95     type: string
96     description: db_int_intranet_floating_v6_ip
97
98   db_int_intranet_floating_ips:
99     type: comma_delimited_list
100     description: db_int_intranet_floating_ips
101
102   db_int_intranet_floating_v6_ips:
103     type: comma_delimited_list
104     description: db_int_intranet_floating_v6_ips
105
106   db_int_intranet_floating_ip:
107     type: string
108     description: db_int_intranet_floating_ip
109
110   lb_extnet_floating_ip:
111     type: string
112     description: lb_extnet_floating_ip
113
114   lb_extnet_floating_v6_ip:
115     type: string
116     description: lb_extnet_floating_v6_ip
117
118   lb_extnet_ips:
119     type: comma_delimited_list
120     description: lb_extnet_ips
121
122   lb_extnet_v6_ips:
123     type: comma_delimited_list
124     description: lb_extnet_v6_ips
125
126   lb_extnet_floating_ip:
127     type: string
128     description: lb_extnet_floating_ip
129
130   cidr:
131     type: string
132     description: nafskldnaklsdf
133
134 resources:
135
136   lb_server_0:
137     type: OS::Nova::Server
138     properties:
139       availability_zone: { get_param: availability_zone_0 }
140       name: { get_param: [lb_names, 0]  }
141       flavor: { get_param: lb_flavor_name}
142       networks:
143         - port: { get_resource: lb_0_extnet_0_port }
144         - port: { get_resource: lb_1_extnet_0_port }
145         - port: { get_resource: lb_2_extnet_0_port }
146         - port: { get_resource: lb_3_extnet_0_port }
147         - port: { get_resource: lb_4_extnet_0_port }
148         - port: { get_resource: lb_5_extnet_0_port }  
149         - port: { get_resource: lb_6_extnet_0_port }  
150       metadata:
151         vnf_name: { get_param: vnf_name }
152         vnf_id: { get_param: vnf_id }
153         vf_module_id: { get_param: vf_module_id }
154
155   db_server_0:
156     type: OS::Nova::Server
157     properties:
158       availability_zone: { get_param: availability_zone_0 }
159       name: { get_param: [db_names, 1]  }
160       flavor: { get_param: db_flavor_name}
161       networks:
162         - port: { get_resource: db_0_int_intranet_0_port }
163         - port: { get_resource: db_1_int_intranet_0_port }
164         - port: { get_resource: db_2_int_intranet_0_port }
165         - port: { get_resource: db_3_int_intranet_0_port }
166         - port: { get_resource: db_4_int_intranet_0_port }
167         - port: { get_resource: db_5_int_intranet_0_port }
168       metadata:
169         vnf_name: { get_param: vnf_name }
170         vnf_id: { get_param: vnf_id }
171         vf_module_id: { get_param: vf_module_id }
172
173   db_0_int_intranet_port_0:
174         type: OS::Neutron::Port
175         properties:
176           network: { get_param: int_intranet_net_id }
177           allowed_address_pairs:
178             - ip_address: { get_param: db_int_intranet_floating_ip }
179
180   db_0_int_intranet_port_1:
181         type: OS::Neutron::Port
182         properties:
183           network: { get_param: int_intranet_net_id }
184           allowed_address_pairs:
185             - ip_address: { get_param: db_int_intranet_floating_v6_ip }
186
187   db_0_int_intranet_port_2:
188         type: OS::Neutron::Port
189         properties:
190           network: { get_param: int_intranet_net_id }
191           allowed_address_pairs:
192             - ip_address: { get_param: [db_int_intranet_floating_ips, 0] }
193
194   db_0_int_intranet_port_3:
195         type: OS::Neutron::Port
196         properties:
197           network: { get_param: int_intranet_net_id }
198           allowed_address_pairs:
199             - ip_address: { get_param: [db_int_intranet_floating_v6_ips, 0] }
200
201   db_0_int_intranet_port_4:
202         type: OS::Neutron::Port
203         properties:
204           network: { get_param: int_intranet_net_id }
205           allowed_address_pairs:
206             - ip_address: { get_param: db_int_intranet_floating_ip }
207
208   db_0_int_intranet_port_5:
209         type: OS::Neutron::Port
210         properties:
211           network: { get_param: int_intranet_net_id }
212           allowed_address_pairs:
213             - ip_address: { get_param: db_int_intranet_floating_v6_ip }
214
215   lb_0_extnet_port_0:
216         type: OS::Neutron::Port
217         properties:
218           network: { get_param: extnet_net_name }
219           allowed_address_pairs:
220             - ip_address: { get_param: lb_extnet_floating_ip }
221
222   lb_0_extnet_port_1:
223     type: OS::Neutron::Port
224     properties:
225       network: { get_param: extnet_net_id }
226       allowed_address_pairs:
227         - ip_address: { get_param: lb_extnet_floating_v6_ip }
228
229   lb_0_extnet_port_2:
230     type: OS::Neutron::Port
231     properties:
232       network: { get_param: extnet_net_name }
233       allowed_address_pairs:
234         - ip_address: { get_param: [lb_extnet_ips, 0] }
235     metadata:
236       aap_exempt:
237         - lb_extnet_ips
238
239   lb_0_extnet_port_3:
240     type: OS::Neutron::Port
241     properties:
242       network: { get_param: extnet_net_id }
243       allowed_address_pairs:
244         - ip_address: { get_param: [lb_extnet_v6_ips, 0] }
245     metadata:
246       aap_exempt:
247         - lb_extnet_v6_ips
248
249   lb_0_extnet_port_4:
250     type: OS::Neutron::Port
251     properties:
252       network: { get_param: extnet_net_name }
253       allowed_address_pairs:
254         - ip_address: { get_param: lb_extnet_floating_ip }
255
256   lb_0_extnet_port_5:
257     type: OS::Neutron::Port
258     properties:
259       network: { get_param: extnet_net_id }
260       allowed_address_pairs:
261         - ip_address: { get_param: lb_extnet_floating_v6_ip }
262
263   lb_0_extnet_port_6:
264     type: OS::Neutron::Port
265     properties:
266       network: { get_param: extnet_net_id }
267       allowed_address_pairs:
268         ip_address:
269           str_replace:
270             template: $IPADDR$CIDR
271             params: 
272               $CIDR: { get_param: cidr }
273               $IPADDR: { get_param: lb_extnet_floating_v6_ip }