aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrDynamicParamEmptyMap/inputs/base_mso.yml
blob: 520eb293497c4cf9d4b8cce6de89b74c2ee81b6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
heat_template_version: 2015-04-30

description: |
  Example HOT file illustrating elasticity groups.

parameters:

  backup_file:
    type: string
    description: |
      <cURL path>/<backup file>
      This is only used for restore (aka "disaster recovery").
      The value only needs to go to the OAM pair.
      Note that there is a 255 character limit on this value.

  cloud_name_delimiter:
    type: string
    description: Separator for cloud resource naming.

  install_config:
    type: string
    description: JSON formatted string of install config values.

  lcm_keypair:
    type: string
    description: Keypair used for lifecycle management access.
    constraints:
      - custom_constraint: nova.keypair

  default_action:
    type: string
    description: |
      Default action for all VMs. This may be overridden for
      specific VM groups, pairs or VMs via the ENV file.
    constraints:
      - allowed_values:
        - "install"
        - "recreate"
        - "scale-in"
        - "scale-out"
        - "heal"
        - "update"

  int_vlan_id:
    type: string
    description: Optional VLAN associated with the (0th) internal network.
    constraints:
      - allowed_pattern: "[0-9]*"
        description: VLAN Ids are expressed in base 10 digits.

  ssh_access_key:
    type: string
    description: |
      Optional SSH public key value for lifecycle management
      administrative access.

  v4_dns_server:
    type: string
    description: |
      (optional) IPV4 DNS server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  v6_dns_server:
    type: string
    description: |
      (optional) IPV6 DNS server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  v4_enum_server:
    type: string
    description: |
      (optional) IPV4 ENUM server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  v6_enum_server:
    type: string
    description: |
      (optional) IPV6 ENUM server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  v4_ntp_server:
    type: string
    description: |
      (optional) IPV4 NTP server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  v6_ntp_server:
    type: string
    description: |
      (optional) IPV6 NTP server list.
      It is passed as a string instead of a CDL because
      of how it is handled internally.

  vnf_id:
    type: string
    description: Unique ID for this VNF instance.
    default: ""

  vnf_name:
    type: string
    description: Unique name for this VNF instance.
    default: ""

  vnf_module_id:
    type: string
    description: Unique ID for this VNF Module instance.
    default: ""

  vnf_module_name:
    type: string
    description: Unique name for this VNF module instance.
    default: ""

  net_types:
    type: comma_delimited_list
    description: CDL of subnet tags.

  oam_management_v4_source:
    type: string
    description: Name of the OAM IP parameter to use.

  oam_management_v4_index:
    type: number
    description: Index to the V4 management IP address.

  oam_management_v6_source:
    type: string
    description: Name of the OAM IP parameter to use.

  oam_management_v6_index:
    type: number
    description: Index to the V6 management IP address.

  oam_net_id:
    type: string
    description: ID of the network associated with tag "oam".
    constraints:
      - custom_constraint: neutron.network

  oam_subnet_id:
    type: string
    description: ID of the subnet associated with tag "oam".

  oam_cidr:
    type: string
    description: CIDR associated with tag "oam".
    constraints:
      - custom_constraint: net_cidr

  oam_default_gateway:
    type: string
    description: Default gateway IP address  associated with tag "oam".

  access_net_id:
    type: string
    description: ID of the network associated with tag "access".
    constraints:
      - custom_constraint: neutron.network

  access_subnet_id:
    type: string
    description: ID of the subnet associated with tag "access".

  access_cidr:
    type: string
    description: CIDR associated with tag "access".
    constraints:
      - custom_constraint: net_cidr

  access_default_gateway:
    type: string
    description: Default gateway IP address  associated with tag "access".

  vm_counts:
    type: json
    description: |
      Maps VM type tags to the number of pairs of that type.

  vm_info:
    type: json
    description: Provides keys into type-specific parameters and vnic info.
    default: {}

  availability_zone_0:
    type: string
    description: Availability zone name.

  availability_zone_1:
    type: string
    description: Availability zone name.

  oam_names:
    description: CDL of OAM VM names.
    type: comma_delimited_list

  ims_names:
    description: CDL of IMS VM names.
    type: comma_delimited_list

  oam_image_name:
    description: Image for this VMtype.
    type: string

  ims_image_name:
    description: Image for this VMtype.
    type: string

  oam_flavor_name:
    description: CDL of OAM flavor values.
    type: string
    constraints:
      - custom_constraint: nova.flavor

  ims_flavor_name:
    description: CDL of IMS flavor values.
    type: string
    constraints:
      - custom_constraint: nova.flavor

  oam_oam_ips:
    type: comma_delimited_list
    description: List of IP addresses for this VMtype_NETtype combination.

  ims_access_ips:
    type: comma_delimited_list
    description: List of IP addresses for this VMtype_NETtype combination.

