diff options
Diffstat (limited to 'docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst')
-rw-r--r-- | docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst | 122 |
1 files changed, 59 insertions, 63 deletions
diff --git a/docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst b/docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst index 90fb33b..8c10e4b 100644 --- a/docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst +++ b/docs/Chapter5/Heat/ONAP Heat Cinder Volumes.rst @@ -45,8 +45,8 @@ while others **MAY** be included. As stated in :need:`R-07443`, a VNF's Heat Orchestration Templates' Cinder Volume Module Output Parameter's name and type **MUST** match the input parameter name and type in the corresponding Base Module or Incremental Module unless -the Output Parameter is of the type 'comma_delimited_list', -then the corresponding input parameter **MUST** be declared as type 'json'. +the Output Parameter is of the type ``comma_delimited_list``, +then the corresponding input parameter **MUST** be declared as type ``json``. A single volume module must create only the volumes required by a single Incremental module or Base module. @@ -79,94 +79,90 @@ Optional Property availability_zone :id: R-25190 :target: VNF :keyword: SHOULD NOT + :updated: casablanca - A VNF's Heat Orchestration Template's Resource 'OS::Cinder::Volume' - **SHOULD NOT** declare the property 'availability_zone'. + A VNF's Heat Orchestration Template's Resource ``OS::Cinder::Volume`` + **SHOULD NOT** declare the property ``availability_zone``. If the property is used, the value **MUST** -be enumerated in the environment file and must be set to nova', which +be enumerated in the environment file and must be set to ``nova``, which is the default. There are no requirements on the parameter naming convention with the exception that the naming convention **MUST NOT** be the -same as the 'OS::Nova::Server' property 'availability_zone' (i.e., -'availability_zone_{index}'). +same as the ``OS::Nova::Server`` property ``availability_zone`` (i.e., +``availability_zone_{index}``). Optional Property volume_type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -OpenStack supports multiple volume types. If the OS::Cinder::Volume optional -property volume_type is not specified, the OpenStack default volume type is -used. If a specific volume type is required, the property is used and -the value **MUST** be enumerated in the environment file. There are no -requirements on the parameter naming convention +OpenStack supports multiple volume types. If the ``OS::Cinder::Volume`` +optional property ``volume_type`` is not specified, the OpenStack default +``volume type`` is used. If a specific volume type is required, the property +is used and the value **MUST** be enumerated in the environment file. There +are no requirements on the parameter naming convention. Cinder Volume Examples ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *Examples: Volume Template* -A VNF has a Cinder volume module, named incremental\_volume.yaml, that -creates an independent Cinder volume for a VM in the module -incremental.yaml. The incremental\_volume.yaml defines a parameter in -the output section, lb\_volume\_id\_0 which is the UUID of the cinder -volume. lb\_volume\_id\_0 is defined as a parameter in incremental.yaml. -ONAP captures the UUID value of lb\_volume\_id\_0 from the volume module +A VNF has a Cinder volume module, named incremental_volume.yaml, +that creates an independent Cinder volume for a VM in the module +incremental.yaml. The incremental_volume.yaml defines a parameter in +the output section, dns_volume_id_0 which is the UUID of the cinder volume. +dns_volume_id_0 is defined as a parameter in incremental.yaml. +ONAP captures the UUID value of dns_volume_id_0 from the volume module output statement and provides the value to the incremental module. Note that the example below is not a complete Heat Orchestration -Template. The {vm-type} has been defined as "lb" for load balancer +Template. The {vm-type} has been defined as "dns". -incremental\_volume.yaml +incremental_volume.yaml .. code-block:: yaml - parameters: + parameters: vnf_name: - type: string - lb_volume_size_0: - type: number - ... + type: string + dns_volume_size_0: + type: number + ... - resources: + resources: dns_volume_0: - type: OS::Cinder::Volume - properties: - name: - str_replace: - template: VNF_NAME_volume_0 - params: - VNF_NAME: { get_param: vnf_name } - size: {get_param: dns_volume_size_0} - ... - - outputs: - lb_volume_id_0: - value: {get_resource: dns_volume_0} - ... - + type: OS::Cinder::Volume + properties: + name: + str_replace: + template: VNF_NAME_volume_0 + params: + VNF_NAME: { get_param: vnf_name } + size: {get_param: dns_volume_size_0} + ... + outputs: + dns_volume_id_0: + value: {get_resource: dns_volume_0} + ... incremental.yaml .. code-block:: yaml - parameters: - lb_name_0: - type: string - lb_volume_id_0: - type: string - ... - - resources: - lb_0: - type: OS::Nova::Server - properties: - name: {get_param: dns_name_0} - networks: - ... - - lb_0_volume_attach: - type: OS::Cinder::VolumeAttachment - properties: - instance_uuid: { get_resource: lb_0 } - volume_id: { get_param: lb_volume_id_0 } - - + parameters: + dns_server_0: + type: string + dns_volume_id_0: + type: string + ... + + resources: + dns_server_0: + type: OS::Nova::Server + properties: + name: {get_param: dns_name_0} + networks: + ... + dns_volume_attach_0: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: dns_server_0 } + volume_id: { get_param: dns_volume_id_0 } |