[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 / base_mso.yml
1 heat_template_version: 2015-04-30
2
3 description: |
4   Example HOT file illustrating elasticity groups.
5
6 parameters:
7
8   backup_file:
9     type: string
10     description: |
11       <cURL path>/<backup file>
12       This is only used for restore (aka "disaster recovery").
13       The value only needs to go to the OAM pair.
14       Note that there is a 255 character limit on this value.
15
16   cloud_name_delimiter:
17     type: string
18     description: Separator for cloud resource naming.
19
20   install_config:
21     type: string
22     description: JSON formatted string of install config values.
23
24   lcm_keypair:
25     type: string
26     description: Keypair used for lifecycle management access.
27     constraints:
28       - custom_constraint: nova.keypair
29
30   default_action:
31     type: string
32     description: |
33       Default action for all VMs. This may be overridden for
34       specific VM groups, pairs or VMs via the ENV file.
35     constraints:
36       - allowed_values:
37         - "install"
38         - "recreate"
39         - "scale-in"
40         - "scale-out"
41         - "heal"
42         - "update"
43
44   int_vlan_id:
45     type: string
46     description: Optional VLAN associated with the (0th) internal network.
47     constraints:
48       - allowed_pattern: "[0-9]*"
49         description: VLAN Ids are expressed in base 10 digits.
50
51   ssh_access_key:
52     type: string
53     description: |
54       Optional SSH public key value for lifecycle management
55       administrative access.
56
57   v4_dns_server:
58     type: string
59     description: |
60       (optional) IPV4 DNS server list.
61       It is passed as a string instead of a CDL because
62       of how it is handled internally.
63
64   v6_dns_server:
65     type: string
66     description: |
67       (optional) IPV6 DNS server list.
68       It is passed as a string instead of a CDL because
69       of how it is handled internally.
70
71   v4_enum_server:
72     type: string
73     description: |
74       (optional) IPV4 ENUM server list.
75       It is passed as a string instead of a CDL because
76       of how it is handled internally.
77
78   v6_enum_server:
79     type: string
80     description: |
81       (optional) IPV6 ENUM server list.
82       It is passed as a string instead of a CDL because
83       of how it is handled internally.
84
85   v4_ntp_server:
86     type: string
87     description: |
88       (optional) IPV4 NTP server list.
89       It is passed as a string instead of a CDL because
90       of how it is handled internally.
91
92   v6_ntp_server:
93     type: string
94     description: |
95       (optional) IPV6 NTP server list.
96       It is passed as a string instead of a CDL because
97       of how it is handled internally.
98
99   vnf_id:
100     type: string
101     description: Unique ID for this VNF instance.
102     default: ""
103
104   vnf_name:
105     type: string
106     description: Unique name for this VNF instance.
107     default: ""
108
109   vnf_module_id:
110     type: string
111     description: Unique ID for this VNF Module instance.
112     default: ""
113
114   vnf_module_name:
115     type: string
116     description: Unique name for this VNF module instance.
117     default: ""
118
119   net_types:
120     type: comma_delimited_list
121     description: CDL of subnet tags.
122
123   oam_management_v4_source:
124     type: string
125     description: Name of the OAM IP parameter to use.
126
127   oam_management_v4_index:
128     type: number
129     description: Index to the V4 management IP address.
130
131   oam_management_v6_source:
132     type: string
133     description: Name of the OAM IP parameter to use.
134
135   oam_management_v6_index:
136     type: number
137     description: Index to the V6 management IP address.
138
139   oam_net_id:
140     type: string
141     description: ID of the network associated with tag "oam".
142     constraints:
143       - custom_constraint: neutron.network
144
145   oam_subnet_id:
146     type: string
147     description: ID of the subnet associated with tag "oam".
148
149   oam_cidr:
150     type: string
151     description: CIDR associated with tag "oam".
152     constraints:
153       - custom_constraint: net_cidr
154
155   oam_default_gateway:
156     type: string
157     description: Default gateway IP address  associated with tag "oam".
158
159   access_net_id:
160     type: string
161     description: ID of the network associated with tag "access".
162     constraints:
163       - custom_constraint: neutron.network
164
165   access_subnet_id:
166     type: string
167     description: ID of the subnet associated with tag "access".
168
169   access_cidr:
170     type: string
171     description: CIDR associated with tag "access".
172     constraints:
173       - custom_constraint: net_cidr
174
175   access_default_gateway:
176     type: string
177     description: Default gateway IP address  associated with tag "access".
178
179   vm_counts:
180     type: json
181     description: |
182       Maps VM type tags to the number of pairs of that type.
183
184   vm_info:
185     type: json
186     description: Provides keys into type-specific parameters and vnic info.
187     default: {}
188
189   availability_zone_0:
190     type: string
191     description: Availability zone name.
192
193   availability_zone_1:
194     type: string
195     description: Availability zone name.
196
197   oam_names:
198     description: CDL of OAM VM names.
199     type: comma_delimited_list
200
201   ims_names:
202     description: CDL of IMS VM names.
203     type: comma_delimited_list
204
205   oam_image_name:
206     description: Image for this VMtype.
207     type: string
208
209   ims_image_name:
210     description: Image for this VMtype.
211     type: string
212
213   oam_flavor_name:
214     description: CDL of OAM flavor values.
215     type: string
216     constraints:
217       - custom_constraint: nova.flavor
218
219   ims_flavor_name:
220     description: CDL of IMS flavor values.
221     type: string
222     constraints:
223       - custom_constraint: nova.flavor
224
225   oam_oam_ips:
226     type: comma_delimited_list
227     description: List of IP addresses for this VMtype_NETtype combination.
228
229   ims_access_ips:
230     type: comma_delimited_list
231     description: List of IP addresses for this VMtype_NETtype combination.
232
233 resources:
234
235   FORMATXLATE:
236     type: LCP-OPENECOMP.template.yaml
237     properties:
238       backup_file: {get_param: backup_file}
239       cloud_name_delimiter: {get_param: cloud_name_delimiter}
240       default_action: {get_param: default_action}
241       install_config: {get_param: install_config}
242       lcm_keypair: {get_param: lcm_keypair}
243       ssh_access_key: {get_param: ssh_access_key}
244       v4_dns_server: {get_param: v4_dns_server}
245       v6_dns_server: {get_param: v6_dns_server}
246       v4_enum_server: {get_param: v4_enum_server}
247       v6_enum_server: {get_param: v6_enum_server}
248       v4_ntp_server: {get_param: v4_ntp_server}
249       v6_ntp_server: {get_param: v6_ntp_server}
250       vnf_id: {get_param: vnf_id}
251       vnf_name: {get_param: vnf_name}
252       vnf_module_id: {get_param: vnf_module_id}
253       vnf_module_name: {get_param: vnf_module_name}
254       net_types: {get_param: net_types}
255       net_ids: {
256         "oam": {get_param: oam_net_id},
257         "access": {get_param: access_net_id},
258         ""
259       }
260       subnet_ids: {
261         "oam": {get_param: oam_subnet_id},
262         "access": {get_param: access_subnet_id},
263         ""
264       }
265       cidrs: {
266         "oam": {get_param: oam_cidr},
267         "access": {get_param: access_cidr},
268         ""
269       }
270       default_gateways: {
271         "oam": {get_param: oam_default_gateway},
272         "access": {get_param: access_default_gateway},
273         ""
274       }
275       # This list must be ordered by group ID.
276       vmtype_list: ["oam", "ims"]
277       vmtype_count: 2
278       vm_counts: {get_param: vm_counts}
279       vm_info: {get_param: vm_info}
280       availability_zones:
281         - {get_param: availability_zone_0}
282         - {get_param: availability_zone_1}
283       images: {
284         "oam": {get_param: oam_image_name},
285         "ims": {get_param: ims_image_name},
286         "": ""
287       }
288       flavors: {
289         "oam": {get_param: oam_flavor_name},
290         "ims": {get_param: ims_flavor_name},
291         "": ""
292       }
293       ip_lists: {
294         "oam_oam_ips": {get_param: oam_oam_ips},
295         "ims_access_ips": {get_param: ims_access_ips},
296         "": []
297       }
298       name_lists: {
299         "oam": {get_param: oam_names},
300         "ims": {get_param: ims_names},
301         "": []
302       }
303
304   NOKIA-LCP-Base:
305     depends_on:
306       - FORMATXLATE
307     type: LCP-Base.template.yaml
308     properties:
309       default_prefix:
310         str_replace:
311           template: |
312             {"": "$stk$delimiter"}
313           params:
314             $stk: {get_param: "OS::stack_name"}
315             $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
316       int_net_count: 2
317       ext_net_list: ["oam", "access"]
318       ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
319       total_vm_pairs: {get_attr: [FORMATXLATE, total_vm_pairs]}
320
321   OAM_RRG:
322     depends_on:
323       - NOKIA-LCP-Base
324     type: LCP-PairGroup.template.yaml
325     properties:
326       default_action: {get_attr: [FORMATXLATE, default_action]}
327       default_name_base:
328         str_replace:
329           template: |
330             {"": "oam$delimiter0$delimiter"}
331           params:
332             $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
333       group_id: "0"
334       group_tag: "oam"
335       group_index: '0'
336       current_group_count: {get_attr: [FORMATXLATE, vm_counts, "oam"]}
337       role: "oam"
338       lcm_keypair: {get_attr: [FORMATXLATE, lcm_keypair]}
339       total_pair_count: {get_attr: [NOKIA-LCP-Base, TotalPairCount]}
340       backup_file: {get_attr: [FORMATXLATE, backup_file]}
341       name_delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
342       int_net_count: 2
343       install_config: {get_attr: [FORMATXLATE, install_config]}
344       net_info_str: {get_attr: [NOKIA-LCP-Base, NetInfoStr]}
345       sec_group: {get_attr: [NOKIA-LCP-Base, OpenSec]}
346       ssh_access_key: {get_attr: [FORMATXLATE, ssh_access_key]}
347       ssh_public_key: {get_attr: [NOKIA-LCP-Base, PublicKey]}
348       ssh_private_key: {get_attr: [NOKIA-LCP-Base, PrivateKey]}
349       stack: {get_param: "OS::stack_name"}
350       storage_size: 68
351       int_net_info: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}
352       ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
353       usage_info: {get_attr: [FORMATXLATE, usage_info]}
354       config_info: {
355         poolinfo: '["mi-0", "cnfg-0", "sns-0"]',
356         v4_static_routes: '{}',
357         v6_static_routes: '{}',
358         v4_default_gateway: "oam",
359         v6_default_gateway: "",
360         vnic_count: 3,
361         "0": { # VM member index.
362           vnic_info: {
363             "0": [
364               {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
365               {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
366             ],
367             "1": [
368               {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
369               {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
370             ],
371             "2": [
372               {"count": "3", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["oam"]},
373               {"label": "servicetype=cnfg-0;float;nitype=default;subnet=oam", "subnet": "oam"},
374               {"label": "servicetype=mi-0;float;nitype=default;subnet=oam", "subnet": "oam"},
375               {"label": "servicetype=mi-0;fixed;nitype=default;subnet=oam", "subnet": "oam"},
376             ],
377           }
378         },
379         "1": {
380           vnic_info: {
381             "0": [
382               {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
383               {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
384             ],
385             "1": [
386               {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
387               {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
388             ],
389             "2": [
390               {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["oam"]},
391               {"label": "servicetype=mi-0;fixed;nitype=default;subnet=oam", "subnet": "oam"},
392             ],
393           }
394         }
395       }
396
397   IMS_RRG:
398     type: OS::Heat::ResourceGroup
399     depends_on:
400       - NOKIA-LCP-Base
401     properties:
402       count: {get_attr: [FORMATXLATE, vm_counts, "ims"]}
403       resource_def:
404         type: LCP-PairGroup.template.yaml
405         properties:
406           default_action: {get_attr: [FORMATXLATE, default_action]}
407           default_name_base:
408             str_replace:
409               template: |
410                 {"": "ims$delimiter%index%$delimiter"}
411               params:
412                 $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
413           group_id: "1"
414           lcm_keypair: {get_attr: [FORMATXLATE, lcm_keypair]}
415           group_tag: "ims"
416           group_index: '%index%'
417           current_group_count: {get_attr: [FORMATXLATE, vm_counts, "ims"]}
418           total_pair_count: {get_attr: [NOKIA-LCP-Base, TotalPairCount]}
419           name_delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
420           net_info_str: {get_attr: [NOKIA-LCP-Base, NetInfoStr]}
421           sec_group: {get_attr: [NOKIA-LCP-Base, OpenSec]}
422           ssh_access_key: {get_attr: [FORMATXLATE, ssh_access_key]}
423           ssh_public_key: {get_attr: [NOKIA-LCP-Base, PublicKey]}
424           ssh_private_key: {get_attr: [NOKIA-LCP-Base, PrivateKey]}
425           stack: {get_param: "OS::stack_name"}
426           storage_size: 4
427           install_config: {get_attr: [FORMATXLATE, install_config]}
428           int_net_count: 2
429           int_net_info: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}
430           ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
431           usage_info: {get_attr: [FORMATXLATE, usage_info]}
432           config_info: {
433             poolinfo: '["ims-0", "ims-1", "gos-0"]',
434             v4_static_routes: '{
435               "ims-0": {"subnet": "access", "dest_subnet": "2.2.2.0", "mask": "255.255.255.0"},
436               "ims-1": {"subnet": "access", "dest_subnet": "2.2.2.0", "mask": "255.255.255.0"}
437             }',
438             v6_static_routes: '{}',
439             v4_default_gateway: "access",
440             v6_default_gateway: "",
441             vnic_count: 3,
442             "0": { # VM member index.
443               vnic_info: {
444                 "0": [
445                   {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
446                   {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
447                 ],
448                 "1": [
449                   {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
450                   {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
451                 ],
452                 "2": [
453                   {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["access"]},
454                   {"label": "servicetype=ims-0;float;nitype=published;subnet=access", "subnet": "access"},
455                 ],
456               }
457             },
458             "1": {
459               vnic_info: {
460                 "0": [
461                   {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
462                   {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
463                 ],
464                 "1": [
465                   {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
466                   {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
467                 ],
468                 "2": [
469                   {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["access"]},
470                   {"label": "servicetype=ims-1;float;nitype=published;subnet=access", "subnet": "access"},
471                 ],
472               }
473             }
474           }
475
476 outputs:
477
478   oam_management_v4_address:
479     description: IPV4 of the active MI service.
480     value: {get_param: [{get_param: oam_management_v4_source}, {get_param: oam_management_v4_index}]}
481
482   oam_management_v6_address:
483     description: IPV6 of the active MI service.
484     value: {get_param: [{get_param: oam_management_v6_source}, {get_param: oam_management_v6_index}]}
485
486   internal_net_info:
487     description: |
488       Internal network IDs, CIDR etc. for use by modular additions to
489       this stack.
490     value: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}