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