5a4463ee5b58fd6e0f907fdf453230a0aa8f07c4
[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 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
403
404
405 .. req::
406     :id: R-86476
407     :target: VNF
408     :keyword: MUST
409     :validation_mode: static
410     :updated: casablanca
411
412     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
413     property ``metadata`` key/value pair ``vm_role`` value **MUST**
414     only contain alphanumeric characters and underscores (i.e., '_').
415
416
417 .. req::
418     :id: R-70757
419     :target: VNF
420     :keyword: MUST NOT
421     :validation_mode: static
422     :updated: casablanca
423
424     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
425     property ``metadata`` key/value pair ``vm_role`` is passed into a Nested
426     YAML
427     file, the key/value pair name ``vm_role`` **MUST NOT** change.
428
429
430 *Example 'vm_role' Parameter Definition*
431
432 .. code-block:: yaml
433
434   parameters:
435
436     vm_role:
437       type: string
438       description: Unique role for this VM
439
440 *Example: 'vm-role' Definition: Hard Coded in
441 OS::Nova::Resource metadata property*
442
443 .. code-block:: yaml
444
445   resources:
446
447     dns_server_0
448       type: OS::Nova::Server
449       properties:
450         . . . .
451         metadata:
452           vm_role: dns
453
454 *Example 'vm-role' Definition: Defined in Environment file
455 and retrieved via 'get_param'*
456
457 .. code-block:: yaml
458
459   resources:
460
461     dns_server_0:
462       type: OS::Nova::Server
463       properties:
464         . . . .
465         metadata:
466           vm_role: { get_param: vm_role }
467
468 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
469 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
470
471 The example below depicts part of a Heat Orchestration Template that
472 uses the five of the ``OS::Nova::Server`` resource
473 ``metadata`` map value parameters discussed in this
474 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
475
476 .. code-block:: yaml
477
478   parameters:
479     lb_name_0
480       type: string
481       description: VM Name for lb VM 0
482     vnf_name:
483       type: string
484       description: Unique name for this VNF instance
485     vnf_id:
486       type: string
487       description: Unique ID for this VNF instance
488     vf_module_name:
489       type: string
490       description: Unique name for this VNF Module instance
491     vf_module_id:
492       type: string
493       description: Unique ID for this VNF Module instance
494     vm_role:
495       type: string
496       description: Unique role for this VM
497   resources:
498     lb_server_0:
499       type: OS::Nova::Server
500       properties:
501         name: { get_param: lb_name_0 }
502         ...
503         metadata:
504           vnf_name: { get_param: vnf_name }
505           vnf_id: { get_param: vnf_id }
506           vf_module_name: { get_param: vf_module_name }
507           vf_module_id: { get_param: vf_module_id }
508           vm_role: lb
509
510 vf_module_index
511 ^^^^^^^^^^^^^^^^^^
512
513
514 .. req::
515     :id: R-50816
516     :target: VNF
517     :keyword: MAY
518     :updated: casablanca
519
520     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
521     resource  property ``metadata`` **MAY**
522     contain the key/value pair ``vf_module_index``
523     and the value **MUST** be obtained via a ``get_param``.
524
525 .. req::
526     :id: R-54340
527     :target: VNF
528     :keyword: MUST
529     :validation_mode: static
530     :updated: casablanca
531
532     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
533     property
534     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
535     be declared as ``vf_module_index`` and the parameter **MUST** be
536     defined as type: ``number``.
537
538
539 .. req::
540     :id: R-09811
541     :target: VNF
542     :keyword: MUST NOT
543     :validation_mode: static
544     :updated: casablanca
545
546
547     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
548     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
549     have parameter constraints defined.
550
551 .. req::
552     :id: R-37039
553     :target: VNF
554     :keyword: MUST NOT
555     :validation_mode: static
556     :updated: casablanca
557
558     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
559     property
560     ``metadata`` key/value pair ``vf_module_index`` parameter
561     ``vf_module_index`` **MUST NOT**
562     be enumerated in the Heat Orchestration Template's environment file.
563
564 .. req::
565     :id: R-22441
566     :target: VNF
567     :keyword: MUST NOT
568     :validation_mode: static
569     :updated: casablanca
570
571     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
572     property ``metadata`` key/value pair ``vf_module_index`` is passed into a
573     Nested YAML file, the key/value pair
574     ``vf_module_index`` **MUST NOT** change.
575
576 .. req::
577     :id: R-55306
578     :target: VNF
579     :keyword: MUST NOT
580     :validation_mode: static
581     :updated: casablanca
582
583     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
584     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
585     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
586     used in VNF's Volume template;
587     it is not supported.
588
589 The ``vf_module_index`` parameter indicates which instance of the module is
590 being deployed into the VNF.
591 This parameter may be used in cases where multiple instances of the same
592 incremental module may be instantiated for scaling purposes. The index
593 can be used in the Heat Orchestration Template for indexing into a
594 pseudo-constant array parameter when unique values are required for each
595 module instance, e.g., for fixed private IP addresses on VM types.
596
597 The ``vf_module_index`` will start at 0 for the first instance of a module
598 type. Subsequent instances of the same module type will receive the
599 lowest unused index. This means that indexes will be reused if a module
600 is deleted and re-added. As an example, if three copies of a module are
601 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
602 the second one is deleted (index 1), and then re-added, index 1 will be
603 reused.
604
605 *Example*
606
607 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
608 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
609 OAM VM attaches to an internal control network which has a
610 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
611 environment file contains the four IP addresses that each successive OAM
612 VM will be assigned. The ``vf_module_index`` is used as the index to
613 determine the IP assignment.
614
615 Environment File
616
617 .. code-block:: yaml
618
619   parameters:
620     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
621
622 YAML File
623
624 .. code-block:: yaml
625
626   parameters:
627     vf_module_index:
628       type: number
629       description: Unique index for this VNF Module instance
630     oam_vm_name_0:
631       type: string
632       description: VM Name for lb VM 0
633     int_ctrl_net_id:
634       type: string
635       description: Neutron UUID for the internal control network
636     oam_vm_int_ctrl_ips:
637       type: comma_delimited_list
638       description: Fixed IP assignments for oam VMs on the internal control
639                    network
640   resources:
641     oam_vm_server_0:
642       type: OS::Nova::Server
643       properties:
644         name: { get_param: oam_vm_name_0 }
645         networks:
646           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
647   #     . . .
648         metadata:
649           vf_module_index: { get_param: vf_module_index }
650     oam_vm_0_int_ctrl_port_0:
651       type: OS::Neutron::Port
652       properties:
653         network: { get_param: int_ctrl_net_id }
654         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
655
656 workload_context
657 ^^^^^^^^^^^^^^^^^^^^^
658
659 .. req::
660     :id: R-47061
661     :target: VNF
662     :keyword: SHOULD
663     :updated: casablanca
664
665     A VNF's Heat Orchestration Template's OS::Nova::Server
666     Resource **SHOULD** contain the metadata map value parameter
667     'workload_context'.
668
669 .. req::
670     :id: R-74978
671     :target: VNF
672     :keyword: MUST
673     :validation_mode: static
674     :updated: casablanca
675
676     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
677     property ``metadata`` key/value pair ``workload_context``
678     parameter **MUST**
679     be declared as ``workload_context`` and the parameter **MUST**
680     be defined as type: ``string``.
681
682 .. req::
683     :id: R-34055
684     :target: VNF
685     :keyword: MUST NOT
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 ``workload_context``
691     parameter ``workload_context`` **MUST NOT**
692     have parameter constraints defined.
693
694 .. req::
695     :id: R-02691
696     :target: VNF
697     :keyword: MUST NOT
698     :validation_mode: static
699     :updated: casablanca
700
701
702     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
703     property ``metadata`` key/value pair ``workload_context``
704     parameter ``workload_context`` **MUST NOT**
705     be enumerated in the Heat Orchestration Template's environment file.
706
707 .. req::
708     :id: R-75202
709     :target: VNF
710     :keyword: MUST NOT
711     :validation_mode: static
712     :updated: casablanca
713
714     If a VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
715     property ``metadata`` key/value pair ``workload_context``
716     is passed into a Nested YAML
717     file, the key/value pair name ``workload_context`` **MUST NOT** change.
718
719
720 The 'workload\_context' parameter value will be chosen by the Service Model
721 Distribution context client in VID and will be supplied to the
722 Heat Orchestration Template by ONAP at orchestration time.
723
724 *Example Parameter Definition*
725
726 .. code-block:: yaml
727
728   parameters:
729     workload_context:
730       type: string
731       description: Workload 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
755 environment_context
756 ^^^^^^^^^^^^^^^^^^^^^
757
758 .. req::
759     :id: R-88536
760     :target: VNF
761     :keyword: SHOULD
762     :updated: casablanca
763
764     A VNF's Heat Orchestration Template's OS::Nova::Server
765     Resource **SHOULD** contain the metadata map value parameter
766     'environment_context'.
767
768 .. req::
769     :id: R-20308
770     :target: VNF
771     :keyword: MUST
772     :validation_mode: static
773     :updated: casablanca
774
775     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
776     property ``metadata`` key/value pair ``environment_context``
777     parameter **MUST** be declared as ``environment_context`` and the
778     parameter type **MUST** be defined as type: ``string``.
779
780 .. req::
781     :id: R-56183
782     :target: VNF
783     :keyword: MUST NOT
784     :validation_mode: static
785     :updated: casablanca
786
787     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
788     property ``metadata``key/value pair ``environment_context``
789     parameter ``environment_context`` **MUST NOT**
790     have parameter constraints defined.
791
792 .. req::
793     :id: R-13194
794     :target: VNF
795     :keyword: MUST NOT
796     :validation_mode: static
797     :updated: casablanca
798
799     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
800     property
801     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
802     be enumerated in the Heat Orchestration Template's environment file.
803
804 .. req::
805     :id: R-62954
806     :target: VNF
807     :keyword: MUST NOT
808     :validation_mode: static
809     :updated: casablanca
810
811     If a VNF's Heat Orchestration Template's ``OS::Nova::Server Resource``
812     ``metadata`` map value parameter ``environment_context`` is passed into a
813     Nested YAML
814     file, the parameter name ``environment_context`` **MUST NOT** change.
815
816 The 'environment_context' parameter value will be defined by the
817 service designer as part of the service model during the SDC
818 on-boarding process and will be supplied to the Heat Orchestration
819 Template by ONAP at orchestration time.
820
821
822 *Example Parameter Definition*
823
824 .. code-block:: yaml
825
826   parameters:
827     environment_context:
828       type: string
829       description: Environment Context for this VNF instance
830
831
832 *Example OS::Nova::Server with metadata*
833
834 .. code-block:: yaml
835
836   resources:
837     . . .
838
839     {vm-type}_server_{index}:
840        type: OS::Nova::Server
841        properties:
842          name:
843          flavor:
844          image:
845         ...
846        metadata:
847           vnf_name: { get_param: vnf_name }
848           vnf_id: { get_param: vnf_id }
849           vf_module_name: { get_param: vf_module_name }
850           vf_module_id: { get_param: vf_module_id }
851           workload_context: {get_param: workload_context}
852           environment_context: {get_param: environment_context }