69b9e03628c2562f4d71b17ead5d29c2af5050b1
[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-100400
248     :keyword: SHOULD
249     :introduced: dublin
250     :target: VNF
251
252     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
253     property metadata **SHOULD** contain the key/value pair ``vf_module_name``.
254
255
256 .. req::
257     :id: R-68023
258     :keyword: MUST
259     :validation_mode: static
260     :target: VNF
261     :updated: dublin
262
263     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
264     property ``metadata`` key/value pair ``vf_module_name``
265     value **MUST**
266     be obtained via a ``get_param``.
267
268 .. req::
269     :id: R-39067
270     :target: VNF
271     :keyword: MUST
272     :validation_mode: static
273     :updated: casablanca
274
275     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
276     property
277     ``metadata`` key/value pair ``vf_module_name`` parameter **MUST** be
278     declared as ``vf_module_name`` and the parameter **MUST**
279     be defined as type: ``string``.
280
281 .. req::
282     :id: R-15480
283     :target: VNF
284     :keyword: MUST NOT
285     :validation_mode: static
286     :updated: casablanca
287
288     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
289     property
290     ``metadata`` key/value pair ``vf_module_name`` parameter ``vf_module_name``
291     **MUST NOT** have parameter constraints defined.
292
293 .. req::
294     :id: R-80374
295     :target: VNF
296     :keyword: MUST NOT
297     :validation_mode: static
298     :updated: casablanca
299
300
301     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
302     property ``metadata`` key/value pair ``vf_module_name``
303     parameter ``vf_module_name`` **MUST NOT**
304     be enumerated in the Heat Orchestration Template's environment file.
305
306
307 *Example 'vf_module_name' Parameter Definition*
308
309 .. code-block:: yaml
310
311   parameters:
312
313     vf_module_name:
314       type: string
315       description: Unique name for this VNF Module instance
316
317 vm_role
318 ^^^^^^^^^
319
320 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vm_role``
321 is a ``metadata`` tag that describes the role of the Virtual Machine.
322
323 .. req::
324     :id: R-85328
325     :target: VNF
326     :keyword: MAY
327     :updated: casablanca
328
329     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
330     ``metadata`` **MAY**
331     contain the key/value pair ``vm_role`` and the value **MUST** be
332     obtained either via
333
334     - ``get_param``
335     - hard coded in the key/value pair ``vm_role``.
336
337 .. req::
338     :id: R-95430
339     :target: VNF
340     :keyword: MAY
341     :validation_mode: none
342     :updated: dublin
343
344     If a VNF's Heat Orchestration Template's ``OS::Nova::Server``
345     resource property
346     ``metadata`` key/value pair ``vm_role`` value is obtained via
347     ``get_param``, the parameter **MAY** be declared as
348
349     * ``vm_role`` and the parameter defined as ``type: string``.
350     * ``vm_roles`` and the parameter defined as ``type: comma_delimited_list``.
351     * ``{vm-type}_vm_role`` and the parameter defined as ``type: string``.
352
353 .. req::
354     :id: R-67597
355     :target: VNF
356     :keyword: MUST NOT
357     :validation_mode: static
358     :updated: casablanca
359
360     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
361     property ``metadata`` key/value pair ``vm_role`` parameter ``vm_role``
362     **MUST NOT** have parameter constraints defined.
363
364 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
365
366
367 .. req::
368     :id: R-86476
369     :target: VNF
370     :keyword: MUST
371     :validation_mode: static
372     :updated: casablanca
373
374     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
375     property ``metadata`` key/value pair ``vm_role`` value **MUST**
376     only contain alphanumeric characters and underscores (i.e., '_').
377
378
379 *Example 'vm_role' Parameter Definition*
380
381 .. code-block:: yaml
382
383   parameters:
384
385     vm_role:
386       type: string
387       description: Unique role for this VM
388
389 *Example: 'vm_role' Definition: Hard Coded in
390 OS::Nova::Resource metadata property*
391
392 .. code-block:: yaml
393
394   resources:
395
396     dns_server_0
397       type: OS::Nova::Server
398       properties:
399         . . . .
400         metadata:
401           vm_role: dns
402
403 *Example 'vm_role' Definition: Defined in Environment file
404 and retrieved via 'get_param'*
405
406 .. code-block:: yaml
407
408   resources:
409
410     dns_server_0:
411       type: OS::Nova::Server
412       properties:
413         . . . .
414         metadata:
415           vm_role: { get_param: vm_role }
416
417 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
418 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
419
420 The example below depicts part of a Heat Orchestration Template that
421 uses the five of the ``OS::Nova::Server`` resource
422 ``metadata`` map value parameters discussed in this
423 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
424
425 .. code-block:: yaml
426
427   parameters:
428     lb_name_0
429       type: string
430       description: VM Name for lb VM 0
431     vnf_name:
432       type: string
433       description: Unique name for this VNF instance
434     vnf_id:
435       type: string
436       description: Unique ID for this VNF instance
437     vf_module_name:
438       type: string
439       description: Unique name for this VNF Module instance
440     vf_module_id:
441       type: string
442       description: Unique ID for this VNF Module instance
443     vm_role:
444       type: string
445       description: Unique role for this VM
446   resources:
447     lb_server_0:
448       type: OS::Nova::Server
449       properties:
450         name: { get_param: lb_name_0 }
451         ...
452         metadata:
453           vnf_name: { get_param: vnf_name }
454           vnf_id: { get_param: vnf_id }
455           vf_module_name: { get_param: vf_module_name }
456           vf_module_id: { get_param: vf_module_id }
457           vm_role: lb
458
459 vf_module_index
460 ^^^^^^^^^^^^^^^^^^
461
462
463 .. req::
464     :id: R-100410
465     :keyword: MAY
466     :introduced: dublin
467     :target: VNF
468
469     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
470     resource  property ``metadata`` **MAY**
471     contain the key/value pair ``vf_module_index``.
472
473
474 .. req::
475     :id: R-50816
476     :keyword: MUST
477     :target: VNF
478     :validation_mode: static
479     :updated: dublin
480
481     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
482     resource  property ``metadata``
483     key/value pair ``vf_module_index``
484     value **MUST** be obtained via a ``get_param``.
485
486 .. req::
487     :id: R-54340
488     :target: VNF
489     :keyword: MUST
490     :validation_mode: static
491     :updated: casablanca
492
493     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
494     property
495     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
496     be declared as ``vf_module_index`` and the parameter **MUST** be
497     defined as type: ``number``.
498
499
500 .. req::
501     :id: R-09811
502     :target: VNF
503     :keyword: MUST NOT
504     :validation_mode: static
505     :updated: casablanca
506
507
508     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
509     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
510     have parameter constraints defined.
511
512 .. req::
513     :id: R-37039
514     :target: VNF
515     :keyword: MUST NOT
516     :validation_mode: static
517     :updated: casablanca
518
519     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
520     property
521     ``metadata`` key/value pair ``vf_module_index`` parameter
522     ``vf_module_index`` **MUST NOT**
523     be enumerated in the Heat Orchestration Template's environment file.
524
525 .. req::
526     :id: R-55306
527     :target: VNF
528     :keyword: MUST NOT
529     :validation_mode: static
530     :updated: casablanca
531
532     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
533     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
534     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
535     used in VNF's Volume template;
536     it is not supported.
537
538 The ``vf_module_index`` parameter indicates which instance of the module is
539 being deployed into the VNF.
540 This parameter may be used in cases where multiple instances of the same
541 incremental module are being instantiated for scaling purposes. The index
542 can be used in the Heat Orchestration Template for indexing into a
543 ``comma_delimited_list`` defined parameter to provide a unique value
544 for each module instance.
545 The parameter list may be defined in the VNF's Heat Orchestration
546 Template's environmental file or be provided by SDN-C.
547
548 ONAP does not support the ``vf_module_index`` to be utilized as an index by all
549 parameters defined as ``comma_delimited_list``.
550 The ``vf_module_index`` must not be used for indexing the following
551 resource property parameters:
552
553 - ``OS::Nova::Server`` property ``name`` parameter (defined as a
554   ``comma_delimited_list``).
555 - ``OS::Neutron::Port`` property ``fixed_ips`` map property ``ip_address``
556   parameter (defined as a ``comma_delimited_list``) when the port is
557   attaching to an ONAP external network (per the ONAP
558   definition, see Requirement R-57424 and R-16968)
559
560 The ``vf_module_index`` may be used for indexing ``OS::Neutron::Port`` property
561 ``fixed_ips`` map property ``ip_address`` parameter (defined as a
562 ``comma_delimited_list``) when the port is attaching to an
563 ONAP internal network (per the ONAP definition, see Requirements R-52425 and
564 R-46461 and R-35666).  An example is provided below.
565
566 .. req::
567     :id: R-55307
568     :target: VNF
569     :keyword: MUST NOT
570     :validation_mode: static
571     :introduced: frankfurt
572
573     A VNF's Heat Orchestration Template's parameter ``vf_module_index``
574     **MUST NOT** be used for indexing an:
575
576     - ``OS::Nova::Server`` property ``name`` parameter (when defined as a
577       ``comma_delimited_list``).
578     - ``OS::Neutron::Port`` property ``fixed_ips`` map property ``ip_address``
579       parameter (when defined as a ``comma_delimited_list``) when the port is
580       attaching to an ONAP external network (per the ONAP
581       definition, see Requirement R-57424 and R-16968)
582     - ``OS::ContrailV2::InstanceIp`` property ``instance_ip_address``
583       parameter (when defined as a ``comma_delimited_list``) when the port
584       (i.e, ``OS::ContrailV2::VirtualMachineInterface``) is
585       attaching to an ONAP external network (per the ONAP
586       definition, see Requirement R-57424 and R-16968)
587
588 The ``vf_module_index`` will start at 0 for the first instance of a module
589 type. Subsequent instances of the same module type will receive the
590 lowest unused index. This means that indexes will be reused if a module
591 is deleted and re-added. As an example, if three copies of a module are
592 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
593 the second one is deleted (index 1), and then re-added, index 1 will be
594 reused.
595
596 *Example*
597
598 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
599 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
600 OAM VM attaches to an ONAP internal network which has a
601 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
602 environment file contains the four IP addresses that each successive OAM
603 VM will be assigned. The ``vf_module_index`` is used as the index to
604 determine the IP assignment.
605
606 Environment File
607
608 .. code-block:: yaml
609
610   parameters:
611     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
612
613 YAML File
614
615 .. code-block:: yaml
616
617   parameters:
618     vf_module_index:
619       type: number
620       description: Unique index for this VNF Module instance
621     oam_vm_name_0:
622       type: string
623       description: VM Name for lb VM 0
624     int_ctrl_net_id:
625       type: string
626       description: Neutron UUID for the internal control network
627     oam_vm_int_ctrl_ips:
628       type: comma_delimited_list
629       description: Fixed IP assignments for oam VMs on the internal control
630                    network
631   resources:
632     oam_vm_server_0:
633       type: OS::Nova::Server
634       properties:
635         name: { get_param: oam_vm_name_0 }
636         networks:
637           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
638   #     . . .
639         metadata:
640           vf_module_index: { get_param: vf_module_index }
641     oam_vm_0_int_ctrl_port_0:
642       type: OS::Neutron::Port
643       properties:
644         network: { get_param: int_ctrl_net_id }
645         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
646
647 workload_context
648 ^^^^^^^^^^^^^^^^^^^^^
649
650 .. req::
651     :id: R-47061
652     :target: VNF
653     :keyword: SHOULD
654     :updated: casablanca
655
656     A VNF's Heat Orchestration Template's OS::Nova::Server
657     Resource **SHOULD** contain the metadata map value parameter
658     'workload_context'.
659
660 .. req::
661     :id: R-74978
662     :target: VNF
663     :keyword: MUST
664     :validation_mode: static
665     :updated: casablanca
666
667     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
668     property ``metadata`` key/value pair ``workload_context``
669     parameter **MUST**
670     be declared as ``workload_context`` and the parameter **MUST**
671     be defined as type: ``string``.
672
673 .. req::
674     :id: R-34055
675     :target: VNF
676     :keyword: MUST NOT
677     :validation_mode: static
678     :updated: casablanca
679
680     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
681     property ``metadata`` key/value pair ``workload_context``
682     parameter ``workload_context`` **MUST NOT**
683     have parameter constraints defined.
684
685 .. req::
686     :id: R-02691
687     :target: VNF
688     :keyword: MUST NOT
689     :validation_mode: static
690     :updated: casablanca
691
692
693     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
694     property ``metadata`` key/value pair ``workload_context``
695     parameter ``workload_context`` **MUST NOT**
696     be enumerated in the Heat Orchestration Template's environment file.
697
698 The 'workload\_context' parameter value will be chosen by the Service Model
699 Distribution context client in VID and will be supplied to the
700 Heat Orchestration Template by ONAP at orchestration time.
701
702 *Example Parameter Definition*
703
704 .. code-block:: yaml
705
706   parameters:
707     workload_context:
708       type: string
709       description: Workload Context for this VNF instance
710
711
712 *Example OS::Nova::Server with metadata*
713
714 .. code-block:: yaml
715
716   resources:
717     . . .
718
719     {vm-type}_server_{index}:
720        type: OS::Nova::Server
721        properties:
722          name:
723          flavor:
724          image:
725         ...
726        metadata:
727           vnf_name: { get_param: vnf_name }
728           vnf_id: { get_param: vnf_id }
729           vf_module_name: { get_param: vf_module_name }
730           vf_module_id: { get_param: vf_module_id }
731           workload_context: {get_param: workload_context}
732
733 environment_context
734 ^^^^^^^^^^^^^^^^^^^^^
735
736 .. req::
737     :id: R-88536
738     :target: VNF
739     :keyword: SHOULD
740     :updated: casablanca
741
742     A VNF's Heat Orchestration Template's OS::Nova::Server
743     Resource **SHOULD** contain the metadata map value parameter
744     'environment_context'.
745
746 .. req::
747     :id: R-20308
748     :target: VNF
749     :keyword: MUST
750     :validation_mode: static
751     :updated: casablanca
752
753     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
754     property ``metadata`` key/value pair ``environment_context``
755     parameter **MUST** be declared as ``environment_context`` and the
756     parameter type **MUST** be defined as type: ``string``.
757
758 .. req::
759     :id: R-56183
760     :target: VNF
761     :keyword: MUST NOT
762     :validation_mode: static
763     :updated: casablanca
764
765     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
766     property ``metadata``key/value pair ``environment_context``
767     parameter ``environment_context`` **MUST NOT**
768     have parameter constraints defined.
769
770 .. req::
771     :id: R-13194
772     :target: VNF
773     :keyword: MUST NOT
774     :validation_mode: static
775     :updated: casablanca
776
777     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
778     property
779     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
780     be enumerated in the Heat Orchestration Template's environment file.
781
782 The 'environment_context' parameter value will be defined by the
783 service designer as part of the service model during the SDC
784 on-boarding process and will be supplied to the Heat Orchestration
785 Template by ONAP at orchestration time.
786
787
788 *Example Parameter Definition*
789
790 .. code-block:: yaml
791
792   parameters:
793     environment_context:
794       type: string
795       description: Environment Context for this VNF instance
796
797
798 *Example OS::Nova::Server with metadata*
799
800 .. code-block:: yaml
801
802   resources:
803     . . .
804
805     {vm-type}_server_{index}:
806        type: OS::Nova::Server
807        properties:
808          name:
809          flavor:
810          image:
811         ...
812        metadata:
813           vnf_name: { get_param: vnf_name }
814           vnf_id: { get_param: vnf_id }
815           vf_module_name: { get_param: vf_module_name }
816           vf_module_id: { get_param: vf_module_id }
817           workload_context: {get_param: workload_context}
818           environment_context: {get_param: environment_context }