resources:

  FORMATXLATE:
    type: LCP-OPENECOMP.template.yaml
    properties:
      backup_file: {get_param: backup_file}
      cloud_name_delimiter: {get_param: cloud_name_delimiter}
      default_action: {get_param: default_action}
      install_config: {get_param: install_config}
      lcm_keypair: {get_param: lcm_keypair}
      ssh_access_key: {get_param: ssh_access_key}
      v4_dns_server: {get_param: v4_dns_server}
      v6_dns_server: {get_param: v6_dns_server}
      v4_enum_server: {get_param: v4_enum_server}
      v6_enum_server: {get_param: v6_enum_server}
      v4_ntp_server: {get_param: v4_ntp_server}
      v6_ntp_server: {get_param: v6_ntp_server}
      vnf_id: {get_param: vnf_id}
      vnf_name: {get_param: vnf_name}
      vnf_module_id: {get_param: vnf_module_id}
      vnf_module_name: {get_param: vnf_module_name}
      net_types: {get_param: net_types}
      net_ids: {
        "oam": {get_param: oam_net_id},
        "access": {get_param: access_net_id},
        ""
      }
      subnet_ids: {
        "oam": {get_param: oam_subnet_id},
        "access": {get_param: access_subnet_id},
        ""
      }
      cidrs: {
        "oam": {get_param: oam_cidr},
        "access": {get_param: access_cidr},
        ""
      }
      default_gateways: {
        "oam": {get_param: oam_default_gateway},
        "access": {get_param: access_default_gateway},
        ""
      }
      # This list must be ordered by group ID.
      vmtype_list: ["oam", "ims"]
      vmtype_count: 2
      vm_counts: {get_param: vm_counts}
      vm_info: {get_param: vm_info}
      availability_zones:
        - {get_param: availability_zone_0}
        - {get_param: availability_zone_1}
      images: {
        "oam": {get_param: oam_image_name},
        "ims": {get_param: ims_image_name},
        "": ""
      }
      flavors: {
        "oam": {get_param: oam_flavor_name},
        "ims": {get_param: ims_flavor_name},
        "": ""
      }
      ip_lists: {
        "oam_oam_ips": {get_param: oam_oam_ips},
        "ims_access_ips": {get_param: ims_access_ips},
        "": []
      }
      name_lists: {
        "oam": {get_param: oam_names},
        "ims": {get_param: ims_names},
        "": []
      }

  NOKIA-LCP-Base:
    depends_on:
      - FORMATXLATE
    type: LCP-Base.template.yaml
    properties:
      default_prefix:
        str_replace:
          template: |
            {"": "$stk$delimiter"}
          params:
            $stk: {get_param: "OS::stack_name"}
            $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
      int_net_count: 2
      ext_net_list: ["oam", "access"]
      ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
      total_vm_pairs: {get_attr: [FORMATXLATE, total_vm_pairs]}

  OAM_RRG:
    depends_on:
      - NOKIA-LCP-Base
    type: LCP-PairGroup.template.yaml
    properties:
      default_action: {get_attr: [FORMATXLATE, default_action]}
      default_name_base:
        str_replace:
          template: |
            {"": "oam$delimiter0$delimiter"}
          params:
            $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
      group_id: "0"
      group_tag: "oam"
      group_index: '0'
      current_group_count: {get_attr: [FORMATXLATE, vm_counts, "oam"]}
      role: "oam"
      lcm_keypair: {get_attr: [FORMATXLATE, lcm_keypair]}
      total_pair_count: {get_attr: [NOKIA-LCP-Base, TotalPairCount]}
      backup_file: {get_attr: [FORMATXLATE, backup_file]}
      name_delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
      int_net_count: 2
      install_config: {get_attr: [FORMATXLATE, install_config]}
      net_info_str: {get_attr: [NOKIA-LCP-Base, NetInfoStr]}
      sec_group: {get_attr: [NOKIA-LCP-Base, OpenSec]}
      ssh_access_key: {get_attr: [FORMATXLATE, ssh_access_key]}
      ssh_public_key: {get_attr: [NOKIA-LCP-Base, PublicKey]}
      ssh_private_key: {get_attr: [NOKIA-LCP-Base, PrivateKey]}
      stack: {get_param: "OS::stack_name"}
      storage_size: 68
      int_net_info: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}
      ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
      usage_info: {get_attr: [FORMATXLATE, usage_info]}
      config_info: {
        poolinfo: '["mi-0", "cnfg-0", "sns-0"]',
        v4_static_routes: '{}',
        v6_static_routes: '{}',
        v4_default_gateway: "oam",
        v6_default_gateway: "",
        vnic_count: 3,
        "0": { # VM member index.
          vnic_info: {
            "0": [
              {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
              {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
            ],
            "1": [
              {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
              {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
            ],
            "2": [
              {"count": "3", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["oam"]},
              {"label": "servicetype=cnfg-0;float;nitype=default;subnet=oam", "subnet": "oam"},
              {"label": "servicetype=mi-0;float;nitype=default;subnet=oam", "subnet": "oam"},
              {"label": "servicetype=mi-0;fixed;nitype=default;subnet=oam", "subnet": "oam"},
            ],
          }
        },
        "1": {
          vnic_info: {
            "0": [
              {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
              {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
            ],
            "1": [
              {"count": "0", "binding_type": "direct", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
              {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
            ],
            "2": [
              {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["oam"]},
              {"label": "servicetype=mi-0;fixed;nitype=default;subnet=oam", "subnet": "oam"},
            ],
          }
        }
      }

  IMS_RRG:
    type: OS::Heat::ResourceGroup
    depends_on:
      - NOKIA-LCP-Base
    properties:
      count: {get_attr: [FORMATXLATE, vm_counts, "ims"]}
      resource_def:
        type: LCP-PairGroup.template.yaml
        properties:
          default_action: {get_attr: [FORMATXLATE, default_action]}
          default_name_base:
            str_replace:
              template: |
                {"": "ims$delimiter%index%$delimiter"}
              params:
                $delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
          group_id: "1"
          lcm_keypair: {get_attr: [FORMATXLATE, lcm_keypair]}
          group_tag: "ims"
          group_index: '%index%'
          current_group_count: {get_attr: [FORMATXLATE, vm_counts, "ims"]}
          total_pair_count: {get_attr: [NOKIA-LCP-Base, TotalPairCount]}
          name_delimiter: {get_attr: [FORMATXLATE, usage_info, cloud_name_delimiter]}
          net_info_str: {get_attr: [NOKIA-LCP-Base, NetInfoStr]}
          sec_group: {get_attr: [NOKIA-LCP-Base, OpenSec]}
          ssh_access_key: {get_attr: [FORMATXLATE, ssh_access_key]}
          ssh_public_key: {get_attr: [NOKIA-LCP-Base, PublicKey]}
          ssh_private_key: {get_attr: [NOKIA-LCP-Base, PrivateKey]}
          stack: {get_param: "OS::stack_name"}
          storage_size: 4
          install_config: {get_attr: [FORMATXLATE, install_config]}
          int_net_count: 2
          int_net_info: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}
          ext_net_info: {get_attr: [FORMATXLATE, ext_net_info]}
          usage_info: {get_attr: [FORMATXLATE, usage_info]}
          config_info: {
            poolinfo: '["ims-0", "ims-1", "gos-0"]',
            v4_static_routes: '{
              "ims-0": {"subnet": "access", "dest_subnet": "2.2.2.0", "mask": "255.255.255.0"},
              "ims-1": {"subnet": "access", "dest_subnet": "2.2.2.0", "mask": "255.255.255.0"}
            }',
            v6_static_routes: '{}',
            v4_default_gateway: "access",
            v6_default_gateway: "",
            vnic_count: 3,
            "0": { # VM member index.
              vnic_info: {
                "0": [
                  {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
                  {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
                ],
                "1": [
                  {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
                  {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
                ],
                "2": [
                  {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["access"]},
                  {"label": "servicetype=ims-0;float;nitype=published;subnet=access", "subnet": "access"},
                ],
              }
            },
            "1": {
              vnic_info: {
                "0": [
                  {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet0"]},
                  {"label": "connectivity_ip;subnet=INTERNALnet0", "subnet": "INTERNALnet0"},
                ],
                "1": [
                  {"count": "0", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["INTERNALnet1"]},
                  {"label": "connectivity_ip;subnet=INTERNALnet1", "subnet": "INTERNALnet1"},
                ],
                "2": [
                  {"count": "1", "binding_type": "normal", "subnet_count": "1", "allowed_subnets": ["access"]},
                  {"label": "servicetype=ims-1;float;nitype=published;subnet=access", "subnet": "access"},
                ],
              }
            }
          }

outputs:

  oam_management_v4_address:
    description: IPV4 of the active MI service.
    value: {get_param: [{get_param: oam_management_v4_source}, {get_param: oam_management_v4_index}]}

  oam_management_v6_address:
    description: IPV6 of the active MI service.
    value: {get_param: [{get_param: oam_management_v6_source}, {get_param: oam_management_v6_index}]}

  internal_net_info:
    description: |
      Internal network IDs, CIDR etc. for use by modular additions to
      this stack.
    value: {get_attr: [NOKIA-LCP-Base, IntNetInfo]}