summaryrefslogtreecommitdiffstats
path: root/docs/Chapter5/Heat/ONAP Heat Resource ID and Parameter Naming Convention/Nova Parameters.rst
blob: 12fa33f591bec04788a0226ed0e4b8ea9187df96 (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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
.. Licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 AT&T Intellectual Property.  All rights reserved.


Resource: OS::Nova::Server - Parameters
-----------------------------------------------------------------------

The OS::Nova::Server resource manages the running virtual machine (VM)
instance within an OpenStack cloud. (See
https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::Server)

The following four properties of the ``OS::Nova::Server``
resource must follow an
ONAP specified naming convention.

1. ``image``

2. ``flavor``

3. ``name``

4. ``availability_zone``

Requirement R-01455 defines how the ``{vm-type]`` is defined.

Requirement R-82481 defines how the ``{vm-type}`` is used.

.. req::
    :id: R-304011
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :introduced: casablanca

    A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource's

    * Resource ID (defined in R-29751)
    * property ``image`` parameter name (defined in R-58670)
    * property ``flavor`` parameter name (defined in R-45188)
    * property ``name`` parameter name (defined in R-54171 & R-87817)
    * property port referenced OS::Neutron::Port Resource ID
      (defined in R-20453)

    **MUST** contain the identical ``{vm-type}``
    and **MUST** follow the naming conventions defined
    in R-58670, R-45188, R-54171, R-87817, and R-29751.  And the ``{index}`` in
    the ``OS::Nova::Server`` Resource ID (defined in R-29751) **MUST** match
    the ``{vm-type_index}`` defined in
    the ``OS::Nova::Server`` property ``port``
    referenced ``OS::Neutron::Port`` Resource ID (defined in R-20453).


The table below provides a summary. The sections that follow provides
the detailed requirements.

.. csv-table:: **Table 1 OS::Nova::Server Resource Property Parameter Naming Convention**
   :header: Resource,Property,Parameter Type,Parameter Name,Parameter Value Provided to Heat
   :align: center
   :widths: auto

   OS::Nova::Server, image, string, {vm-type}_image_name, Environment File
   OS::Nova::Server, flavor, string, {vm-type}_flavor_name, Environment File
   OS::Nova::Server, name, string, {vm-type}_name_{index}, ONAP
   OS::Nova::Server, name, CDL, {vm-type}_names, ONAP
   OS::Nova::Server, availability_zone, string, availability_zone_{index}, ONAP

.. _Property image:

Property: image
^^^^^^^^^^^^^^^


.. req::
    :id: R-901331
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :introduced: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``image`` value **MUST** be be obtained via a ``get_param``.

.. req::
    :id: R-71152
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``image`` parameter **MUST** be declared as type: ``string``.

.. req::
    :id: R-58670
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``image`` parameter name **MUST** follow the naming convention
    ``{vm-type}_image_name``.

.. req::
    :id: R-91125
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``image`` parameter **MUST** be enumerated in the Heat Orchestration
    Template's Environment File and a value **MUST** be assigned.

.. req::
    :id: R-57282
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    Each VNF's Heat Orchestration Template's ``{vm-type}`` **MUST**
    have a unique parameter name for the ``OS::Nova::Server`` property
    ``image`` even if more than one ``{vm-type}`` shares the same image.

*Example Parameter Definition*

.. code-block:: yaml

 parameters:
     {vm-type}_image_name:
         type: string
         description: {vm-type} server image

.. _Property flavor:

Property: flavor
^^^^^^^^^^^^^^^^^^


.. req::
    :id: R-481670
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :introduced: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``flavor`` value **MUST** be be obtained via a ``get_param``.

.. req::
    :id: R-50436
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``flavor`` parameter **MUST** be declared as type: ``string``.

.. req::
    :id: R-45188
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource 'OS::Nova::Server' property
    ``flavor`` parameter name **MUST** follow the naming convention
    ``{vm-type}_flavor_name``.

.. req::
    :id: R-69431
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``flavor`` parameter **MUST** be enumerated in the Heat Orchestration
    Template's Environment File and a value **MUST** be assigned.

.. req::
    :id: R-40499
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    Each VNF's Heat Orchestration Template's ``{vm-type}`` **MUST**
    have a unique parameter name for the ``OS::Nova::Server`` property
    ``flavor`` even if more than one ``{vm-type}`` shares the same flavor.

*Example Parameter Definition*

.. code-block:: yaml

 parameters:
     {vm-type}_flavor_name:
         type: string
         description: {vm-type} flavor

Property: Name
^^^^^^^^^^^^^^^^^


.. req::
    :id: R-663631
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :introduced: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``name`` value **MUST** be be obtained via a ``get_param``.

.. req::
    :id: R-51430
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``name`` parameter **MUST** be declared as either type ``string``
    or type ``comma_delimited_list``.

.. req::
    :id: R-54171
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    When the VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``name`` parameter is defined as a ``string``,
    the parameter name **MUST** follow the naming convention

    * ``{vm-type}_name_{index}``

    where ``{index}`` is a numeric value that **MUST** start at
    zero in a VNF's Heat Orchestration Template and **MUST** increment by one.

.. req::
    :id: R-87817
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    When the VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``name`` parameter is defined as a ``comma_delimited_list``,
    the parameter name **MUST** follow the naming convention
    ``{vm-type}_names``.

.. req::
    :id: R-22838
    :target: VNF
    :keyword: MUST NOT
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``name`` parameter **MUST NOT** be enumerated in the Heat Orchestration
    Template's Environment File.

If a VNF's Heat Orchestration Template's contains more than three
OS::Nova::Server resources of a given ``{vm-type}``, the comma_delimited_list
form of the parameter name (i.e., ``{vm-type}_names``) should be used to
minimize the number of unique parameters defined in the template.


*Example: Parameter Definition*

.. code-block:: yaml

  parameters:

  {vm-type}_names:
    type: comma_delimited_list
    description: VM Names for {vm-type} VMs

  {vm-type}_name_{index}:
    type: string
    description: VM Name for {vm-type} VM {index}

*Example: comma\_delimited\_list*

In this example, the {vm-type} has been defined as "lb" for load balancer.

.. code-block:: yaml

  parameters:

    lb_names:
      type: comma_delimited_list
      description: VM Names for lb VMs

  resources:
    lb_server_0:
      type: OS::Nova::Server
      properties:
        name: { get_param: [lb_names, 0] }
        ...

    lb_server_1:
      type: OS::Nova::Server
      properties:
        name: { get_param: [lb_names, 1] }
        ...

*Example: fixed-index*

In this example, the {vm-type} has been defined as "lb" for load balancer.

.. code-block:: yaml

  parameters:

    lb_name_0:
      type: string
      description: VM Name for lb VM 0

    lb_name_1:
      type: string
      description: VM Name for lb VM 1

  resources:

    lb_server_0:
      type: OS::Nova::Server
      properties:
        name: { get_param: lb_name_0 }
        ...

    lb_server_1:
      type: OS::Nova::Server
      properties:
        name: { get_param: lb_name_1 }
        ...

Contrail Issue with Values for OS::Nova::Server Property Name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


.. req::
    :id: R-44271
    :target: VNF
    :keyword: SHOULD NOT
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``name`` parameter value **SHOULD NOT** contain special characters
    since the Contrail GUI has a limitation displaying special characters.

    However, if special characters must be used, the only special characters
    supported are: --- \" ! $ ' (\ \ ) = ~ ^ | @ ` { } [ ] > , . _


Property: availability_zone
^^^^^^^^^^^^^^^^^^^^^^^^^^^


.. req::
    :id: R-98450
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property ``availability_zone`` parameter name 
    **MUST** follow the naming convention
    
    * ``availability_zone_{index}`` 

    where ``{index}`` is a numeric value that **MUST** start at zero
    in a VNF's Heat Orchestration Templates and **MUST**
    increment by one.

.. req::
    :id: R-23311
    :target: VNF
    :keyword: MUST
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource
    ``OS::Nova::Server`` property
    ``availability_zone`` parameter **MUST** be declared as type: ``string``.

The parameter must not be declared as type ``comma_delimited_list``, ONAP does
not support it.

.. req::
    :id: R-59568
    :target: VNF
    :keyword: MUST NOT
    :validation_mode: static
    :updated: casablanca

    The VNF's Heat Orchestration Template's Resource ``OS::Nova::Server``
    property
    ``availability_zone`` parameter **MUST NOT** be enumerated in the Heat
    Orchestration
    Template's Environment File.

Example Parameter Definition

.. code-block:: yaml

  parameters:
    availability_zone_{index}:
      type: string
      description: availability zone {index} name

Requirement :need:`R-90279` states that a VNF Heat Orchestration's template's
parameter MUST be used in a resource with the exception of the parameters
for the OS::Nova::Server resource property availability_zone.


.. req::
    :id: R-01359
    :target: VNF
    :keyword: MAY
    :updated: casablanca

    A VNF's Heat Orchestration Template that contains an ``OS::Nova:Server``
    Resource **MAY** define a parameter for the property
    ``availability_zone`` that is not utilized in any ``OS::Nova::Server``
    resources in the Heat Orchestration Template.

Example
^^^^^^^^^^^

The example below depicts part of a Heat Orchestration Template that
uses the four ``OS::Nova::Server`` properties discussed in this section.

In the Heat Orchestration Template below, four Virtual Machines
(``OS::Nova::Server``) are created: two dns servers with ``{vm-type}`` set to
``dns`` and two oam servers with ``{vm-type}`` set to ``oam``.
Note that the parameter
associated with the property name is a ``comma_delimited_list`` for ``dns`` and
a string for ``oam``.

.. code-block:: yaml

  parameters:

    dns_image_name:
      type: string
      description: dns server image

    dns_flavor_name:
      type: string
      description: dns server flavor

    dns_names:
      type: comma_delimited_list
      description: dns server names

    oam_image_name:
      type: string
      description: oam server image

    oam_flavor_name:
      type: string
      description: oam server flavor

    oam_name_0:
      type: string
      description: oam server name 0

    oam_name_1:
      type: string
      description: oam server name 1

    availability_zone_0:
      type: string
      description: availability zone ID or Name

    availability_zone_1:
      type: string
      description: availability zone ID or Name

  resources:

    dns_server_0:
      type: OS::Nova::Server
      properties:
        name: { get_param: [ dns_names, 0 ] }
        image: { get_param: dns_image_name }
        flavor: { get_param: dns_flavor_name }
        availability_zone: { get_param: availability_zone_0 }

  . . .

      dns_server_1:
        type: OS::Nova::Server
        properties:
          name: { get_param: [ dns_names, 1 ] }
          image: { get_param: dns_image_name }
          flavor: { get_param: dns_flavor_name }
          availability_zone: { get_param: availability_zone_1 }

  . . .

      oam_server_0:
        type: OS::Nova::Server
        properties:
          name: { get_param: oam_name_0 }
          image: { get_param: oam_image_name }
          flavor: { get_param: oam_flavor_name }
          availability_zone: { get_param: availability_zone_0 }

  . . .

      oam_server_1:
        type: OS::Nova::Server
        properties:
          name: { get_param: oam_name_1 }
          image: { get_param: oam_image_name }
          flavor: { get_param: oam_flavor_name }
          availability_zone: { get_param: availability_zone_1 }

  . . .

Boot Options
^^^^^^^^^^^^^^^


.. req::
    :id: R-99798
    :target: VNF
    :keyword: MAY
    :updated: casablanca

    A VNF's Heat Orchestration Template's Virtual Machine
    (i.e., ``OS::Nova::Server`` resource) **MAY** boot from an image or
    **MAY** boot from a Cinder Volume.

.. req::
    :id: R-83706
    :target: VNF
    :keyword: MUST
    :validation_mode: none
    :updated: casablanca

    When a VNF's Heat Orchestration Template's Virtual Machine
    (i.e., ``OS::Nova::Server`` resource) boots from an image, the
    ``OS::Nova::Server`` resource property ``image`` **MUST** be used.

The requirements associated with
the 'image' property are detailed in `Property: image`_


.. req::
    :id: R-69588
    :target: VNF
    :keyword: MUST
    :validation_mode: none
    :updated: casablanca

    When a VNF's Heat Orchestration Template's Virtual Machine
    (i.e., ``OS::Nova::Server`` Resource) boots from Cinder Volume, the
    ``OS::Nova::Server`` resource property
    ``block_device_mapping`` or ``block_device_mapping_v2``
    **MUST** be used.

There are currently no heat guidelines
associated with these two properties:
'block_device_mapping' and 'block_device_mapping_v2'.