The cinder.api.contrib.volume_manage Module

class VolumeManageController(*args, **kwargs)

Bases: cinder.api.openstack.wsgi.Controller

The /os-volume-manage controller for the OpenStack API.

create(req, body)

Instruct Cinder to manage a storage object.

Manages an existing backend storage object (e.g. a Linux logical volume or a SAN disk) by creating the Cinder objects required to manage it, and possibly renaming the backend storage object (driver dependent)

From an API perspective, this operation behaves very much like a volume creation operation, except that properties such as image, snapshot and volume references don’t make sense, because we are taking an existing storage object into Cinder management.

Required HTTP Body:

{
  'volume':
  {
    'host': <Cinder host on which the existing storage resides>,
    'ref':  <Driver-specific reference to existing storage object>,
  }
}

See the appropriate Cinder drivers’ implementations of the manage_volume method to find out the accepted format of ‘ref’.

This API call will return with an error if any of the above elements are missing from the request, or if the ‘host’ element refers to a cinder host that is not registered.

The volume will later enter the error state if it is discovered that ‘ref’ is bad.

Optional elements to ‘volume’ are:

name               A name for the new volume.
description        A description for the new volume.
volume_type        ID or name of a volume type to associate with
                   the new Cinder volume. Does not necessarily
                   guarantee that the managed volume will have the
                   properties described in the volume_type. The
                   driver may choose to fail if it identifies that
                   the specified volume_type is not compatible with
                   the backend storage object.
metadata           Key/value pairs to be associated with the new
                   volume.
availability_zone  The availability zone to associate with the new
                   volume.
bootable           If set to True, marks the volume as bootable.
detail(req)

Returns a detailed list of volumes available to manage.

index(req)

Returns a summary list of volumes available to manage.

wsgi_actions = {}
wsgi_extensions = [('index', None), ('detail', None)]
class Volume_manage(ext_mgr)

Bases: cinder.api.extensions.ExtensionDescriptor

Allows existing backend storage to be ‘managed’ by Cinder.

alias = 'os-volume-manage'
get_resources()
name = 'VolumeManage'
updated = '2014-02-10T00:00:00+00:00'

Previous topic

The cinder.api.contrib.volume_image_metadata Module

Next topic

The cinder.api.contrib.volume_mig_status_attribute Module

This Page