[VVP] Adding tests for new reqs from VNFRQTS-630
[vvp/validation-scripts.git] / ice_validator / tests / fixtures / test_environment_file_parameters / pass / pass.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_avail_hosts:
55     type: string
56     description: nsfadl
57
58   STARKDB_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: njlasd
168
169   my_nested_parameter: 
170     type: string
171     description: naskl
172
173 resources:
174
175   STARKDB_cinder_attach:
176     type: OS::Cinder::VolumeAttachment
177     properties:
178       server: { get_resource: STARKDB_server_0 }
179       volume: { get_param: stark_vol1_id }
180
181   STARKDB_server_0:
182     type: OS::Nova::Server
183     properties:
184       image: { get_param: STARKDB_image_name }
185       flavor: { get_param: STARKDB_flavor_dvdfg }
186       name: { get_param: starkdb_name }
187       metadata:
188         vnf_id: { get_param: vnf_id }
189         vf_module_id: { get_param: vf_module_id }
190         vnf_name: { get_param: vnf_name }
191         workload_context: { get_param: workload_context }
192         environment_context: { get_param: environment_context }
193       networks:
194         - port: { get_resource: STARKDB_0_int_priv_port_0 }
195         - port: { get_resource: STARKDB_0_PRIV_port_1}
196         - port: { get_resource: STARKDB_0_crazy_port_0 }
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       networks:
213         - port: {get_resource: STARKDB_1_int_priv_port_0}
214         - port: {get_resource: STARKDB_1_crazy_port_0}
215
216   TESTDB_server_0:
217     type: OS::Nova::Server
218     properties:
219       image: { get_param: TESTDB_image_name }
220       flavor: { get_param: TESTDB_flavor_name }
221       name: { get_param: TESTDB_name }
222       metadata:
223         vnf_id: { get_param: vnf_id }
224         vf_module_id: { get_param: vf_module_id }
225         vnf_name: { get_param: vnf_name }
226         #int_network_id: { get_resource: int_priv_network }
227         workload_context: { get_param: workload_context }
228         environment_context: { get_param: environment_context }
229       networks:
230         - port: {get_resource: TESTDB_0_int_priv_port_0}
231       availability_zone: { get_param: availability_zone_0 }
232
233   TESTDB_server_1:
234     type: OS::Nova::Server
235     properties:
236       image: { get_param: TESTDB_image_name }
237       flavor: { get_param: TESTDB_flavor_name }
238       name: { get_param: TESTDB_name2 }
239       metadata:
240         test_fqdn: { get_param: myvm_net_fqdn }
241         vnf_id: { get_param: vnf_id }
242         vf_module_id: { get_param: vf_module_id }
243         vnf_name: { get_param: vnf_name }
244         #int_network_id: { get_resource: int_priv_network }
245         workload_context: { get_param: workload_context }
246         environment_context: { get_param: environment_context }
247       networks:
248         - port: {get_resource: TESTDB_0_int_priv_port_0}
249       availability_zone: { get_param: [ TESTDB_avail_hosts, 0 ] }
250
251
252   vol_attachment:
253     type: OS::Cinder::VolumeAttachment
254     properties:
255       volume_id: { get_param: stark_vol1_id }
256       server: { get_resource: STARKDB_server_0 }
257
258   int_private_net_id:
259     type: OS::Neutron::Net
260     properties:
261       name: { get_param: int_priv_net_id }
262
263   priv_network:
264     type: OS::Neutron::Net
265     properties:
266       fnsdf: nksldfnkl
267
268   int_priv_subnet:
269       type: OS::Neutron::Subnet
270       properties:
271           name: { get_param: int_priv_subnet_name}
272           network_id: { get_resource: int_private_net_id }
273
274   STARKDB_0_int_priv_port_0:
275     type: OS::Neutron::Port
276     properties:
277       network: { get_resource: int_private_net_id }
278       fixed_ips:
279         - subnet_id: { get_resource: int_priv_subnet }
280         - ip_address: { get_param: STARKDB_private_v6_ips }
281
282       
283   STARKDB_0_crazy_port_0:
284     type: OS::Neutron::Port
285     properties:
286       network: { get_param: crazy_net_id }
287       fixed_ips: 
288         - subnet_id: { get_param: crazy_subnet_id }
289         - ip_address: { get_param: STARKDB_crazy_ip_0 }
290       allowed_address_pairs: [ { "ip_address": {get_param:
291         STARKDB_crazy_floating_ip}}]
292
293
294   STARKDB_1_crazy_port_0:
295     type: OS::Neutron::Port
296     properties:
297       network: { get_param: crazy_net_id }
298       fixed_ips: 
299         - subnet_id: { get_param: crazy_subnet_id }
300         - ip_address: { get_param: STARKDB_crazy_ip_1 }
301       allowed_address_pairs: [ { "ip_address": {get_param:
302         STARKDB_crazy_floating_ip}}]
303
304   STARKDB_1_int_priv_port_0:
305     type: OS::Neutron::Port
306     properties:
307       network: { get_resource: int_private_net_id }
308
309
310   TESTDB_0_int_priv_port_0:
311     type: OS::Neutron::Port
312     properties:
313       network: { get_param: int_priv_net_id }
314
315   STARKDB_0_PRIV_port_1:
316     type: OS::Neutron::Port
317     properties:
318       network: { get_param: priv_net_id }
319
320   STARKDB_cloud_config:
321     type: OS::Heat::CloudConfig
322
323
324   myrouteprefix:
325     type: OS::ContrailV2::InterfaceRouteTable
326     properties:
327       name:
328         str_replace:
329           template: VNF_NAME_interface_route_table
330           params:
331             VNF_NAME: { get_param: vnf_name }
332       interface_route_table_routes:
333         interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
334         test: safd
335
336   stark_rg:
337     type: OS::Heat::ResourceGroup
338     properties:
339       count: { get_param: stark_rg_count }
340       resource_def:
341         type: STARKDB-nested.yaml
342         properties:
343           my_nested_parameter: {get_param:  my_nested_parameter}