7055e6ead2cfea3156e86184ff5e11bda7b1c9ad
[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 .. req::
89     :id: R-44491
90     :target: VNF
91     :keyword: MUST NOT
92     :validation_mode: static
93     :updated: casablanca
94
95     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
96     property
97     ``metadata`` key/value pair ``vnf_id`` is passed into a Nested YAML
98     file, the key/value pair name ``vnf_id`` **MUST NOT** change.
99
100 *Example 'vnf_id' Parameter Definition*
101
102 .. code-block:: yaml
103
104   parameters:
105
106     vnf_id:
107       type: string
108       description: Unique ID for this VNF instance
109
110 vf_module_id
111 ^^^^^^^^^^^^^^^^^^^^
112
113 The OS::Nova::Server Resource ``metadata`` map value parameter ``vf_module_id``
114 is an ONAP generated UUID that identifies the VF Module (e.g., Heat
115 Orchestration Template).  The value
116 is provided by ONAP to the VNF's Heat Orchestration
117 Template at orchestration time.
118
119 .. req::
120     :id: R-71493
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
127     property ``metadata`` **MUST**
128     contain the key/value pair ``vf_module_id``
129     and the value MUST be obtained via a ``get_param``.
130
131 .. req::
132     :id: R-82134
133     :target: VNF
134     :keyword: MUST
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 **MUST**
140     be declared as ``vf_module_id`` and the parameter **MUST**
141     be defined as type: ``string``.
142
143 .. req::
144     :id: R-98374
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     have parameter constraints defined.
154
155 .. req::
156     :id: R-72871
157     :target: VNF
158     :keyword: MUST NOT
159     :validation_mode: static
160     :updated: casablanca
161
162     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
163     ``metadata`` key/value pair ``vf_module_id`` parameter ``vf_module_id``
164     **MUST NOT**
165     be enumerated in the Heat Orchestration Template's environment file.
166
167
168 .. req::
169     :id: R-86237
170     :target: VNF
171     :keyword: MUST NOT
172     :validation_mode: static
173     :updated: casablanca
174
175     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
176     property
177     ``metadata`` key/value pair ``vf_module_id`` is passed into a
178     Nested YAML
179     file, the key/value pair name ``vf_module_id`` **MUST NOT** change.
180
181
182 *Example 'vf_module_id' Parameter Definition*
183
184 .. code-block:: yaml
185
186   parameters:
187
188     vnf_module_id:
189       type: string
190       description: Unique ID for this VNF module instance
191
192
193 vnf_name
194 ^^^^^^^^^
195
196 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vnf_name``
197 is the ONAP (SDN-C) generated alphanumeric name of the deployed VNF instance.
198 The value
199 is provided by ONAP to the VNF's Heat Orchestration
200 Template at orchestration time.
201
202 .. req::
203     :id: R-72483
204     :target: VNF
205     :keyword: MUST
206     :validation_mode: static
207     :updated: casablanca
208
209     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
210     ``metadata`` **MUST** contain the key/value pair ``vnf_name`` and the
211     value **MUST** be obtained via a ``get_param``.
212
213 .. req::
214     :id: R-62428
215     :target: VNF
216     :keyword: MUST
217     :validation_mode: static
218     :updated: casablanca
219
220     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
221     property ``metadata`` key/value pair ``vnf_name`` parameter **MUST**
222     be declared as ``vnf_name`` and the parameter **MUST** be defined as
223     type: ``string``.
224
225 .. req::
226     :id: R-44318
227     :target: VNF
228     :keyword: MUST NOT
229     :validation_mode: static
230     :updated: casablanca
231
232     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
233     property ``metadata`` key/value pair ``vnf_name``
234     parameter ``vnf_name`` **MUST NOT**
235     have parameter constraints defined.
236
237 .. req::
238     :id: R-36542
239     :target: VNF
240     :keyword: MUST NOT
241     :validation_mode: static
242     :updated: casablanca
243
244     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
245     property ``metadata`` key/value pair ``vnf_name`` parameter
246     ``vnf_name`` **MUST NOT**
247     be enumerated in the Heat Orchestration Template's environment file.
248
249 .. req::
250     :id: R-16576
251     :target: VNF
252     :keyword: MUST NOT
253     :validation_mode: static
254     :updated: casablanca
255
256
257     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
258     property
259     ``metadata`` key/value pair ``vnf_name`` is passed into a Nested YAML
260     file, the key/value pair name ``vnf_name`` **MUST NOT** change.
261
262 *Example 'vnf_name' Parameter Definition*
263
264 .. code-block:: yaml
265
266   parameters:
267
268     vnf_name:
269       type: string
270       description: Unique name for this VNF instance
271
272 vf_module_name
273 ^^^^^^^^^^^^^^^^^^
274
275 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter
276 ``vf_module_name``
277 is the deployment name of the heat stack created (e.g., ``<STACK_NAME>``)
278 from the
279 VNF's Heat Orchestration template
280 in the command ``Heat stack-create``
281 (e.g., ``Heat stack-create [-f <FILE>] [-e <FILE>] <STACK_NAME>``).
282 The ``vf_module_name`` (e.g., ``<STACK_NAME>`` is specified as
283 part of the orchestration process.
284
285 .. req::
286     :id: R-68023
287     :target: VNF
288     :keyword: SHOULD
289     :updated: casablanca
290
291     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
292     property ``metadata`` **SHOULD**
293     contain the key/value pair ``vf_module_name`` and the value **MUST**
294     be obtained via a ``get_param``.
295
296 .. req::
297     :id: R-39067
298     :target: VNF
299     :keyword: MUST
300     :validation_mode: static
301     :updated: casablanca
302
303     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
304     property
305     ``metadata`` key/value pair ``vf_module_name`` parameter **MUST** be
306     declared as ``vf_module_name`` and the parameter **MUST**
307     be defined as type: ``string``.
308
309 .. req::
310     :id: R-15480
311     :target: VNF
312     :keyword: MUST NOT
313     :validation_mode: static
314     :updated: casablanca
315
316     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
317     property
318     ``metadata`` key/value pair ``vf_module_name`` parameter ``vf_module_name``
319     **MUST NOT** have parameter constraints defined.
320
321 .. req::
322     :id: R-80374
323     :target: VNF
324     :keyword: MUST NOT
325     :validation_mode: static
326     :updated: casablanca
327
328
329     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
330     property ``metadata`` key/value pair ``vf_module_name``
331     parameter ``vf_module_name`` **MUST NOT**
332     be enumerated in the Heat Orchestration Template's environment file.
333
334 .. req::
335     :id: R-49177
336     :target: VNF
337     :keyword: MUST
338     :validation_mode: static
339     :updated: casablanca
340
341     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
342     property ``metadata`` key/value pair ``vf_module_name`` is passed into a
343     Nested YAML
344     file, the key/value pair name ``vf_module_name`` **MUST NOT** change.
345
346 *Example 'vf_module_name' Parameter Definition*
347
348 .. code-block:: yaml
349
350   parameters:
351
352     vf_module_name:
353       type: string
354       description: Unique name for this VNF Module instance
355
356 vm_role
357 ^^^^^^^^^
358
359 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vm-role``
360 is a ``metadata`` tag that describes the role of the Virtual Machine.
361 The ``vm_role`` is stored in ONAP’s A&AI module and is
362 available for use by other ONAP components and/or north bound systems.
363
364 .. req::
365     :id: R-85328
366     :target: VNF
367     :keyword: MAY
368     :updated: casablanca
369
370     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
371     ``metadata`` **MAY**
372     contain the key/value pair ``vm_role`` and the value **MUST** be
373     obtained either via
374
375     - ``get_param``
376     - hard coded in the key/value pair ``vm_role``.
377
378 .. req::
379     :id: R-95430
380     :target: VNF
381     :keyword: MUST
382     :validation_mode: static
383     :updated: casablanca
384
385     If a VNF's Heat Orchestration Template's ``OS::Nova::Server``
386     resource property
387     ``metadata`` key/value pair ``vm_role`` value is obtained via
388     ``get_param``, the parameter **MUST** be declared as ``vm_role``
389     and the parameter **MUST** be defined as type: ``string``.
390
391 .. req::
392     :id: R-67597
393     :target: VNF
394     :keyword: MUST NOT
395     :validation_mode: static
396     :updated: casablanca
397
398     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
399     property ``metadata`` key/value pair ``vm_role`` parameter ``vm_role``
400     **MUST NOT** have parameter constraints defined.
401
402 .. req::
403     :id: R-46823
404     :target: VNF
405     :keyword: MUST
406     :validation_mode: static
407     :updated: casablanca
408
409     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` Resource
410     ``metadata`` map value parameter ``vm_role`` **MUST**
411     be either
412
413      * enumerated in the VNF's Heat Orchestration Template's environment
414        file.
415
416      * hard coded in the VNF's
417        Heat Orchestration Template's ``OS::Nova::Server`` Resource
418        ``metadata`` property.
419
420
421 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
422
423
424 .. req::
425     :id: R-86476
426     :target: VNF
427     :keyword: MUST
428     :validation_mode: static
429     :updated: casablanca
430
431     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
432     property ``metadata`` key/value pair ``vm_role`` value **MUST**
433     only contain alphanumeric characters and underscores (i.e., '_').
434
435
436 .. req::
437     :id: R-70757
438     :target: VNF
439     :keyword: MUST NOT
440     :validation_mode: static
441     :updated: casablanca
442
443     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
444     property ``metadata`` key/value pair ``vm_role`` is passed into a Nested
445     YAML
446     file, the key/value pair name ``vm_role`` **MUST NOT** change.
447
448
449 *Example 'vm_role' Parameter Definition*
450
451 .. code-block:: yaml
452
453   parameters:
454
455     vm_role:
456       type: string
457       description: Unique role for this VM
458
459 *Example: 'vm-role' Definition: Hard Coded in
460 OS::Nova::Resource metadata property*
461
462 .. code-block:: yaml
463
464   resources:
465
466     dns_server_0
467       type: OS::Nova::Server
468       properties:
469         . . . .
470         metadata:
471           vm_role: dns
472
473 *Example 'vm-role' Definition: Defined in Environment file
474 and retrieved via 'get_param'*
475
476 .. code-block:: yaml
477
478   resources:
479
480     dns_server_0:
481       type: OS::Nova::Server
482       properties:
483         . . . .
484         metadata:
485           vm_role: { get_param: vm_role }
486
487 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
488 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
489
490 The example below depicts part of a Heat Orchestration Template that
491 uses the five of the ``OS::Nova::Server`` resource
492 ``metadata`` map value parameters discussed in this
493 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
494
495 .. code-block:: yaml
496
497   parameters:
498     lb_name_0
499       type: string
500       description: VM Name for lb VM 0
501     vnf_name:
502       type: string
503       description: Unique name for this VNF instance
504     vnf_id:
505       type: string
506       description: Unique ID for this VNF instance
507     vf_module_name:
508       type: string
509       description: Unique name for this VNF Module instance
510     vf_module_id:
511       type: string
512       description: Unique ID for this VNF Module instance
513     vm_role:
514       type: string
515       description: Unique role for this VM
516   resources:
517     lb_server_0:
518       type: OS::Nova::Server
519       properties:
520         name: { get_param: lb_name_0 }
521         ...
522         metadata:
523           vnf_name: { get_param: vnf_name }
524           vnf_id: { get_param: vnf_id }
525           vf_module_name: { get_param: vf_module_name }
526           vf_module_id: { get_param: vf_module_id }
527           vm_role: lb
528
529 vf_module_index
530 ^^^^^^^^^^^^^^^^^^
531
532
533 .. req::
534     :id: R-50816
535     :target: VNF
536     :keyword: MAY
537     :updated: casablanca
538
539     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
540     resource  property ``metadata`` **MAY**
541     contain the key/value pair ``vf_module_index``
542     and the value **MUST** be obtained via a ``get_param``.
543
544 .. req::
545     :id: R-54340
546     :target: VNF
547     :keyword: MUST
548     :validation_mode: static
549     :updated: casablanca
550
551     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
552     property
553     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
554     be declared as ``vf_module_index`` and the parameter **MUST** be
555     defined as type: ``number``.
556
557
558 .. req::
559     :id: R-09811
560     :target: VNF
561     :keyword: MUST NOT
562     :validation_mode: static
563     :updated: casablanca
564
565
566     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
567     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
568     have parameter constraints defined.
569
570 .. req::
571     :id: R-37039
572     :target: VNF
573     :keyword: MUST NOT
574     :validation_mode: static
575     :updated: casablanca
576
577     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
578     property
579     ``metadata`` key/value pair ``vf_module_index`` parameter
580     ``vf_module_index`` **MUST NOT**
581     be enumerated in the Heat Orchestration Template's environment file.
582
583 .. req::
584     :id: R-22441
585     :target: VNF
586     :keyword: MUST NOT
587     :validation_mode: static
588     :updated: casablanca
589
590     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
591     property ``metadata`` key/value pair ``vf_module_index`` is passed into a
592     Nested YAML file, the key/value pair
593     ``vf_module_index`` **MUST NOT** change.
594
595 .. req::
596     :id: R-55306
597     :target: VNF
598     :keyword: MUST NOT
599     :validation_mode: static
600     :updated: casablanca
601
602     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
603     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
604     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
605     used in VNF's Volume template;
606     it is not supported.
607
608 The ``vf_module_index`` parameter indicates which instance of the module is
609 being deployed into the VNF.
610 This parameter may be used in cases where multiple instances of the same
611 incremental module may be instantiated for scaling purposes. The index
612 can be used in the Heat Orchestration Template for indexing into a
613 pseudo-constant array parameter when unique values are required for each
614 module instance, e.g., for fixed private IP addresses on VM types.
615
616 The ``vf_module_index`` will start at 0 for the first instance of a module
617 type. Subsequent instances of the same module type will receive the
618 lowest unused index. This means that indexes will be reused if a module
619 is deleted and re-added. As an example, if three copies of a module are
620 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
621 the second one is deleted (index 1), and then re-added, index 1 will be
622 reused.
623
624 *Example*
625
626 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
627 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
628 OAM VM attaches to an internal control network which has a
629 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
630 environment file contains the four IP addresses that each successive OAM
631 VM will be assigned. The ``vf_module_index`` is used as the index to
632 determine the IP assignment.
633
634 Environment File
635
636 .. code-block:: yaml
637
638   parameters:
639     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
640
641 YAML File
642
643 .. code-block:: yaml
644
645   parameters:
646     vf_module_index:
647       type: number
648       description: Unique index for this VNF Module instance
649     oam_vm_name_0:
650       type: string
651       description: VM Name for lb VM 0
652     int_ctrl_net_id:
653       type: string
654       description: Neutron UUID for the internal control network
655     oam_vm_int_ctrl_ips:
656       type: comma_delimited_list
657       description: Fixed IP assignments for oam VMs on the internal control
658                    network
659   resources:
660     oam_vm_server_0:
661       type: OS::Nova::Server
662       properties:
663         name: { get_param: oam_vm_name_0 }
664         networks:
665           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
666   #     . . .
667         metadata:
668           vf_module_index: { get_param: vf_module_index }
669     oam_vm_0_int_ctrl_port_0:
670       type: OS::Neutron::Port
671       properties:
672         network: { get_param: int_ctrl_net_id }
673         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
674
675 workload_context
676 ^^^^^^^^^^^^^^^^^^^^^
677
678 .. req::
679     :id: R-47061
680     :target: VNF
681     :keyword: SHOULD
682     :updated: casablanca
683
684     A VNF's Heat Orchestration Template's OS::Nova::Server
685     Resource **SHOULD** contain the metadata map value parameter
686     'workload_context'.
687
688 .. req::
689     :id: R-74978
690     :target: VNF
691     :keyword: MUST
692     :validation_mode: static
693     :updated: casablanca
694
695     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
696     property ``metadata`` key/value pair ``workload_context``
697     parameter **MUST**
698     be declared as ``workload_context`` and the parameter **MUST**
699     be defined as type: ``string``.
700
701 .. req::
702     :id: R-34055
703     :target: VNF
704     :keyword: MUST NOT
705     :validation_mode: static
706     :updated: casablanca
707
708     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
709     property ``metadata`` key/value pair ``workload_context``
710     parameter ``workload_context`` **MUST NOT**
711     have parameter constraints defined.
712
713 .. req::
714     :id: R-02691
715     :target: VNF
716     :keyword: MUST NOT
717     :validation_mode: static
718     :updated: casablanca
719
720
721     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
722     property ``metadata`` key/value pair ``workload_context``
723     parameter ``workload_context`` **MUST NOT**
724     be enumerated in the Heat Orchestration Template's environment file.
725
726 .. req::
727     :id: R-75202
728     :target: VNF
729     :keyword: MUST NOT
730     :validation_mode: static
731     :updated: casablanca
732
733     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
734     property ``metadata`` key/value pair ``workload_context``
735     is passed into a Nested YAML
736     file, the key/value pair name ``workload_context`` **MUST NOT** change.
737
738
739 The 'workload\_context' parameter value will be chosen by the Service Model
740 Distribution context client in VID and will be supplied to the
741 Heat Orchestration Template by ONAP at orchestration time.
742
743 *Example Parameter Definition*
744
745 .. code-block:: yaml
746
747   parameters:
748     workload_context:
749       type: string
750       description: Workload Context for this VNF instance
751
752
753 *Example OS::Nova::Server with metadata*
754
755 .. code-block:: yaml
756
757   resources:
758     . . .
759
760     {vm-type}_server_{index}:
761        type: OS::Nova::Server
762        properties:
763          name:
764          flavor:
765          image:
766         ...
767        metadata:
768           vnf_name: { get_param: vnf_name }
769           vnf_id: { get_param: vnf_id }
770           vf_module_name: { get_param: vf_module_name }
771           vf_module_id: { get_param: vf_module_id }
772           workload_context: {get_param: workload_context}
773
774 environment_context
775 ^^^^^^^^^^^^^^^^^^^^^
776
777 .. req::
778     :id: R-88536
779     :target: VNF
780     :keyword: SHOULD
781     :updated: casablanca
782
783     A VNF's Heat Orchestration Template's OS::Nova::Server
784     Resource **SHOULD** contain the metadata map value parameter
785     'environment_context'.
786
787 .. req::
788     :id: R-20308
789     :target: VNF
790     :keyword: MUST
791     :validation_mode: static
792     :updated: casablanca
793
794     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
795     property ``metadata`` key/value pair ``environment_context``
796     parameter **MUST** be declared as ``environment_context`` and the
797     parameter type **MUST** be defined as type: ``string``.
798
799 .. req::
800     :id: R-56183
801     :target: VNF
802     :keyword: MUST NOT
803     :validation_mode: static
804     :updated: casablanca
805
806     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
807     property ``metadata``key/value pair ``environment_context``
808     parameter ``environment_context`` **MUST NOT**
809     have parameter constraints defined.
810
811 .. req::
812     :id: R-13194
813     :target: VNF
814     :keyword: MUST NOT
815     :validation_mode: static
816     :updated: casablanca
817
818     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
819     property
820     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
821     be enumerated in the Heat Orchestration Template's environment file.
822
823 .. req::
824     :id: R-62954
825     :target: VNF
826     :keyword: MUST NOT
827     :validation_mode: static
828     :updated: casablanca
829
830     If a VNF's Heat Orchestration Template's ``OS::Nova::Server Resource``
831     ``metadata`` map value parameter ``environment_context`` is passed into a
832     Nested YAML
833     file, the parameter name ``environment_context`` **MUST NOT** change.
834
835 The 'environment_context' parameter value will be defined by the
836 service designer as part of the service model during the SDC
837 on-boarding process and will be supplied to the Heat Orchestration
838 Template by ONAP at orchestration time.
839
840
841 *Example Parameter Definition*
842
843 .. code-block:: yaml
844
845   parameters:
846     environment_context:
847       type: string
848       description: Environment Context for this VNF instance
849
850
851 *Example OS::Nova::Server with metadata*
852
853 .. code-block:: yaml
854
855   resources:
856     . . .
857
858     {vm-type}_server_{index}:
859        type: OS::Nova::Server
860        properties:
861          name:
862          flavor:
863          image:
864         ...
865        metadata:
866           vnf_name: { get_param: vnf_name }
867           vnf_id: { get_param: vnf_id }
868           vf_module_name: { get_param: vf_module_name }
869           vf_module_id: { get_param: vf_module_id }
870           workload_context: {get_param: workload_context}
871           environment_context: {get_param: environment_context }