The cinder.volume.drivers.coprhd.helpers.volume Module

class Volume(ipaddr, port)

Bases: cinder.volume.drivers.coprhd.helpers.commoncoprhdapi.CoprHDResource

BLOCK = 'block'
CG = 'consistency-groups'
SNAPSHOTS = 'snapshots'
URI_BULK_DELETE = '/block/volumes/deactivate'
URI_CG_CLONE = '/block/consistency-groups/{0}/protection/full-copies'
URI_CG_CLONE_DETACH = '/block/consistency-groups/{0}/protection/full-copies/{1}/detach'
URI_DEACTIVATE = '/block/volumes/{0}/deactivate'
URI_EXPAND = '/block/volumes/{0}/expand'
URI_SEARCH_VOLUMES = '/block/volumes/search?project={0}'
URI_SEARCH_VOLUMES_BY_TAG = '/block/volumes/search?tag={0}'
URI_SNAPSHOT_PROTECTION_FULLCOPIES = '/block/snapshots/{0}/protection/full-copies'
URI_TAG_VOLUME = '/block/volumes/{0}/tags'
URI_VOLUME = '/block/volumes/{0}'
URI_VOLUMES = '/block/volumes'
URI_VOLUME_CHANGE_VPOOL = '/block/volumes/vpool-change'
URI_VOLUME_CLONE_DETACH = '/block/full-copies/{0}/detach'
URI_VOLUME_EXPORTS = '/block/volumes/{0}/exports'
URI_VOLUME_PROTECTION_FULLCOPIES = '/block/volumes/{0}/protection/full-copies'
VOLUMES = 'volumes'
check_for_sync(result, sync, synctimeout=0)
clone(new_vol_name, resource_uri, sync, synctimeout=0)

Makes REST API call to clone volume.

Parameters:
  • new_vol_name – name of volume
  • resource_uri – uri of source volume

:param sync : synchronous request :param synctimeout : Query for task status for “synctimeout” secs.

If the task doesn’t complete in synctimeout secs, an exception is thrown
Returns:Created task details in JSON response payload
create(project_name, label, size, varray, vpool, sync, consistencygroup, synctimeout=0)

Makes REST API call to create volume under a project.

:param project_name : name of the project under which the volume
will be created

:param label : name of volume :param size : size of volume :param varray : name of varray :param vpool : name of vpool :param sync : synchronous request :param consistencygroup : To create volume under a consistencygroup :param synctimeout : Query for task status for “synctimeout” secs.

If the task doesn’t complete in synctimeout secs, an exception is thrown
Returns:Created task details in JSON response payload
delete(full_project_name, name, sync=False, force_delete=False, coprhdonly=False, synctimeout=0)

Deletes a volume based on volume name.

Parameters:full_project_name – project name

:param name : name of volume to be deleted :param sync : synchronous request :param force_delete: if true, it will force the delete of internal

volumes that have the SUPPORTS_FORCE flag

:param coprhdonly : to delete volumes from coprHD only :param synctimeout: Query for task status for “synctimeout” secs. If

the task doesn’t complete in synctimeout secs, an exception is thrown
delete_by_uri(uri, sync=False, force_delete=False, coprhdonly=False, synctimeout=0)

Deletes a volume based on volume uri.

expand(full_project_name, volume_name, new_size, sync=False, synctimeout=0)
get_exports_by_uri(uri)

Makes REST API call to get exports info of a volume.

Parameters:uri – URI of the volume
Returns:Exports details in JSON response payload
get_storageAttributes(volume_name, cg_name, snapshot_name=None)
is_volume_detachable(full_project_name, name)
list_volumes(project)

Makes REST API call to list volumes under a project.

Parameters:project – name of project
Returns:List of volumes uuids in JSON response payload
search_volumes(project_name)
show(full_project_name, name)

Retrieves volume details based on volume name.

:param full_project_name : project path of the volume :param name: name of the volume. If the volume is under a project,

then full XPath needs to be specified. Example: If VOL1 is a volume under project PROJ1, then the name of volume is PROJ1/VOL1
Returns:Volume details in JSON response payload
show_by_uri(uri)

Makes REST API call and retrieves volume details based on UUID.

Parameters:uri – UUID of volume
Returns:Volume details in JSON response payload
storage_resource_query(storageres_type, volume_name, cg_name, snapshot_name, project, tenant)
update(prefix_path, name, vpool)

Makes REST API call to update a volume information.

Parameters:
  • name – name of the volume to be updated
  • vpool – name of vpool
Returns:

Created task details in JSON response payload

volume_clone_detach(resource_uri, full_project_name, name, sync, synctimeout=0)
volume_query(full_project_name, volume_name)

Makes REST API call to query the volume by name.

Parameters:
  • volume_name – name of volume
  • full_project_name – Full project path
Returns:

Volume details in JSON response payload

Previous topic

The cinder.volume.drivers.coprhd.helpers.virtualpool Module

Next topic

The cinder.volume.drivers.coprhd.iscsi Module

This Page