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