[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / getAttrDynamicParamEmptyMap / inputs / LCP-OPENECOMP.template.yaml
1 heat_template_version: 2015-04-30
2
3 description: |
4   Template to take OPENECOMP input parameters and produce outputs
5   in the desired format for the underlying LCP HOT template files.
6
7 parameters:
8
9   backup_file:
10     type: string
11     description: |
12       <cURL path>/<backup file>
13       This is only used for restore (aka "disaster recovery").
14       The value only needs to go to the OAM pair.
15       Note that there is a 255 character limit on this value.
16
17   default_action:
18     type: string
19     description: |
20       Default action for all VMs. This may be overridden for
21       specific VM groups, pairs or VMs via the ENV file.
22
23   cloud_name_delimiter:
24     type: string
25     description: |
26       Separator used between parts of a cloud resource name
27       (e.g. between the stack ID and the rest of the name).
28
29   install_config:
30     type: string
31     description: JSON formatted string of install config values.
32
33   int_vlan_id:
34     type: string
35     description: Optional VLAN ID associated with the internal network.
36     default: ""
37
38   lcm_keypair:
39     type: string
40     description: Keypair used for lifecycle management access.
41     constraints:
42       - custom_constraint: nova.keypair
43
44   ssh_access_key:
45     type: string
46     description: |
47       Optional SSH public key value for lifecycle management
48       administrative access.
49
50   v4_dns_server:
51     type: string
52     description: (optional) IPV4 DNS server.
53     default: ""
54
55   v6_dns_server:
56     type: string
57     description: (optional) IPV6 DNS server.
58     default: ""
59
60   v4_enum_server:
61     type: string
62     description: (optional) IPV4 ENUM server.
63     default: ""
64
65   v6_enum_server:
66     type: string
67     description: (optional) IPV6 ENUM server.
68     default: ""
69
70   v4_ntp_server:
71     type: string
72     description: (optional) IPV4 NTP server.
73     default: ""
74
75   v6_ntp_server:
76     type: string
77     description: (optional) IPV6 NTP server.
78     default: ""
79
80   net_types:
81     type: comma_delimited_list
82     description: CDL of subnet tags.
83     default: []
84
85   vnf_id:
86     type: string
87     description: Unique ID for this VNF instance.
88     default: ""
89
90   vnf_name:
91     type: string
92     description: Unique name for this VNF instance.
93     default: ""
94
95   vnf_module_id:
96     type: string
97     description: Unique ID for this VNF Module instance.
98     default: ""
99
100   vnf_module_name:
101     type: string
102     description: Unique name for this VNF module instance.
103     default: ""
104
105   net_ids:
106     type: json
107     description: Map NET types to the list of NET IDs.
108
109   subnet_ids:
110     type: json
111     description: Map NET types to the list of subnet IDs.
112
113   cidrs:
114     type: json
115     description: Map NET types to the list of CIDR values.
116
117   default_gateways:
118     type: json
119     description: Map NET types to the list of default gateways.
120
121   vmtype_count:
122     type: number
123     description: Number of supported VM types.
124     default: 1
125
126   vmtype_list:
127     type: comma_delimited_list
128     description: List of VM type tags.
129     default: []
130
131   vm_counts:
132     type: json
133     description: |
134       Maps VM type tags to the number of pairs of that type.
135     default: {}
136
137   vm_info:
138     type: json
139     description: Provides keys into type-specific parameters and vnic info.
140     default: {}
141
142   availability_zones:
143     type: comma_delimited_list
144     description: CDL of availability zones.
145
146   images:
147     type: json
148     description: Maps VM type tags to the image ID for that type.
149     default: {}
150
151   flavors:
152     type: json
153     description: Maps VM type tags to the flavor ID for that type.
154     default: {}
155
156   ip_lists:
157     type: json
158     description: Maps IP list parameter names to the list.
159
160   name_lists:
161     type: json
162     description: Maps VM type tags to the list of VM names for that type.
163
164   # This parameter should always be defaulted.
165   count_str_list:
166     type: comma_delimited_list
167     description: List of 2 digit list indexes.
168     default: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"]
169
170   # This parameter should always be defaulted.
171   null2zero:
172     type: json
173     default: {"": "0"}
174
175 resources:
176
177   GROUPINFO:
178     type: OS::Heat::ResourceGroup
179     properties:
180       count: {get_param: vmtype_count}
181       resource_def:
182         type: LCP-ATTGRP.template.yaml
183         properties:
184           vmtype_index: '%index%'
185           vmtype_list: {get_param: vmtype_list}
186           vm_info: {get_param: vm_info}
187           availability_zones: {get_param: availability_zones}
188           flavors: {get_param: flavors}
189           name_lists: {get_param: name_lists}
190
191   GROUPXLATE:
192     depends_on:
193       - GROUPINFO
194     type: LCP-XlateL2J.template.yaml
195     properties:
196       info: {get_attr: [GROUPINFO, vmtype_info]}
197
198 outputs:
199
200   backup_file:
201     description: |
202       <cURL path>/<backup file>
203       This is only used for restore (aka "disaster recovery").
204       The value only needs to go to the OAM pair.
205       Note that there is a 255 character limit on this value.
206     value: {get_param: backup_file}
207
208   default_action:
209     description: |
210       Default action for all VMs. This may be overridden for
211       specific VM groups, pairs or VMs via the ENV file.
212     value: {get_param: default_action}
213
214   install_config:
215     description: JSON formatted string of install config values.
216     value: {get_param: install_config}
217
218   lcm_keypair:
219     description: Keypair used for lifecycle management access.
220     value: {get_param: lcm_keypair}
221
222   ssh_access_key:
223     description: |
224       Optional SSH public key value for lifecycle management
225       administrative access.
226     value: {get_param: ssh_access_key}
227
228   ext_net_info:
229     description: External network info.
230     value:
231       str_replace:
232         template: {str_replace: { template: "{ $val }", params: {
233           $val: {list_join: [',', {repeat: {template: "\"$tag<%idx%>\": { \"id\": \"$net<%idx%>\", \"subnet_id\": \"$subnet<%idx%>\", \"cidr\": \"$cidr<%idx%>\", \"default_gateway\": \"$defgw<%idx%>\" }", for_each: {<%idx%>: {get_param: count_str_list}}}}]} }}}
234         params:
235           $tag00: {get_param: [net_types, 0]}
236           $net00: {get_param: [net_ids, {get_param: [net_types, 0]}]}
237           $subnet00: {get_param: [subnet_ids, {get_param: [net_types, 0]}]}
238           $cidr00: {get_param: [cidrs, {get_param: [net_types, 0]}]}
239           $defgw00: {get_param: [default_gateways, {get_param: [net_types, 0]}]}
240           $tag01: {get_param: [net_types, 1]}
241           $net01: {get_param: [net_ids, {get_param: [net_types, 1]}]}
242           $subnet01: {get_param: [subnet_ids, {get_param: [net_types, 1]}]}
243           $cidr01: {get_param: [cidrs, {get_param: [net_types, 1]}]}
244           $defgw01: {get_param: [default_gateways, {get_param: [net_types, 1]}]}
245           $tag02: {get_param: [net_types, 2]}
246           $net02: {get_param: [net_ids, {get_param: [net_types, 2]}]}
247           $subnet02: {get_param: [subnet_ids, {get_param: [net_types, 2]}]}
248           $cidr02: {get_param: [cidrs, {get_param: [net_types, 2]}]}
249           $defgw02: {get_param: [default_gateways, {get_param: [net_types, 2]}]}
250           $tag03: {get_param: [net_types, 3]}
251           $net03: {get_param: [net_ids, {get_param: [net_types, 3]}]}
252           $subnet03: {get_param: [subnet_ids, {get_param: [net_types, 3]}]}
253           $cidr03: {get_param: [cidrs, {get_param: [net_types, 3]}]}
254           $defgw03: {get_param: [default_gateways, {get_param: [net_types, 3]}]}
255           $tag04: {get_param: [net_types, 4]}
256           $net04: {get_param: [net_ids, {get_param: [net_types, 4]}]}
257           $subnet04: {get_param: [subnet_ids, {get_param: [net_types, 4]}]}
258           $cidr04: {get_param: [cidrs, {get_param: [net_types, 4]}]}
259           $defgw04: {get_param: [default_gateways, {get_param: [net_types, 4]}]}
260           $tag05: {get_param: [net_types, 5]}
261           $net05: {get_param: [net_ids, {get_param: [net_types, 5]}]}
262           $subnet05: {get_param: [subnet_ids, {get_param: [net_types, 5]}]}
263           $cidr05: {get_param: [cidrs, {get_param: [net_types, 5]}]}
264           $defgw05: {get_param: [default_gateways, {get_param: [net_types, 5]}]}
265
266   total_vm_pairs:
267     description: |
268       String that will evaluate to the total number of VM pairs.
269     value:
270       str_replace:
271         template: {list_join: ['+', {repeat: {template: "$v<%vidx%>$z<%vidx%>",
272 for_each: {<%vidx%>: {get_param: count_str_list}}}}]}
273         params:
274           $v00: {get_param: [vm_counts, {get_param: [vmtype_list, 0]}]}
275           $z00: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 0]}]}]}
276           $v01: {get_param: [vm_counts, {get_param: [vmtype_list, 1]}]}
277           $z01: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 1]}]}]}
278           $v02: {get_param: [vm_counts, {get_param: [vmtype_list, 2]}]}
279           $z02: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 2]}]}]}
280           $v03: {get_param: [vm_counts, {get_param: [vmtype_list, 3]}]}
281           $z03: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 3]}]}]}
282           $v04: {get_param: [vm_counts, {get_param: [vmtype_list, 4]}]}
283           $z04: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 4]}]}]}
284           $v05: {get_param: [vm_counts, {get_param: [vmtype_list, 5]}]}
285           $z05: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 5]}]}]}
286           $v06: {get_param: [vm_counts, {get_param: [vmtype_list, 6]}]}
287           $z06: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 6]}]}]}
288           $v07: {get_param: [vm_counts, {get_param: [vmtype_list, 7]}]}
289           $z07: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 7]}]}]}
290           $v08: {get_param: [vm_counts, {get_param: [vmtype_list, 8]}]}
291           $z08: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 8]}]}]}
292           $v09: {get_param: [vm_counts, {get_param: [vmtype_list, 9]}]}
293           $z09: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 9]}]}]}
294           $v10: {get_param: [vm_counts, {get_param: [vmtype_list, 10]}]}
295           $z10: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 10]}]}]}
296           $v11: {get_param: [vm_counts, {get_param: [vmtype_list, 11]}]}
297           $z11: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 11]}]}]}
298           $v12: {get_param: [vm_counts, {get_param: [vmtype_list, 12]}]}
299           $z12: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 12]}]}]}
300           $v13: {get_param: [vm_counts, {get_param: [vmtype_list, 13]}]}
301           $z13: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 13]}]}]}
302           $v14: {get_param: [vm_counts, {get_param: [vmtype_list, 14]}]}
303           $z14: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 14]}]}]}
304           $v15: {get_param: [vm_counts, {get_param: [vmtype_list, 15]}]}
305           $z15: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 15]}]}]}
306           $v16: {get_param: [vm_counts, {get_param: [vmtype_list, 16]}]}
307           $z16: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 16]}]}]}
308           $v17: {get_param: [vm_counts, {get_param: [vmtype_list, 17]}]}
309           $z17: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 17]}]}]}
310           $v18: {get_param: [vm_counts, {get_param: [vmtype_list, 18]}]}
311           $z18: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 18]}]}]}
312           $v19: {get_param: [vm_counts, {get_param: [vmtype_list, 19]}]}
313           $z19: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 19]}]}]}
314           $v20: {get_param: [vm_counts, {get_param: [vmtype_list, 20]}]}
315           $z20: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 20]}]}]}
316           $v21: {get_param: [vm_counts, {get_param: [vmtype_list, 21]}]}
317           $z21: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 21]}]}]}
318           $v22: {get_param: [vm_counts, {get_param: [vmtype_list, 22]}]}
319           $z22: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 22]}]}]}
320           $v23: {get_param: [vm_counts, {get_param: [vmtype_list, 23]}]}
321           $z23: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 23]}]}]}
322           $v24: {get_param: [vm_counts, {get_param: [vmtype_list, 24]}]}
323           $z24: {get_param: [null2zero, {get_param: [vm_counts, {get_param: [vmtype_list, 24]}]}]}
324
325   vm_counts:
326     description: |
327       Maps VM type tags to the number of pairs of that type.
328     value: {get_param: vm_counts}
329
330   usage_info:
331     description: Usage info JSON map.
332     value: {
333       "int_vlan_id": {get_param: int_vlan_id},
334       "cloud_name_delimiter": {get_param: cloud_name_delimiter},
335       "defaults": {
336         "image": {
337           "0": {get_param: [images, {get_param: [vmtype_list, 0]}]},
338           "1": {get_param: [images, {get_param: [vmtype_list, 0]}]}
339         },
340         availability_zone: {
341           "0": {get_param: [availability_zones, 0]},
342           "1": {get_param: [availability_zones, 1]}
343         },
344         storage_zone: {
345           "0": "nova",
346           "1": "nova"
347         },
348         "binding_type": "normal"
349       },
350       "v4_dns_server": {get_param: v4_dns_server},
351       "v6_dns_server": {get_param: v6_dns_server},
352       "v4_enum_server": {get_param: v4_enum_server},
353       "v6_enum_server": {get_param: v6_enum_server},
354       "v4_ntp_server": {get_param: v4_ntp_server},
355       "v6_ntp_server": {get_param: v6_ntp_server},
356       "vnf_id": {get_param: vnf_id},
357       "vnf_name": {get_param: vnf_name},
358       "vnf_module_id": {get_param: vnf_module_id},
359       "vnf_module_name": {get_param: vnf_module_name},
360       "ATT_ip_lists": {get_param: ip_lists},
361       "ATT_vm_info": {get_param: vm_info},
362       "group_info": {get_attr: [GROUPXLATE, jout]}
363     }
364