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.
 
   5 .. _Nova Server - Metadata Parameters:
 
   7 Resource: OS::Nova::Server Metadata Parameters
 
   8 --------------------------------------------------------------------------------
 
  10 The ``OS::Nova::Server`` resource property ``metadata`` is an optional
 
  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.
 
  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
 
  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
 
  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.
 
  43     :validation_mode: static
 
  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``.
 
  55     :validation_mode: static
 
  58     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
 
  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``.
 
  68     :validation_mode: static
 
  71     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
 
  73     ``metadata`` key/value pair ``vnf_id`` parameter ``vnf_id`` **MUST NOT**
 
  74     have parameter constraints defined.
 
  80     :validation_mode: static
 
  83     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
 
  85     ``metadata`` key/value pair ``vnf_id`` parameter ``vnf_id`` **MUST NOT**
 
  86     be enumerated in the Heat Orchestration Template's environment file.
 
  88 *Example 'vnf_id' Parameter Definition*
 
  96       description: Unique ID for this VNF instance
 
 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.
 
 111     :validation_mode: static
 
 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``.
 
 123     :validation_mode: static
 
 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``.
 
 135     :validation_mode: static
 
 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``
 
 141     have parameter constraints defined.
 
 147     :validation_mode: static
 
 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``
 
 153     be enumerated in the Heat Orchestration Template's environment file.
 
 155 *Example 'vf_module_id' Parameter Definition*
 
 163       description: Unique ID for this VNF module instance
 
 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.
 
 172 is provided by ONAP to the VNF's Heat Orchestration
 
 173 Template at orchestration time.
 
 179     :validation_mode: static
 
 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``.
 
 190     :validation_mode: static
 
 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
 
 202     :validation_mode: static
 
 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.
 
 214     :validation_mode: static
 
 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.
 
 223 *Example 'vnf_name' Parameter Definition*
 
 231       description: Unique name for this VNF instance
 
 236 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter
 
 238 is the deployment name of the heat stack created (e.g., ``<STACK_NAME>``)
 
 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.
 
 252     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 253     property ``metadata`` **SHOULD**
 
 254     contain the key/value pair ``vf_module_name`` and the value **MUST**
 
 255     be obtained via a ``get_param``.
 
 261     :validation_mode: static
 
 264     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 266     ``metadata`` key/value pair ``vf_module_name`` parameter **MUST** be
 
 267     declared as ``vf_module_name`` and the parameter **MUST**
 
 268     be defined as type: ``string``.
 
 274     :validation_mode: static
 
 277     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 279     ``metadata`` key/value pair ``vf_module_name`` parameter ``vf_module_name``
 
 280     **MUST NOT** have parameter constraints defined.
 
 286     :validation_mode: static
 
 290     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 291     property ``metadata`` key/value pair ``vf_module_name``
 
 292     parameter ``vf_module_name`` **MUST NOT**
 
 293     be enumerated in the Heat Orchestration Template's environment file.
 
 296 *Example 'vf_module_name' Parameter Definition*
 
 304       description: Unique name for this VNF Module instance
 
 309 The ``OS::Nova::Server`` Resource ``metadata`` map value parameter ``vm-role``
 
 310 is a ``metadata`` tag that describes the role of the Virtual Machine.
 
 311 The ``vm_role`` is stored in ONAP’s A&AI module and is
 
 312 available for use by other ONAP components and/or north bound systems.
 
 320     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource property
 
 322     contain the key/value pair ``vm_role`` and the value **MUST** be
 
 326     - hard coded in the key/value pair ``vm_role``.
 
 332     :validation_mode: static
 
 335     If a VNF's Heat Orchestration Template's ``OS::Nova::Server``
 
 337     ``metadata`` key/value pair ``vm_role`` value is obtained via
 
 338     ``get_param``, the parameter **MUST** be declared as ``vm_role``
 
 339     and the parameter **MUST** be defined as type: ``string``.
 
 345     :validation_mode: static
 
 348     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 349     property ``metadata`` key/value pair ``vm_role`` parameter ``vm_role``
 
 350     **MUST NOT** have parameter constraints defined.
 
 352 Defining the ``vm_role`` as the ``{vm-type}`` is a recommended convention
 
 359     :validation_mode: static
 
 362     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 363     property ``metadata`` key/value pair ``vm_role`` value **MUST**
 
 364     only contain alphanumeric characters and underscores (i.e., '_').
 
 367 *Example 'vm_role' Parameter Definition*
 
 375       description: Unique role for this VM
 
 377 *Example: 'vm-role' Definition: Hard Coded in
 
 378 OS::Nova::Resource metadata property*
 
 385       type: OS::Nova::Server
 
 391 *Example 'vm-role' Definition: Defined in Environment file
 
 392 and retrieved via 'get_param'*
 
 399       type: OS::Nova::Server
 
 403           vm_role: { get_param: vm_role }
 
 405 Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role
 
 406 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 408 The example below depicts part of a Heat Orchestration Template that
 
 409 uses the five of the ``OS::Nova::Server`` resource
 
 410 ``metadata`` map value parameters discussed in this
 
 411 section. The ``{vm-type}`` has been defined as ``lb`` for load balancer.
 
 418       description: VM Name for lb VM 0
 
 421       description: Unique name for this VNF instance
 
 424       description: Unique ID for this VNF instance
 
 427       description: Unique name for this VNF Module instance
 
 430       description: Unique ID for this VNF Module instance
 
 433       description: Unique role for this VM
 
 436       type: OS::Nova::Server
 
 438         name: { get_param: lb_name_0 }
 
 441           vnf_name: { get_param: vnf_name }
 
 442           vnf_id: { get_param: vnf_id }
 
 443           vf_module_name: { get_param: vf_module_name }
 
 444           vf_module_id: { get_param: vf_module_id }
 
 457     A VNF's Heat Orchestration Template's ``OS::Nova::Server``
 
 458     resource  property ``metadata`` **MAY**
 
 459     contain the key/value pair ``vf_module_index``
 
 460     and the value **MUST** be obtained via a ``get_param``.
 
 466     :validation_mode: static
 
 469     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 471     ``metadata`` key/value pair ``vf_module_index`` parameter **MUST**
 
 472     be declared as ``vf_module_index`` and the parameter **MUST** be
 
 473     defined as type: ``number``.
 
 480     :validation_mode: static
 
 484     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 485     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
 
 486     have parameter constraints defined.
 
 492     :validation_mode: static
 
 495     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 497     ``metadata`` key/value pair ``vf_module_index`` parameter
 
 498     ``vf_module_index`` **MUST NOT**
 
 499     be enumerated in the Heat Orchestration Template's environment file.
 
 505     :validation_mode: static
 
 508     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 509     property ``metadata`` key/value pair ``vf_module_index`` **MUST NOT**
 
 510     be used in a ``OS::Cinder::Volume`` resource and **MUST NOT** be
 
 511     used in VNF's Volume template;
 
 514 The ``vf_module_index`` parameter indicates which instance of the module is
 
 515 being deployed into the VNF.
 
 516 This parameter may be used in cases where multiple instances of the same
 
 517 incremental module may be instantiated for scaling purposes. The index
 
 518 can be used in the Heat Orchestration Template for indexing into a
 
 519 pseudo-constant array parameter when unique values are required for each
 
 520 module instance, e.g., for fixed private IP addresses on VM types.
 
 522 The ``vf_module_index`` will start at 0 for the first instance of a module
 
 523 type. Subsequent instances of the same module type will receive the
 
 524 lowest unused index. This means that indexes will be reused if a module
 
 525 is deleted and re-added. As an example, if three copies of a module are
 
 526 deployed with ``vf_module_index`` values of 0, 1, and 2 then subsequently
 
 527 the second one is deleted (index 1), and then re-added, index 1 will be
 
 532 In this example, the ``{vm-type}`` has been defined as ``oam_vm`` to represent
 
 533 an OAM VM. An incremental heat module is used to deploy the OAM VM. The
 
 534 OAM VM attaches to an internal control network which has a
 
 535 ``{network-role}`` of ``ctrl``. A maximum of four OAM VMs can be deployed. The
 
 536 environment file contains the four IP addresses that each successive OAM
 
 537 VM will be assigned. The ``vf_module_index`` is used as the index to
 
 538 determine the IP assignment.
 
 545     oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4
 
 554       description: Unique index for this VNF Module instance
 
 557       description: VM Name for lb VM 0
 
 560       description: Neutron UUID for the internal control network
 
 562       type: comma_delimited_list
 
 563       description: Fixed IP assignments for oam VMs on the internal control
 
 567       type: OS::Nova::Server
 
 569         name: { get_param: oam_vm_name_0 }
 
 571           - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
 
 574           vf_module_index: { get_param: vf_module_index }
 
 575     oam_vm_0_int_ctrl_port_0:
 
 576       type: OS::Neutron::Port
 
 578         network: { get_param: int_ctrl_net_id }
 
 579         fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]
 
 582 ^^^^^^^^^^^^^^^^^^^^^
 
 590     A VNF's Heat Orchestration Template's OS::Nova::Server
 
 591     Resource **SHOULD** contain the metadata map value parameter
 
 598     :validation_mode: static
 
 601     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 602     property ``metadata`` key/value pair ``workload_context``
 
 604     be declared as ``workload_context`` and the parameter **MUST**
 
 605     be defined as type: ``string``.
 
 611     :validation_mode: static
 
 614     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 615     property ``metadata`` key/value pair ``workload_context``
 
 616     parameter ``workload_context`` **MUST NOT**
 
 617     have parameter constraints defined.
 
 623     :validation_mode: static
 
 627     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 628     property ``metadata`` key/value pair ``workload_context``
 
 629     parameter ``workload_context`` **MUST NOT**
 
 630     be enumerated in the Heat Orchestration Template's environment file.
 
 632 The 'workload\_context' parameter value will be chosen by the Service Model
 
 633 Distribution context client in VID and will be supplied to the
 
 634 Heat Orchestration Template by ONAP at orchestration time.
 
 636 *Example Parameter Definition*
 
 643       description: Workload Context for this VNF instance
 
 646 *Example OS::Nova::Server with metadata*
 
 653     {vm-type}_server_{index}:
 
 654        type: OS::Nova::Server
 
 661           vnf_name: { get_param: vnf_name }
 
 662           vnf_id: { get_param: vnf_id }
 
 663           vf_module_name: { get_param: vf_module_name }
 
 664           vf_module_id: { get_param: vf_module_id }
 
 665           workload_context: {get_param: workload_context}
 
 668 ^^^^^^^^^^^^^^^^^^^^^
 
 676     A VNF's Heat Orchestration Template's OS::Nova::Server
 
 677     Resource **SHOULD** contain the metadata map value parameter
 
 678     'environment_context'.
 
 684     :validation_mode: static
 
 687     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 688     property ``metadata`` key/value pair ``environment_context``
 
 689     parameter **MUST** be declared as ``environment_context`` and the
 
 690     parameter type **MUST** be defined as type: ``string``.
 
 696     :validation_mode: static
 
 699     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 700     property ``metadata``key/value pair ``environment_context``
 
 701     parameter ``environment_context`` **MUST NOT**
 
 702     have parameter constraints defined.
 
 708     :validation_mode: static
 
 711     A VNF's Heat Orchestration Template's ``OS::Nova::Server`` resource
 
 713     ``metadata`` key/value pair ``environment_context`` **MUST NOT**
 
 714     be enumerated in the Heat Orchestration Template's environment file.
 
 716 The 'environment_context' parameter value will be defined by the
 
 717 service designer as part of the service model during the SDC
 
 718 on-boarding process and will be supplied to the Heat Orchestration
 
 719 Template by ONAP at orchestration time.
 
 722 *Example Parameter Definition*
 
 729       description: Environment Context for this VNF instance
 
 732 *Example OS::Nova::Server with metadata*
 
 739     {vm-type}_server_{index}:
 
 740        type: OS::Nova::Server
 
 747           vnf_name: { get_param: vnf_name }
 
 748           vnf_id: { get_param: vnf_id }
 
 749           vf_module_name: { get_param: vf_module_name }
 
 750           vf_module_id: { get_param: vf_module_id }
 
 751           workload_context: {get_param: workload_context}
 
 752           environment_context: {get_param: environment_context }