[VVP] Adding tests for new reqs from VNFRQTS-630
[vvp/validation-scripts.git] / ice_validator / tests / fixtures / test_environment_file_parameters / fail / general / 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   fw_other_ip_0:
170     type: string
171
172   fw_oam_protected_ips:
173     type: comma_delimited_list
174
175 resources:
176
177   STARKDB_cinder_attach:
178     type: OS::Cinder::VolumeAttachment
179     properties:
180       server: { get_resource: STARKDB_server_0 }
181       volume: { get_param: stark_vol1_id }
182
183   STARKDB_server_0:
184     type: OS::Nova::Server
185     properties:
186       image: { get_param: STARKDB_image_name }
187       flavor: { get_param: STARKDB_flavor_dvdfg }
188       name: { get_param: starkdb_name }
189       metadata:
190         vnf_id: { get_param: vnf_id }
191         vf_module_id: { get_param: vf_module_id }
192         vnf_name: { get_param: vnf_name }
193         #int_network_id: { get_resource: int_priv_network }
194         workload_context: { get_param: workload_context }
195         environment_context: { get_param: environment_context }
196         #valet_groups: "safnkl, sdaflksanl"
197       networks:
198         - port: { get_resource: STARKDB_0_int_priv_port_0 }
199         - port: { get_resource: STARKDB_0_PRIV_port_1}
200         - port: { get_resource: STARKDB_0_crazy_port_0 }
201         - network: { get_param: int_priv_net_id }
202       user_data: { get_file: deep-nested.file }
203         
204
205   STARKDB_server_1:
206     type: OS::Nova::Server
207     properties:
208       image: { get_param: STARKDB_image_name }
209       flavor: { get_param: STARKDB_flavor_dvdfg }
210       name: { get_param: STARKDB_name }
211       metadata:
212         vnf_id: { get_param: vnf_id }
213         vf_module_id: { get_param: vf_module_id }
214         vnf_name: { get_param: vnf_name }
215         #int_network_id: { get_resource: int_priv_network }
216         workload_context: { get_param: workload_context }
217         environment_context: { get_param: environment_context }
218         #valet_groups: "safnkl, sdaflksanl"
219       networks:
220         - port: {get_resource: STARKDB_1_int_priv_port_0}
221         - port: {get_resource: STARKDB_1_crazy_port_0}
222         - network: { get_param: int_priv_net_id }
223
224   TESTDB_server_0:
225     type: OS::Nova::Server
226     properties:
227       image: { get_param: TESTDB_image_name }
228       flavor: { get_param: TESTDB_flavor_name }
229       name: { get_param: TESTDB_name }
230       metadata:
231         vnf_id: { get_param: vnf_id }
232         vf_module_id: { get_param: vf_module_id }
233         vnf_name: { get_param: vnf_name }
234         #int_network_id: { get_resource: int_priv_network }
235         workload_context: { get_param: workload_context }
236         environment_context: { get_param: environment_context }
237         #valet_groups: "safnkl, sdaflksanl"
238       networks:
239         - port: {get_resource: TESTDB_0_int_priv_port_0}
240         - network: { get_param: int_priv_net_id }
241
242       availability_zone: { get_param: availability_zone_0 }
243
244   TESTDB_server_1:
245     type: OS::Nova::Server
246     properties:
247       image: { get_param: TESTDB_image_name }
248       flavor: { get_param: TESTDB_flavor_name }
249       name: { get_param: TESTDB_name2 }
250       metadata:
251         test_fqdn: { get_param: myvm_net_fqdn }
252         vnf_id: { get_param: vnf_id }
253         vf_module_id: { get_param: vf_module_id }
254         vnf_name: { get_param: vnf_name }
255         #int_network_id: { get_resource: int_priv_network }
256         workload_context: { get_param: workload_context }
257         environment_context: { get_param: environment_context }
258         #valet_groups: "safnkl, sdaflksanl"
259       networks:
260         - port: {get_resource: TESTDB_0_int_priv_port_0}
261         - network: { get_param: int_priv_net_id }
262
263       availability_zone: 
264         str_replace:
265           template: $AZ$VALET_HOST_ASSIGNMENT
266           params:
267             $AZ: { get_param: availability_zone_0 }
268             $VALET_HOST_ASSIGNMENT: { get_param: [ TESTDB_valet_hosts, 0 ] }
269
270
271   vol_attachment:
272     type: OS::Cinder::VolumeAttachment
273     properties:
274       volume_id: { get_param: stark_vol1_id }
275       server: { get_resource: STARKDB_server_0 }
276
277   int_private_net_id:
278     type: OS::Neutron::Net
279     properties:
280       name: { get_param: int_priv_net_id }
281
282   priv_network:
283     type: OS::Neutron::Net
284     properties:
285       fnsdf: nksldfnkl
286
287   stark_nested_resource:
288     type: STARKDB-nested.yaml
289     properties:
290       my_nested_parame: { get_param: vnf_id }
291       subnet_uuid: { get_param: subnet_uuid }
292
293   int_priv_subnet:
294       type: OS::Neutron::Subnet
295       properties:
296           name: { get_param: int_priv_subnet_name}
297           network_id: { get_resource: int_private_net_id }
298
299   STARKDB_0_int_priv_port_0:
300     type: OS::Neutron::Port
301     properties:
302       network: { get_resource: int_private_net_id }
303       fixed_ips:
304         - subnet: { get_resource: int_priv_subnet }
305         - ip_address: { get_param: STARKDB_int_private_v6_ips }
306
307       
308   STARKDB_0_crazy_port_0:
309     type: OS::Neutron::Port
310     properties:
311       network: { get_param: crazy_net_id }
312       fixed_ips: 
313         - subnet: { get_param: crazy_subnet_id }
314         - ip_address: { get_param: STARKDB_crazy_ip_0 }
315       allowed_address_pairs: [ { "ip_address": {get_param:
316         STARKDB_crazy_floating_ip}}]
317
318
319   STARKDB_1_crazy_port_0:
320     type: OS::Neutron::Port
321     properties:
322       network: { get_param: crazy_net_id }
323       fixed_ips: 
324         - subnet: { get_param: crazy_subnet_id }
325         - ip_address: { get_param: STARKDB_crazy_ip_1 }
326       allowed_address_pairs: [ { "ip_address": {get_param:
327         STARKDB_crazy_floating_ip}}]
328
329   STARKDB_1_int_priv_port_0:
330     type: OS::Neutron::Port
331     properties:
332       network: { get_resource: int_private_net_id }
333
334
335   TESTDB_0_int_priv_port_0:
336     type: OS::Neutron::Port
337     properties:
338       network: { get_param: int_priv_net_id }
339
340   STARKDB_0_PRIV_port_1:
341     type: OS::Neutron::Port
342     properties:
343       network: { get_param: priv_net_id }
344
345   STARKDB_cloud_config:
346     type: OS::Heat::CloudConfig
347
348   subnet_uuid:
349     type: string
350
351
352   myrouteprefix:
353     type: OS::ContrailV2::InterfaceRouteTable
354     properties:
355       name:
356         str_replace:
357           template: VNF_NAME_interface_route_table
358           params:
359             VNF_NAME: { get_param: vnf_name }
360       interface_route_table_routes:
361         interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
362         test: safd
363
364   stark_rg:
365     type: OS::Heat::ResourceGroup
366     properties:
367       count: { get_param: stark_rg_count }
368       resource_def:
369         type: STARKDB-nested.yaml
370         properties:
371           my_nested_parameter: 4
372           subnet_uuid: { get_param: subnet_uuid }
373
374   fw_0_oam_protected_vmi_0_IP_0:
375     type: OS::ContrailV2::InstanceIp
376     properties:
377       instance_ip_address: { get_param: [fw_oam_protected_ips, get_param: index ] }
378
379   fw_0_int_other_vmi_0_IP_0:
380     type: OS::ContrailV2::InstanceIp
381     properties:
382       instance_ip_address: { get_param: fw_other_ip_0 }
383       subnet_uuid: { get_param: subnet_uuid }
384
385 outputs:
386   test_output:
387     value: { list_join: [',', [ { get_param: param_X }, { get_param: stark_vol1_id } ] ] }
388
389   int_priv_su2bnet_id:
390     value: { get_resource: int_priv_subnet }
391
392   int_priv_net_id:
393     value: { get_resource: int_private_net_id }
394
395   STARKDB_crazy_floating_ip:
396     value: { get_param: STARKDB_crazy_floating_ip }
397
398   crazy_subnet_id:
399     value: { get_param: crazy_subnet_id }
400
401   crazy_net_id:
402     value: { get_param: crazy_net_id }