5.2.5.7. Resource Property “name”

The parameter naming convention of the property name for the resource OS::Nova::Server has been defined in Resource: OS::Nova::Server Metadata Parameters.

This section provides specifies how the property name for non OS::Nova::Server resources must be defined when the property is used. Not all resources require the property name (e.g., it is optional) and some resources do not support the property.

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

If a VNF’s Heat Orchestration Template contains the property name for a non OS::Nova::Server resource, the intrinsic function str_replace MUST be used in conjunction with the ONAP supplied metadata parameter vnf_name to generate a unique value. Additional data MAY be used in the str_replace construct to generate a unique value.

This approach prevents the enumeration of a unique value for the property name in a per instance environment file.

In most cases the use of the metadata value vnf_name will create a unique property name. If this does not create a unique value, additional dynamic or constant data can be added to the str_replace construct.

For example, the Heat Orchestration Template pseudo parameter OS::stack_name can be used in the str_replace construct.

For resources created in a nested heat file invoked by an OS::Heat::ResourceGroup, the index can be used to construct a unique value.

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

A value for VNF’s Heat Orchestration Template’s property name for a non OS::Nova::Server resource MUST NOT be declared in the VNF’s Heat Orchestration Template’s Environment File.

Example: Property ‘name’ for resource ‘OS::Neutron::SecurityGroup’

resources:
  DNS_SECURITY_GROUP:
    type: OS::Neutron::SecurityGroup
    properties:
      description: vDNS security group
      name:
        str_replace:
          template: VNF_NAME_sec_grp_DNS
          params:
            VNF_NAME: {get_param: vnf_name}
      rules: [. . . . .]

Example: Property ‘name’ for resource ‘OS::Cinder::Volume’

resources:
  dns_volume_0:
    type: OS::Cinder::Volume
    properties:
      description: Cinder Volume
      name:
        str_replace:
          template: VNF_NAME_STACK_NAME_dns_volume
          params:
            VNF_NAME: {get_param: vnf_name}
            STACK_NAME: { get_param: 'OS::stack_name' }
. . . .

Example: Property ‘name’ for resource ‘OS::Cinder::Volume’ invoked by a ‘OS::Heat::ResourceGroup’

resources:
  dns_volume_0:
    type: OS::Cinder::Volume
    properties:
      description: Cinder Volume
      name:
        str_replace:
            template: VNF_NAME_STACK_NAME_dns_volume_INDEX
            params:
                VNF_NAME: { get_param: vnf_name }
                STACK_NAME: { get_param: 'OS::stack_name' }
                INDEX: { get_param: index }
. . . .

5.2.5.7.1. Contrail Issue with Values for the Property Name

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

The Contrail GUI has a limitation displaying special characters. The issue is documented in https://bugs.launchpad.net/juniperopenstack/+bug/1590710. It is recommended that special SHOULD characters be avoided. However, if special characters must be used, note that for the following resources:

  • Virtual Machine
  • Virtual Network
  • Port
  • Security Group
  • Policies
  • IPAM Creation

the only special characters supported are - ” ! $’ ( ) = ~ ^ | @ ` { } [ ] > , . _”