31cb89629c26195d03fc8f8feb1d5ca38ff3c75d
[vnfrqts/requirements.git] /
1 .. Licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 AT&T Intellectual Property.  All rights reserved.
4
5 .. _Nova Server - Metadata Parameters:
6
7 Resource: OS::Nova::Server Metadata Parameters
8 --------------------------------------------------------------------------------
9
10 The ``OS::Nova::Server`` resource property ``metadata`` is an optional
11 OpenStack property.
12 Table 2 summarizes the mandatory and optional ``metadata`` supported by ONAP.
13 The sections that follow provides the requirements associated with each
14 ``metadata`` parameter.
15
16
17 .. csv-table:: **Table 2 OS::Nova::Server Mandatory and Optional Metadata**
18    :header: Resource, Property, Parameter Name, Parameter Type, Required, Parameter Value Provided to Heat
19    :align: center
20    :widths: auto
21
22    OS::Nova::Server, metadata, vnf_id, string, **MUST**, ONAP
23    OS::Nova::Server, metadata, vf_module_id, string, **MUST**, ONAP
24    OS::Nova::Server, metadata, vnf_name, string, **MUST**, ONAP
25    OS::Nova::Server, metadata, vf_module_name, string, **SHOULD**, ONAP
26    OS::Nova::Server, metadata, vm_role, string, **MAY**, YAML or Environment File
27    OS::Nova::Server, metadata, vf_module_index, number, **MAY**, ONAP
28    OS::Nova::Server, metadata, workload_context, string, **MUST**, ONAP
29    OS::Nova::Server, metadata, environment_context, string, **MUST**, ONAP
30
31 vnf_id
32 ^^^^^^^^^
33
34 The ``OS::Nova::Server`` resource property ``metadata`` key/value pair
35 ``vnf_id`` is an ONAP generated UUID that identifies the VNF.  The value
36 is provided by ONAP to the VNF's Heat Orchestration
37 Template at orchestration time.
38
39 .. req::
40     :id: R-37437
41     :target: VNF
42     :keyword: MUST
43     :validation_mode: static
44     :updated: casablanca
45
46     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
47     resource property ``metadata`` **MUST**
48     contain the  key/value pair ``vnf_id``
49     and the value **MUST** be obtained via a ``get_param``.
50
51 .. req::
52     :id: R-07507
53     :target: VNF
54     :keyword: MUST
55     :validation_mode: static
56     :updated: casablanca
57
58     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
59     resource property
60     ``metadata`` key/value pair ``vnf_id`` parameter
61     **MUST** be declared as ``vnf_id`` and the parameter **MUST**
62     be defined as type: ``string``.
63
64 .. req::
65     :id: R-55218
66     :target: VNF
67     :keyword: MUST NOT
68     :validation_mode: static
69     :updated: casablanca
70
71     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
72     resource property
73     ``metadata`` key/value pair ``vnf_id`` parameter ``vnf_id`` **MUST NOT**
74     have parameter constraints defined.
75
76 .. req::
77     :id: R-20856
78     :target: VNF
79     :keyword: MUST NOT
80     :validation_mode: static
81     :updated: casablanca
82
83     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
84     resource property
85     ``metadata`` key/value pair ``vnf_id`` parameter ``vnf_id`` **MUST NOT**
86     be enumerated in the Heat Orchestration Template's environment file.
87
88 *Example 'vnf_id' Parameter Definition*
89
90 .. code-block:: yaml
91
92   parameters:
93
94     vnf_id:
95       type: string
96       description: Unique ID for this VNF instance
97
98 vf_module_id
99 ^^^^^^^^^^^^^^^^^^^^
100
101 The OS::Nova::Server Resource ``metadata`` map value parameter ``vf_module_id``
102 is an ONAP generated UUID that identifies the VF Module (e.g., Heat
103 Orchestration Template).  The value
104 is provided by ONAP to the VNF's Heat Orchestration
105 Template at orchestration time.
106
107 .. req::
108     :id: R-71493
109     :target: VNF
110     :keyword: MUST
111     :validation_mode: static
112     :updated: casablanca
113
114     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
115     property ``metadata`` **MUST**
116     contain the key/value pair ``vf_module_id``
117     and the value MUST be obtained via a ``get_param``.
118
119 .. req::
120     :id: R-82134
121     :target: VNF
122     :keyword: MUST
123     :validation_mode: static
124     :updated: casablanca
125
126     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
127     ``metadata`` key/value pair ``vf_module_id`` parameter **MUST**
128     be declared as ``vf_module_id`` and the parameter **MUST**
129     be defined as type: ``string``.
130
131 .. req::
132     :id: R-98374
133     :target: VNF
134     :keyword: MUST NOT
135     :validation_mode: static
136     :updated: casablanca
137
138     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
139     ``metadata`` key/value pair ``vf_module_id`` parameter ``vf_module_id``
140     **MUST NOT**
141     have parameter constraints defined.
142
143 .. req::
144     :id: R-72871
145     :target: VNF
146     :keyword: MUST NOT
147     :validation_mode: static
148     :updated: casablanca
149
150     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
151     ``metadata`` key/value pair ``vf_module_id`` parameter ``vf_module_id``
152     **MUST NOT**
153     be enumerated in the Heat Orchestration Template's environment file.
154
155 *Example 'vf_module_id' Parameter Definition*
156
157 .. code-block:: yaml
158
159   parameters:
160
161     vnf_module_id:
162       type: string
163       description: Unique ID for this VNF module instance
164
165
166 vnf_name
167 ^^^^^^^^^
168
169 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vnf_name``
170 is the ONAP (SDN-C) generated alphanumeric name of the deployed VNF instance.
171 The value
172 is provided by ONAP to the VNF's Heat Orchestration
173 Template at orchestration time.
174
175 .. req::
176     :id: R-72483
177     :target: VNF
178     :keyword: MUST
179     :validation_mode: static
180     :updated: casablanca
181
182     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
183     ``metadata`` **MUST** contain the key/value pair ``vnf_name`` and the
184     value **MUST** be obtained via a ``get_param``.
185
186 .. req::
187     :id: R-62428
188     :target: VNF
189     :keyword: MUST
190     :validation_mode: static
191     :updated: casablanca
192
193     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
194     property ``metadata`` key/value pair ``vnf_name`` parameter **MUST**
195     be declared as ``vnf_name`` and the parameter **MUST** be defined as
196     type: ``string``.
197
198 .. req::
199     :id: R-44318
200     :target: VNF
201     :keyword: MUST NOT
202     :validation_mode: static
203     :updated: casablanca
204
205     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
206     property ``metadata`` key/value pair ``vnf_name``
207     parameter ``vnf_name`` **MUST NOT**
208     have parameter constraints defined.
209
210 .. req::
211     :id: R-36542
212     :target: VNF
213     :keyword: MUST NOT
214     :validation_mode: static
215     :updated: casablanca
216
217     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
218     property ``metadata`` key/value pair ``vnf_name`` parameter
219     ``vnf_name`` **MUST NOT**
220     be enumerated in the Heat Orchestration Template's environment file.
221
222
223 *Example 'vnf_name' Parameter Definition*
224
225 .. code-block:: yaml
226
227   parameters:
228
229     vnf_name:
230       type: string
231       description: Unique name for this VNF instance
232
233 vf_module_name
234 ^^^^^^^^^^^^^^^^^^
235
236 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter
237 ``vf_module_name``
238 is the deployment name of the heat stack created (e.g., ``<STACK_NAME>``)
239 from the
240 VNF's Heat Orchestration template
241 in the command ``Heat stack-create``
242 (e.g., ``Heat stack-create [-f <FILE>] [-e <FILE>] <STACK_NAME>``).
243 The ``vf_module_name`` (e.g., ``<STACK_NAME>`` is specified as
244 part of the orchestration process.
245
246 .. req::
247     :id: R-68023
248     :target: VNF
249     :keyword: MUST
250     :validation_mode: static
251     :updated: casablanca
252
253     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
254     property ``metadata`` **SHOULD**
255     contain the key/value pair ``vf_module_name`` and the value **MUST**
256     be obtained via a ``get_param``.
257
258 .. req::
259     :id: R-39067
260     :target: VNF
261     :keyword: MUST
262     :validation_mode: static
263     :updated: casablanca
264
265     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
266     property
267     ``metadata`` key/value pair ``vf_module_name`` parameter **MUST** be
268     declared as ``vf_module_name`` and the parameter **MUST**
269     be defined as type: ``string``.
270
271 .. req::
272     :id: R-15480
273     :target: VNF
274     :keyword: MUST NOT
275     :validation_mode: static
276     :updated: casablanca
277
278     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
279     property
280     ``metadata`` key/value pair ``vf_module_name`` parameter ``vf_module_name``
281     **MUST NOT** have parameter constraints defined.
282
283 .. req::
284     :id: R-80374
285     :target: VNF
286     :keyword: MUST NOT
287     :validation_mode: static
288     :updated: casablanca
289
290
291     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
292     property ``metadata`` key/value pair ``vf_module_name``
293     parameter ``vf_module_name`` **MUST NOT**
294     be enumerated in the Heat Orchestration Template's environment file.
295
296
297 *Example 'vf_module_name' Parameter Definition*
298
299 .. code-block:: yaml
300
301   parameters:
302
303     vf_module_name:
304       type: string
305       description: Unique name for this VNF Module instance
306
307 vm_role
308 ^^^^^^^^^
309
310 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vm_role``
311 is a ``metadata`` tag that describes the role of the Virtual Machine.
312
313 .. req::
314     :id: R-85328
315     :target: VNF
316     :keyword: MAY
317     :updated: casablanca
318
319     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
320     ``metadata`` **MAY**
321     contain the key/value pair ``vm_role`` and the value **MUST** be
322     obtained either via
323
324     - ``get_param``
325     - hard coded in the key/value pair ``vm_role``.
326
327 .. req::
328     :id: R-95430
329     :target: VNF
330     :keyword: MAY
331     :validation_mode: none
332     :updated: dublin
333
334     If a VNF's Heat Orchestration Template's ``OS::Nova::Server``
335     resource property
336     ``metadata`` key/value pair ``vm_role`` value is obtained via
337     ``get_param``, the parameter **MAY** be declared as
338
339     * ``vm_role`` and the parameter defined as ``type: string``.
340     * ``vm_roles`` and the parameter defined as ``type: comma_delimited_list``.
341     * ``{vm-type}_vm_role`` and the parameter defined as ``type: string``.
342
343 .. req::
344     :id: R-67597
345     :target: VNF
346     :keyword: MUST NOT
347     :validation_mode: static
348     :updated: casablanca
349
350     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
351     property ``metadata`` key/value pair ``vm_role`` parameter ``vm_role``
352     **MUST NOT** have parameter constraints defined.
353
354 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
355
356
357 .. req::
358     :id: R-86476
359     :target: VNF
360     :keyword: MUST
361     :validation_mode: static
362     :updated: casablanca
363
364     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
365     property ``metadata`` key/value pair ``vm_role`` value **MUST**
366     only contain alphanumeric characters and underscores (i.e., '_').
367
368
369 *Example 'vm_role' Parameter Definition*
370
371 .. code-block:: yaml
372
373   parameters:
374
375     vm_role:
376       type: string
377       description: Unique role for this VM
378
379 *Example: 'vm_role' Definition: Hard Coded in
380 OS::Nova::Resource metadata property*
381
382 .. code-block:: yaml
383
384   resources:
385
386     dns_server_0
387       type: OS::Nova::Server
388       properties:
389         . . . .
390         metadata:
391           vm_role: dns
392
393 *Example 'vm_role' Definition: Defined in Environment file
394 and retrieved via 'get_param'*
395
396 .. code-block:: yaml
397
398   resources:
399
400     dns_server_0:
401       type: OS::Nova::Server
402       properties:
403         . . . .
404         metadata:
405           vm_role: { get_param: vm_role }
406
407 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
408 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
409
410 The example below depicts part of a Heat Orchestration Template that
411 uses the five of the ``OS::Nova::Server`` resource
412 ``metadata`` map value parameters discussed in this
413 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
414
415 .. code-block:: yaml
416
417   parameters:
418     lb_name_0
419       type: string
420       description: VM Name for lb VM 0
421     vnf_name:
422       type: string
423       description: Unique name for this VNF instance
424     vnf_id:
425       type: string
426       description: Unique ID for this VNF instance
427     vf_module_name:
428       type: string
429       description: Unique name for this VNF Module instance
430     vf_module_id:
431       type: string
432       description: Unique ID for this VNF Module instance
433     vm_role:
434       type: string
435       description: Unique role for this VM
436   resources:
437     lb_server_0:
438       type: OS::Nova::Server
439       properties:
440         name: { get_param: lb_name_0 }
441         ...
442         metadata:
443           vnf_name: { get_param: vnf_name }
444           vnf_id: { get_param: vnf_id }
445           vf_module_name: { get_param: vf_module_name }
446           vf_module_id: { get_param: vf_module_id }
447           vm_role: lb
448
449 vf_module_index
450 ^^^^^^^^^^^^^^^^^^
451
452
453 .. req::
454     :id: R-50816
455     :target: VNF
456     :keyword: MUST
457     :updated: casablanca
458     :validation_mode: static
459
460     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
461     resource  property ``metadata`` **MAY**
462     contain the key/value pair ``vf_module_index``
463     and the value **MUST** be obtained via a ``get_param``.
464
465 .. req::
466     :id: R-54340
467     :target: VNF
468     :keyword: MUST
469     :validation_mode: static
470     :updated: casablanca
471
472     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
473     property
474     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
475     be declared as ``vf_module_index`` and the parameter **MUST** be
476     defined as type: ``number``.
477
478
479 .. req::
480     :id: R-09811
481     :target: VNF
482     :keyword: MUST NOT
483     :validation_mode: static
484     :updated: casablanca
485
486
487     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
488     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
489     have parameter constraints defined.
490
491 .. req::
492     :id: R-37039
493     :target: VNF
494     :keyword: MUST NOT
495     :validation_mode: static
496     :updated: casablanca
497
498     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
499     property
500     ``metadata`` key/value pair ``vf_module_index`` parameter
501     ``vf_module_index`` **MUST NOT**
502     be enumerated in the Heat Orchestration Template's environment file.
503
504 .. req::
505     :id: R-55306
506     :target: VNF
507     :keyword: MUST NOT
508     :validation_mode: static
509     :updated: casablanca
510
511     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
512     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
513     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
514     used in VNF's Volume template;
515     it is not supported.
516
517 The ``vf_module_index`` parameter indicates which instance of the module is
518 being deployed into the VNF.
519 This parameter may be used in cases where multiple instances of the same
520 incremental module may be instantiated for scaling purposes. The index
521 can be used in the Heat Orchestration Template for indexing into a
522 pseudo-constant array parameter when unique values are required for each
523 module instance, e.g., for fixed private IP addresses on VM types.
524
525 The ``vf_module_index`` will start at 0 for the first instance of a module
526 type. Subsequent instances of the same module type will receive the
527 lowest unused index. This means that indexes will be reused if a module
528 is deleted and re-added. As an example, if three copies of a module are
529 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
530 the second one is deleted (index 1), and then re-added, index 1 will be
531 reused.
532
533 *Example*
534
535 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
536 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
537 OAM VM attaches to an internal control network which has a
538 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
539 environment file contains the four IP addresses that each successive OAM
540 VM will be assigned. The ``vf_module_index`` is used as the index to
541 determine the IP assignment.
542
543 Environment File
544
545 .. code-block:: yaml
546
547   parameters:
548     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
549
550 YAML File
551
552 .. code-block:: yaml
553
554   parameters:
555     vf_module_index:
556       type: number
557       description: Unique index for this VNF Module instance
558     oam_vm_name_0:
559       type: string
560       description: VM Name for lb VM 0
561     int_ctrl_net_id:
562       type: string
563       description: Neutron UUID for the internal control network
564     oam_vm_int_ctrl_ips:
565       type: comma_delimited_list
566       description: Fixed IP assignments for oam VMs on the internal control
567                    network
568   resources:
569     oam_vm_server_0:
570       type: OS::Nova::Server
571       properties:
572         name: { get_param: oam_vm_name_0 }
573         networks:
574           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
575   #     . . .
576         metadata:
577           vf_module_index: { get_param: vf_module_index }
578     oam_vm_0_int_ctrl_port_0:
579       type: OS::Neutron::Port
580       properties:
581         network: { get_param: int_ctrl_net_id }
582         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
583
584 workload_context
585 ^^^^^^^^^^^^^^^^^^^^^
586
587 .. req::
588     :id: R-47061
589     :target: VNF
590     :keyword: SHOULD
591     :updated: casablanca
592
593     A VNF's Heat Orchestration Template's OS::Nova::Server
594     Resource **SHOULD** contain the metadata map value parameter
595     'workload_context'.
596
597 .. req::
598     :id: R-74978
599     :target: VNF
600     :keyword: MUST
601     :validation_mode: static
602     :updated: casablanca
603
604     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
605     property ``metadata`` key/value pair ``workload_context``
606     parameter **MUST**
607     be declared as ``workload_context`` and the parameter **MUST**
608     be defined as type: ``string``.
609
610 .. req::
611     :id: R-34055
612     :target: VNF
613     :keyword: MUST NOT
614     :validation_mode: static
615     :updated: casablanca
616
617     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
618     property ``metadata`` key/value pair ``workload_context``
619     parameter ``workload_context`` **MUST NOT**
620     have parameter constraints defined.
621
622 .. req::
623     :id: R-02691
624     :target: VNF
625     :keyword: MUST NOT
626     :validation_mode: static
627     :updated: casablanca
628
629
630     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
631     property ``metadata`` key/value pair ``workload_context``
632     parameter ``workload_context`` **MUST NOT**
633     be enumerated in the Heat Orchestration Template's environment file.
634
635 The 'workload\_context' parameter value will be chosen by the Service Model
636 Distribution context client in VID and will be supplied to the
637 Heat Orchestration Template by ONAP at orchestration time.
638
639 *Example Parameter Definition*
640
641 .. code-block:: yaml
642
643   parameters:
644     workload_context:
645       type: string
646       description: Workload Context for this VNF instance
647
648
649 *Example OS::Nova::Server with metadata*
650
651 .. code-block:: yaml
652
653   resources:
654     . . .
655
656     {vm-type}_server_{index}:
657        type: OS::Nova::Server
658        properties:
659          name:
660          flavor:
661          image:
662         ...
663        metadata:
664           vnf_name: { get_param: vnf_name }
665           vnf_id: { get_param: vnf_id }
666           vf_module_name: { get_param: vf_module_name }
667           vf_module_id: { get_param: vf_module_id }
668           workload_context: {get_param: workload_context}
669
670 environment_context
671 ^^^^^^^^^^^^^^^^^^^^^
672
673 .. req::
674     :id: R-88536
675     :target: VNF
676     :keyword: SHOULD
677     :updated: casablanca
678
679     A VNF's Heat Orchestration Template's OS::Nova::Server
680     Resource **SHOULD** contain the metadata map value parameter
681     'environment_context'.
682
683 .. req::
684     :id: R-20308
685     :target: VNF
686     :keyword: MUST
687     :validation_mode: static
688     :updated: casablanca
689
690     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
691     property ``metadata`` key/value pair ``environment_context``
692     parameter **MUST** be declared as ``environment_context`` and the
693     parameter type **MUST** be defined as type: ``string``.
694
695 .. req::
696     :id: R-56183
697     :target: VNF
698     :keyword: MUST NOT
699     :validation_mode: static
700     :updated: casablanca
701
702     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
703     property ``metadata``key/value pair ``environment_context``
704     parameter ``environment_context`` **MUST NOT**
705     have parameter constraints defined.
706
707 .. req::
708     :id: R-13194
709     :target: VNF
710     :keyword: MUST NOT
711     :validation_mode: static
712     :updated: casablanca
713
714     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
715     property
716     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
717     be enumerated in the Heat Orchestration Template's environment file.
718
719 The 'environment_context' parameter value will be defined by the
720 service designer as part of the service model during the SDC
721 on-boarding process and will be supplied to the Heat Orchestration
722 Template by ONAP at orchestration time.
723
724
725 *Example Parameter Definition*
726
727 .. code-block:: yaml
728
729   parameters:
730     environment_context:
731       type: string
732       description: Environment Context for this VNF instance
733
734
735 *Example OS::Nova::Server with metadata*
736
737 .. code-block:: yaml
738
739   resources:
740     . . .
741
742     {vm-type}_server_{index}:
743        type: OS::Nova::Server
744        properties:
745          name:
746          flavor:
747          image:
748         ...
749        metadata:
750           vnf_name: { get_param: vnf_name }
751           vnf_id: { get_param: vnf_id }
752           vf_module_name: { get_param: vf_module_name }
753           vf_module_id: { get_param: vf_module_id }
754           workload_context: {get_param: workload_context}
755           environment_context: {get_param: environment_context }