5.2.5.5. Resource: OS::Nova::Server Metadata Parameters

The OS::Nova::Server resource property metadata is an optional OpenStack property. Table 2 summarizes the mandatory and optional metadata supported by ONAP. The sections that follow provides the requirements associated with each metadata parameter.

Table 2 OS::Nova::Server Mandatory and Optional Metadata
Resource Property Parameter Name Parameter Type Required Parameter Value Provided to Heat
OS::Nova::Server metadata vnf_id string MUST ONAP
OS::Nova::Server metadata vf_module_id string MUST ONAP
OS::Nova::Server metadata vnf_name string MUST ONAP
OS::Nova::Server metadata vf_module_name string SHOULD ONAP
OS::Nova::Server metadata vm_role string MAY YAML or Environment File
OS::Nova::Server metadata vf_module_index number MAY ONAP
OS::Nova::Server metadata workload_context string MUST ONAP
OS::Nova::Server metadata environment_context string MUST ONAP

5.2.5.5.1. vnf_id

The OS::Nova::Server resource property metadata key/value pair vnf_id is an ONAP generated UUID that identifies the VNF. The value is provided by ONAP to the VNF’s Heat Orchestration Template at orchestration time.

Requirement: R-37437
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata MUST contain the key/value pair vnf_id and the value MUST be obtained via a get_param.

Requirement: R-07507
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_id parameter MUST be declared as vnf_id and the parameter MUST be defined as type: string.

Requirement: R-55218
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_id parameter vnf_id MUST NOT have parameter constraints defined.

Requirement: R-20856
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_id parameter vnf_id MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

Example ‘vnf_id’ Parameter Definition

parameters:

  vnf_id:
    type: string
    description: Unique ID for this VNF instance

5.2.5.5.2. vf_module_id

The OS::Nova::Server Resource metadata map value parameter vf_module_id is an ONAP generated UUID that identifies the VF Module (e.g., Heat Orchestration Template). The value is provided by ONAP to the VNF’s Heat Orchestration Template at orchestration time.

Requirement: R-71493
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata MUST contain the key/value pair vf_module_id and the value MUST be obtained via a get_param.

Requirement: R-82134
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_id parameter MUST be declared as vf_module_id and the parameter MUST be defined as type: string.

Requirement: R-98374
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_id parameter vf_module_id MUST NOT have parameter constraints defined.

Requirement: R-72871
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_id parameter vf_module_id MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

Example ‘vf_module_id’ Parameter Definition

parameters:

  vnf_module_id:
    type: string
    description: Unique ID for this VNF module instance

5.2.5.5.3. vnf_name

The OS::Nova::Server Resource metadata map value parameter vnf_name is the ONAP (SDN-C) generated alphanumeric name of the deployed VNF instance. The value is provided by ONAP to the VNF’s Heat Orchestration Template at orchestration time.

Requirement: R-72483
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata MUST contain the key/value pair vnf_name and the value MUST be obtained via a get_param.

Requirement: R-62428
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_name parameter MUST be declared as vnf_name and the parameter MUST be defined as type: string.

Requirement: R-44318
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_name parameter vnf_name MUST NOT have parameter constraints defined.

Requirement: R-36542
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vnf_name parameter vnf_name MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

Example ‘vnf_name’ Parameter Definition

parameters:

  vnf_name:
    type: string
    description: Unique name for this VNF instance

5.2.5.5.4. vf_module_name

