b88181dcf7232a4ecdfd1a6bbeb73b67b249f126
[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 The ``vm_role`` is stored in ONAP’s A&AI module and is
313 available for use by other ONAP components and/or north bound systems.
314
315 .. req::
316     :id: R-85328
317     :target: VNF
318     :keyword: MAY
319     :updated: casablanca
320
321     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
322     ``metadata`` **MAY**
323     contain the key/value pair ``vm_role`` and the value **MUST** be
324     obtained either via
325
326     - ``get_param``
327     - hard coded in the key/value pair ``vm_role``.
328
329 .. req::
330     :id: R-95430
331     :target: VNF
332     :keyword: MUST
333     :validation_mode: static
334     :updated: casablanca
335
336     If a VNF's Heat Orchestration Template's ``OS::Nova::Server``
337     resource property
338     ``metadata`` key/value pair ``vm_role`` value is obtained via
339     ``get_param``, the parameter **MUST** be declared as ``vm_role``
340     and the parameter **MUST** be defined as type: ``string``.
341
342 .. req::
343     :id: R-67597
344     :target: VNF
345     :keyword: MUST NOT
346     :validation_mode: static
347     :updated: casablanca
348
349     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
350     property ``metadata`` key/value pair ``vm_role`` parameter ``vm_role``
351     **MUST NOT** have parameter constraints defined.
352
353 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
354
355
356 .. req::
357     :id: R-86476
358     :target: VNF
359     :keyword: MUST
360     :validation_mode: static
361     :updated: casablanca
362
363     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
364     property ``metadata`` key/value pair ``vm_role`` value **MUST**
365     only contain alphanumeric characters and underscores (i.e., '_').
366
367
368 *Example 'vm_role' Parameter Definition*
369
370 .. code-block:: yaml
371
372   parameters:
373
374     vm_role:
375       type: string
376       description: Unique role for this VM
377
378 *Example: 'vm-role' Definition: Hard Coded in
379 OS::Nova::Resource metadata property*
380
381 .. code-block:: yaml
382
383   resources:
384
385     dns_server_0
386       type: OS::Nova::Server
387       properties:
388         . . . .
389         metadata:
390           vm_role: dns
391
392 *Example 'vm-role' Definition: Defined in Environment file
393 and retrieved via 'get_param'*
394
395 .. code-block:: yaml
396
397   resources:
398
399     dns_server_0:
400       type: OS::Nova::Server
401       properties:
402         . . . .
403         metadata:
404           vm_role: { get_param: vm_role }
405
406 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
407 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
408
409 The example below depicts part of a Heat Orchestration Template that
410 uses the five of the ``OS::Nova::Server`` resource
411 ``metadata`` map value parameters discussed in this
412 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
413
414 .. code-block:: yaml
415
416   parameters:
417     lb_name_0
418       type: string
419       description: VM Name for lb VM 0
420     vnf_name:
421       type: string
422       description: Unique name for this VNF instance
423     vnf_id:
424       type: string
425       description: Unique ID for this VNF instance
426     vf_module_name:
427       type: string
428       description: Unique name for this VNF Module instance
429     vf_module_id:
430       type: string
431       description: Unique ID for this VNF Module instance
432     vm_role:
433       type: string
434       description: Unique role for this VM
435   resources:
436     lb_server_0:
437       type: OS::Nova::Server
438       properties:
439         name: { get_param: lb_name_0 }
440         ...
441         metadata:
442           vnf_name: { get_param: vnf_name }
443           vnf_id: { get_param: vnf_id }
444           vf_module_name: { get_param: vf_module_name }
445           vf_module_id: { get_param: vf_module_id }
446           vm_role: lb
447
448 vf_module_index
449 ^^^^^^^^^^^^^^^^^^
450
451
452 .. req::
453     :id: R-50816
454     :target: VNF
455     :keyword: MUST
456     :updated: casablanca
457     :validation_mode: static
458
459     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
460     resource  property ``metadata`` **MAY**
461     contain the key/value pair ``vf_module_index``
462     and the value **MUST** be obtained via a ``get_param``.
463
464 .. req::
465     :id: R-54340
466     :target: VNF
467     :keyword: MUST
468     :validation_mode: static
469     :updated: casablanca
470
471     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
472     property
473     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
474     be declared as ``vf_module_index`` and the parameter **MUST** be
475     defined as type: ``number``.
476
477
478 .. req::
479     :id: R-09811
480     :target: VNF
481     :keyword: MUST NOT
482     :validation_mode: static
483     :updated: casablanca
484
485
486     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
487     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
488     have parameter constraints defined.
489
490 .. req::
491     :id: R-37039
492     :target: VNF
493     :keyword: MUST NOT
494     :validation_mode: static
495     :updated: casablanca
496
497     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
498     property
499     ``metadata`` key/value pair ``vf_module_index`` parameter
500     ``vf_module_index`` **MUST NOT**
501     be enumerated in the Heat Orchestration Template's environment file.
502
503 .. req::
504     :id: R-55306
505     :target: VNF
506     :keyword: MUST NOT
507     :validation_mode: static
508     :updated: casablanca
509
510     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
511     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
512     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
513     used in VNF's Volume template;
514     it is not supported.
515
516 The ``vf_module_index`` parameter indicates which instance of the module is
517 being deployed into the VNF.
518 This parameter may be used in cases where multiple instances of the same
519 incremental module may be instantiated for scaling purposes. The index
520 can be used in the Heat Orchestration Template for indexing into a
521 pseudo-constant array parameter when unique values are required for each
522 module instance, e.g., for fixed private IP addresses on VM types.
523
524 The ``vf_module_index`` will start at 0 for the first instance of a module
525 type. Subsequent instances of the same module type will receive the
526 lowest unused index. This means that indexes will be reused if a module
527 is deleted and re-added. As an example, if three copies of a module are
528 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
529 the second one is deleted (index 1), and then re-added, index 1 will be
530 reused.
531
532 *Example*
533
534 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
535 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
536 OAM VM attaches to an internal control network which has a
537 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
538 environment file contains the four IP addresses that each successive OAM
539 VM will be assigned. The ``vf_module_index`` is used as the index to
540 determine the IP assignment.
541
542 Environment File
543
544 .. code-block:: yaml
545
546   parameters:
547     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
548
549 YAML File
550
551 .. code-block:: yaml
552
553   parameters:
554     vf_module_index:
555       type: number
556       description: Unique index for this VNF Module instance
557     oam_vm_name_0:
558       type: string
559       description: VM Name for lb VM 0
560     int_ctrl_net_id:
561       type: string
562       description: Neutron UUID for the internal control network
563     oam_vm_int_ctrl_ips:
564       type: comma_delimited_list
565       description: Fixed IP assignments for oam VMs on the internal control
566                    network
567   resources:
568     oam_vm_server_0:
569       type: OS::Nova::Server
570       properties:
571         name: { get_param: oam_vm_name_0 }
572         networks:
573           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
574   #     . . .
575         metadata:
576           vf_module_index: { get_param: vf_module_index }
577     oam_vm_0_int_ctrl_port_0:
578       type: OS::Neutron::Port
579       properties:
580         network: { get_param: int_ctrl_net_id }
581         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
582
583 workload_context
584 ^^^^^^^^^^^^^^^^^^^^^
585
586 .. req::
587     :id: R-47061
588     :target: VNF
589     :keyword: SHOULD
590     :updated: casablanca
591
592     A VNF's Heat Orchestration Template's OS::Nova::Server
593     Resource **SHOULD** contain the metadata map value parameter
594     'workload_context'.
595
596 .. req::
597     :id: R-74978
598     :target: VNF
599     :keyword: MUST
600     :validation_mode: static
601     :updated: casablanca
602
603     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
604     property ``metadata`` key/value pair ``workload_context``
605     parameter **MUST**
606     be declared as ``workload_context`` and the parameter **MUST**
607     be defined as type: ``string``.
608
609 .. req::
610     :id: R-34055
611     :target: VNF
612     :keyword: MUST NOT
613     :validation_mode: static
614     :updated: casablanca
615
616     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
617     property ``metadata`` key/value pair ``workload_context``
618     parameter ``workload_context`` **MUST NOT**
619     have parameter constraints defined.
620
621 .. req::
622     :id: R-02691
623     :target: VNF
624     :keyword: MUST NOT
625     :validation_mode: static
626     :updated: casablanca
627
628
629     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
630     property ``metadata`` key/value pair ``workload_context``
631     parameter ``workload_context`` **MUST NOT**
632     be enumerated in the Heat Orchestration Template's environment file.
633
634 The 'workload\_context' parameter value will be chosen by the Service Model
635 Distribution context client in VID and will be supplied to the
636 Heat Orchestration Template by ONAP at orchestration time.
637
638 *Example Parameter Definition*
639
640 .. code-block:: yaml
641
642   parameters:
643     workload_context:
644       type: string
645       description: Workload Context for this VNF instance
646
647
648 *Example OS::Nova::Server with metadata*
649
650 .. code-block:: yaml
651
652   resources:
653     . . .
654
655     {vm-type}_server_{index}:
656        type: OS::Nova::Server
657        properties:
658          name:
659          flavor:
660          image:
661         ...
662        metadata:
663           vnf_name: { get_param: vnf_name }
664           vnf_id: { get_param: vnf_id }
665           vf_module_name: { get_param: vf_module_name }
666           vf_module_id: { get_param: vf_module_id }
667           workload_context: {get_param: workload_context}
668
669 environment_context
670 ^^^^^^^^^^^^^^^^^^^^^
671
672 .. req::
673     :id: R-88536
674     :target: VNF
675     :keyword: SHOULD
676     :updated: casablanca
677
678     A VNF's Heat Orchestration Template's OS::Nova::Server
679     Resource **SHOULD** contain the metadata map value parameter
680     'environment_context'.
681
682 .. req::
683     :id: R-20308
684     :target: VNF
685     :keyword: MUST
686     :validation_mode: static
687     :updated: casablanca
688
689     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
690     property ``metadata`` key/value pair ``environment_context``
691     parameter **MUST** be declared as ``environment_context`` and the
692     parameter type **MUST** be defined as type: ``string``.
693
694 .. req::
695     :id: R-56183
696     :target: VNF
697     :keyword: MUST NOT
698     :validation_mode: static
699     :updated: casablanca
700
701     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
702     property ``metadata``key/value pair ``environment_context``
703     parameter ``environment_context`` **MUST NOT**
704     have parameter constraints defined.
705
706 .. req::
707     :id: R-13194
708     :target: VNF
709     :keyword: MUST NOT
710     :validation_mode: static
711     :updated: casablanca
712
713     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
714     property
715     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
716     be enumerated in the Heat Orchestration Template's environment file.
717
718 The 'environment_context' parameter value will be defined by the
719 service designer as part of the service model during the SDC
720 on-boarding process and will be supplied to the Heat Orchestration
721 Template by ONAP at orchestration time.
722
723
724 *Example Parameter Definition*
725
726 .. code-block:: yaml
727
728   parameters:
729     environment_context:
730       type: string
731       description: Environment Context for this VNF instance
732
733
734 *Example OS::Nova::Server with metadata*
735
736 .. code-block:: yaml
737
738   resources:
739     . . .
740
741     {vm-type}_server_{index}:
742        type: OS::Nova::Server
743        properties:
744          name:
745          flavor:
746          image:
747         ...
748        metadata:
749           vnf_name: { get_param: vnf_name }
750           vnf_id: { get_param: vnf_id }
751           vf_module_name: { get_param: vf_module_name }
752           vf_module_id: { get_param: vf_module_id }
753           workload_context: {get_param: workload_context}
754           environment_context: {get_param: environment_context }