[VVP] Adding tests for new reqs from VNFRQTS-630
[vvp/validation-scripts.git] / ice_validator / tests / fixtures / test_environment_file_parameters / fail / fail.yaml
1 # -*- coding: utf8 -*-
2 # ============LICENSE_START=======================================================
3 # org.onap.vvp/validation-scripts
4 # ===================================================================
5 # Copyright © 2019 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: fdsafsfsa
43
44 parameters:
45
46   fw_oam_route_prefixes:
47     type: string
48     description: nsjalfdn
49
50   myvm_net_fqdn:
51     type: string
52     description: nasfln
53
54   TESTDB_valet_hosts:
55     type: string
56     description: nsfadl
57
58   STARKDB_int_private_v6_ips:
59     type: comma_delimited_list
60     description: ndsajlfn
61
62   workload_context:
63     type: string
64     description: Unique ID for this VNF instance
65
66   availability_zone_0:
67     type: json
68     description: Unique ID for this VNF instance
69
70   environment_context:
71     type: string
72     description: Unique ID for this VNF instance
73   
74   vnf_id:
75     type: string
76     description: Unique ID for this VNF instance
77
78   vf_module_id:
79     type: json
80     description: Unique ID for this VNF module instance
81
82   vnf_name:
83     type: string
84     description: Unique name for this VNF instance
85
86   starkdb_name:
87     type: string
88     description: fdhsfbsakdjnfjdsank
89
90   STARKDB_name:
91     type: json
92     description: fdhsfbsakdjnfjdsank
93
94   STARKDB_image_name:
95     type: string
96     description: fdhsfbsakdjnfjdsank
97
98   STARKDB_flavor_dvdfg:
99     type: string
100     description: fdhsfbsakdjnfjdsank
101
102
103   TESTDB_name:
104     type: string
105     description: fdhsfbsakdjnfjdsank
106
107   TESTDB_name2:
108     type: string
109     description: fdhsfbsakdjnfjdsank
110
111   TESTDB_image_name:
112     type: string
113     description: fdhsfbsakdjnfjdsank
114
115   TESTDB_flavor_name:
116     type: string
117     description: fdhsfbsakdjnfjdsank
118
119   stark_vol1_id:
120     type: number
121     description: myvolume
122     constraints:
123       - range: { min: 100, max: 400 }
124
125   param_X:
126     type: string
127     description: fdafsda
128
129   priv_net_id:
130     type: string
131     description: external network
132
133   #priv_sub2net_id:
134   #  type: json
135   #  description: external subnetwork
136
137   int_priv_subnet_name:
138     type: string
139     description: sadnfjls
140
141   int_priv_net_id:
142     type: string
143     description: internal network name
144
145   STARKDB_crazy_floating_ip:
146     type: string
147     description: asnfjl
148
149   crazy_net_id:
150     type: string
151     description: ansfkld
152
153   crazy_subnet_id:
154     type: string
155     description: asdfnkal
156
157   STARKDB_crazy_ip_0:
158     type: string
159     description: nsalfd
160
161   STARKDB_crazy_ip_1:
162     type: string
163     description: nsalfd
164
165   stark_rg_count:
166     type: string
167     description: nafs
168
169 resources:
170
171   STARKDB_cinder_attach:
172     type: OS::Cinder::VolumeAttachment
173     properties:
174       server: { get_resource: STARKDB_server_0 }
175       volume: { get_param: stark_vol1_id }
176
177   STARKDB_server_0:
178     type: OS::Nova::Server
179     properties:
180       image: { get_param: STARKDB_image_name }
181       flavor: { get_param: STARKDB_flavor_dvdfg }
182       name: { get_param: starkdb_name }
183       metadata:
184         vnf_id: { get_param: vnf_id }
185         vf_module_id: { get_param: vf_module_id }
186         vnf_name: { get_param: vnf_name }
187         #int_network_id: { get_resource: int_priv_network }
188         workload_context: { get_param: workload_context }
189         environment_context: { get_param: environment_context }
190         #valet_groups: "safnkl, sdaflksanl"
191       networks:
192         - port: { get_resource: STARKDB_0_int_priv_port_0 }
193         - port: { get_resource: STARKDB_0_PRIV_port_1}
194         - port: { get_resource: STARKDB_0_crazy_port_0 }
195         - network: { get_param: int_priv_net_id }
196       user_data: { get_file: deep-nested.file }
197         
198
199   STARKDB_server_1:
200     type: OS::Nova::Server
201     properties:
202       image: { get_param: STARKDB_image_name }
203       flavor: { get_param: STARKDB_flavor_dvdfg }
204       name: { get_param: STARKDB_name }
205       metadata:
206         vnf_id: { get_param: vnf_id }
207         vf_module_id: { get_param: vf_module_id }
208         vnf_name: { get_param: vnf_name }
209         #int_network_id: { get_resource: int_priv_network }
210         workload_context: { get_param: workload_context }
211         environment_context: { get_param: environment_context }
212         #valet_groups: "safnkl, sdaflksanl"
213       networks:
214         - port: {get_resource: STARKDB_1_int_priv_port_0}
215         - port: {get_resource: STARKDB_1_crazy_port_0}
216         - network: { get_param: int_priv_net_id }
217
218   TESTDB_server_0:
219     type: OS::Nova::Server
220     properties:
221       image: { get_param: TESTDB_image_name }
222       flavor: { get_param: TESTDB_flavor_name }
223       name: { get_param: TESTDB_name }
224       metadata:
225         vnf_id: { get_param: vnf_id }
226         vf_module_id: { get_param: vf_module_id }
227         vnf_name: { get_param: vnf_name }
228         #int_network_id: { get_resource: int_priv_network }
229         workload_context: { get_param: workload_context }
230         environment_context: { get_param: environment_context }
231         #valet_groups: "safnkl, sdaflksanl"
232       networks:
233         - port: {get_resource: TESTDB_0_int_priv_port_0}
234         - network: { get_param: int_priv_net_id }
235
236       availability_zone: { get_param: availability_zone_0 }
237
238   TESTDB_server_1:
239     type: OS::Nova::Server
240     properties:
241       image: { get_param: TESTDB_image_name }
242       flavor: { get_param: TESTDB_flavor_name }
243       name: { get_param: TESTDB_name2 }
244       metadata:
245         test_fqdn: { get_param: myvm_net_fqdn }
246         vnf_id: { get_param: vnf_id }
247         vf_module_id: { get_param: vf_module_id }
248         vnf_name: { get_param: vnf_name }
249         #int_network_id: { get_resource: int_priv_network }
250         workload_context: { get_param: workload_context }
251         environment_context: { get_param: environment_context }
252         #valet_groups: "safnkl, sdaflksanl"
253       networks:
254         - port: {get_resource: TESTDB_0_int_priv_port_0}
255         - network: { get_param: int_priv_net_id }
256
257       availability_zone: 
258         str_replace:
259           template: $AZ$VALET_HOST_ASSIGNMENT
260           params:
261             $AZ: { get_param: availability_zone_0 }
262             $VALET_HOST_ASSIGNMENT: { get_param: [ TESTDB_valet_hosts, 0 ] }
263
264
265   vol_attachment:
266     type: OS::Cinder::VolumeAttachment
267     properties:
268       volume_id: { get_param: stark_vol1_id }
269       server: { get_resource: STARKDB_server_0 }
270
271   int_private_net_id:
272     type: OS::Neutron::Net
273     properties:
274       name: { get_param: int_priv_net_id }
275
276   priv_network:
277     type: OS::Neutron::Net
278     properties:
279       fnsdf: nksldfnkl
280
281   stark_nested_resource:
282     type: STARKDB-nested.yaml
283     properties:
284       my_nested_parame: { get_param: vnf_id }
285
286   int_priv_subnet:
287       type: OS::Neutron::Subnet
288       properties:
289           name: { get_param: int_priv_subnet_name}
290           network_id: { get_resource: int_private_net_id }
291
292   STARKDB_0_int_priv_port_0:
293     type: OS::Neutron::Port
294     properties:
295       network: { get_resource: int_private_net_id }
296       fixed_ips:
297         - subnet: { get_resource: int_priv_subnet }
298         - ip_address: { get_param: STARKDB_int_private_v6_ips }
299
300       
301   STARKDB_0_crazy_port_0:
302     type: OS::Neutron::Port
303     properties:
304       network: { get_param: crazy_net_id }
305       fixed_ips: 
306         - subnet: { get_param: crazy_subnet_id }
307         - ip_address: { get_param: STARKDB_crazy_ip_0 }
308       allowed_address_pairs: [ { "ip_address": {get_param:
309         STARKDB_crazy_floating_ip}}]
310
311
312   STARKDB_1_crazy_port_0:
313     type: OS::Neutron::Port
314     properties:
315       network: { get_param: crazy_net_id }
316       fixed_ips: 
317         - subnet: { get_param: crazy_subnet_id }
318         - ip_address: { get_param: STARKDB_crazy_ip_1 }
319       allowed_address_pairs: [ { "ip_address": {get_param:
320         STARKDB_crazy_floating_ip}}]
321
322   STARKDB_1_int_priv_port_0:
323     type: OS::Neutron::Port
324     properties:
325       network: { get_resource: int_private_net_id }
326
327
328   TESTDB_0_int_priv_port_0:
329     type: OS::Neutron::Port
330     properties:
331       network: { get_param: int_priv_net_id }
332
333   STARKDB_0_PRIV_port_1:
334     type: OS::Neutron::Port
335     properties:
336       network: { get_param: priv_net_id }
337
338   STARKDB_cloud_config:
339     type: OS::Heat::CloudConfig
340
341
342   myrouteprefix:
343     type: OS::ContrailV2::InterfaceRouteTable
344     properties:
345       name:
346         str_replace:
347           template: VNF_NAME_interface_route_table
348           params:
349             VNF_NAME: { get_param: vnf_name }
350       interface_route_table_routes:
351         interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
352         test: safd
353
354   stark_rg:
355     type: OS::Heat::ResourceGroup
356     properties:
357       count: { get_param: stark_rg_count }
358       resource_def:
359         type: STARKDB-nested.yaml
360         properties:
361           my_nested_parameter: 4
362
363 outputs:
364   test_output:
365     value: { list_join: [',', [ { get_param: param_X }, { get_param: stark_vol1_id } ] ] }
366
367   int_priv_su2bnet_id:
368     value: { get_resource: int_priv_subnet }
369
370   int_priv_net_id:
371     value: { get_resource: int_private_net_id }
372
373   STARKDB_crazy_floating_ip:
374     value: { get_param: STARKDB_crazy_floating_ip }
375
376   crazy_subnet_id:
377     value: { get_param: crazy_subnet_id }
378
379   crazy_net_id:
380     value: { get_param: crazy_net_id }