The OS::Nova::Server Resource metadata map value parameter vf_module_name is the deployment name of the heat stack created (e.g., <STACK_NAME>) from the VNF’s Heat Orchestration template in the command Heat stack-create (e.g., Heat stack-create [-f <FILE>] [-e <FILE>] <STACK_NAME>). The vf_module_name (e.g., <STACK_NAME> is specified as part of the orchestration process.

Requirement: R-100400
target: VNF
keyword: SHOULD
introduced: dublin

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata SHOULD contain the key/value pair vf_module_name.

Requirement: R-68023
updated: dublin
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_name value MUST be obtained via a get_param.

Requirement: R-39067
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_name parameter MUST be declared as vf_module_name and the parameter MUST be defined as type: string.

Requirement: R-15480
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_name parameter vf_module_name MUST NOT have parameter constraints defined.

Requirement: R-80374
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_name parameter vf_module_name MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

Example ‘vf_module_name’ Parameter Definition

parameters:

  vf_module_name:
    type: string
    description: Unique name for this VNF Module instance

5.2.5.5.5. vm_role

The OS::Nova::Server Resource metadata map value parameter vm_role is a metadata tag that describes the role of the Virtual Machine.

Requirement: R-85328
updated: casablanca
target: VNF
keyword: MAY

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata MAY contain the key/value pair vm_role and the value MUST be obtained either via

  • get_param
  • hard coded in the key/value pair vm_role.
Requirement: R-95430
updated: dublin
validation_mode: none
target: VNF
keyword: MAY

If a VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vm_role value is obtained via get_param, the parameter MAY be declared as

  • vm_role and the parameter defined as type: string.
  • vm_roles and the parameter defined as type: comma_delimited_list.
  • {vm-type}_vm_role and the parameter defined as type: string.
Requirement: R-67597
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vm_role parameter vm_role MUST NOT have parameter constraints defined.

Defining the vm_role as the {vm-type} is a recommended convention

Requirement: R-86476
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vm_role value MUST only contain alphanumeric characters and underscores (i.e., ‘_’).

Example ‘vm_role’ Parameter Definition

parameters:

  vm_role:
    type: string
    description: Unique role for this VM

Example: ‘vm_role’ Definition: Hard Coded in OS::Nova::Resource metadata property

resources:

  dns_server_0
    type: OS::Nova::Server
    properties:
      . . . .
      metadata:
        vm_role: dns

Example ‘vm_role’ Definition: Defined in Environment file and retrieved via ‘get_param’

resources:

  dns_server_0:
    type: OS::Nova::Server
    properties:
      . . . .
      metadata:
        vm_role: { get_param: vm_role }

5.2.5.5.6. Example vnf_id, vf_module_id, vnf_name, vf_module_name, vm_role

The example below depicts part of a Heat Orchestration Template that uses the five of the OS::Nova::Server resource metadata map value parameters discussed in this section. The {vm-type} has been defined as lb for load balancer.

parameters:
  lb_name_0
    type: string
    description: VM Name for lb VM 0
  vnf_name:
    type: string
    description: Unique name for this VNF instance
  vnf_id:
    type: string
    description: Unique ID for this VNF instance
  vf_module_name:
    type: string
    description: Unique name for this VNF Module instance
  vf_module_id:
    type: string
    description: Unique ID for this VNF Module instance
  vm_role:
    type: string
    description: Unique role for this VM
resources:
  lb_server_0:
    type: OS::Nova::Server
    properties:
      name: { get_param: lb_name_0 }
      ...
      metadata:
        vnf_name: { get_param: vnf_name }
        vnf_id: { get_param: vnf_id }
        vf_module_name: { get_param: vf_module_name }
        vf_module_id: { get_param: vf_module_id }
        vm_role: lb

5.2.5.5.7. vf_module_index

Requirement: R-100410
target: VNF
keyword: MAY
introduced: dublin

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata MAY contain the key/value pair vf_module_index.

Requirement: R-50816
updated: dublin
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_index value MUST be obtained via a get_param.

Requirement: R-54340
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_index parameter MUST be declared as vf_module_index and the parameter MUST be defined as type: number.

Requirement: R-09811
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_index MUST NOT have parameter constraints defined.

Requirement: R-37039
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_index parameter vf_module_index MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

Requirement: R-55306
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair vf_module_index MUST NOT be used in a OS::Cinder::Volume resource and MUST NOT be used in VNF’s Volume template; it is not supported.

The vf_module_index parameter indicates which instance of the module is being deployed into the VNF. This parameter may be used in cases where multiple instances of the same incremental module may be instantiated for scaling purposes. The index can be used in the Heat Orchestration Template for indexing into a pseudo-constant array parameter when unique values are required for each module instance, e.g., for fixed private IP addresses on VM types.

The vf_module_index will start at 0 for the first instance of a module type. Subsequent instances of the same module type will receive the lowest unused index. This means that indexes will be reused if a module is deleted and re-added. As an example, if three copies of a module are deployed with vf_module_index values of 0, 1, and 2 then subsequently the second one is deleted (index 1), and then re-added, index 1 will be reused.

Example

In this example, the {vm-type} has been defined as oam_vm to represent an OAM VM. An incremental heat module is used to deploy the OAM VM. The OAM VM attaches to an internal control network which has a {network-role} of ctrl. A maximum of four OAM VMs can be deployed. The environment file contains the four IP addresses that each successive OAM VM will be assigned. The vf_module_index is used as the index to determine the IP assignment.

Environment File

parameters:
  oam_vm_int_ctrl_ips: 10.10.10.1,10.10.10.2,10.10.10.3,10.10.10.4

YAML File

parameters:
  vf_module_index:
    type: number
    description: Unique index for this VNF Module instance
  oam_vm_name_0:
    type: string
    description: VM Name for lb VM 0
  int_ctrl_net_id:
    type: string
    description: Neutron UUID for the internal control network
  oam_vm_int_ctrl_ips:
    type: comma_delimited_list
    description: Fixed IP assignments for oam VMs on the internal control
                 network
resources:
  oam_vm_server_0:
    type: OS::Nova::Server
    properties:
      name: { get_param: oam_vm_name_0 }
      networks:
        - port: { get_resource: oam_vm_0_int_ctrl_port_0 }
#     . . .
      metadata:
        vf_module_index: { get_param: vf_module_index }
  oam_vm_0_int_ctrl_port_0:
    type: OS::Neutron::Port
    properties:
      network: { get_param: int_ctrl_net_id }
      fixed_ips: [ { "ip_address": {get_param: [ oam_vm_int_ctrl_ips, { get_param: vf_module_index} ]}}]

5.2.5.5.8. workload_context

Requirement: R-47061
updated: casablanca
target: VNF
keyword: SHOULD

A VNF’s Heat Orchestration Template’s OS::Nova::Server Resource SHOULD contain the metadata map value parameter ‘workload_context’.

Requirement: R-74978
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair workload_context parameter MUST be declared as workload_context and the parameter MUST be defined as type: string.

Requirement: R-34055
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair workload_context parameter workload_context MUST NOT have parameter constraints defined.

Requirement: R-02691
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair workload_context parameter workload_context MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

The ‘workload_context’ parameter value will be chosen by the Service Model Distribution context client in VID and will be supplied to the Heat Orchestration Template by ONAP at orchestration time.

Example Parameter Definition

parameters:
  workload_context:
    type: string
    description: Workload Context for this VNF instance

Example OS::Nova::Server with metadata

resources:
  . . .

  {vm-type}_server_{index}:
     type: OS::Nova::Server
     properties:
       name:
       flavor:
       image:
      ...
     metadata:
        vnf_name: { get_param: vnf_name }
        vnf_id: { get_param: vnf_id }
        vf_module_name: { get_param: vf_module_name }
        vf_module_id: { get_param: vf_module_id }
        workload_context: {get_param: workload_context}

5.2.5.5.9. environment_context

Requirement: R-88536
updated: casablanca
target: VNF
keyword: SHOULD

A VNF’s Heat Orchestration Template’s OS::Nova::Server Resource SHOULD contain the metadata map value parameter ‘environment_context’.

Requirement: R-20308
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair environment_context parameter MUST be declared as environment_context and the parameter type MUST be defined as type: string.

Requirement: R-56183
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata``key/value pair ``environment_context parameter environment_context MUST NOT have parameter constraints defined.

Requirement: R-13194
updated: casablanca
validation_mode: static
target: VNF
keyword: MUST NOT

A VNF’s Heat Orchestration Template’s OS::Nova::Server resource property metadata key/value pair environment_context MUST NOT be enumerated in the Heat Orchestration Template’s environment file.

The ‘environment_context’ parameter value will be defined by the service designer as part of the service model during the SDC on-boarding process and will be supplied to the Heat Orchestration Template by ONAP at orchestration time.

Example Parameter Definition

parameters:
  environment_context:
    type: string
    description: Environment Context for this VNF instance

Example OS::Nova::Server with metadata

resources:
  . . .

  {vm-type}_server_{index}:
     type: OS::Nova::Server
     properties:
       name:
       flavor:
       image:
      ...
     metadata:
        vnf_name: { get_param: vnf_name }
        vnf_id: { get_param: vnf_id }
        vf_module_name: { get_param: vf_module_name }
        vf_module_id: { get_param: vf_module_id }
        workload_context: {get_param: workload_context}
        environment_context: {get_param: environment_context }