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

class Snapshot(ipaddr, port)

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

BLOCK = 'block'
CG = 'consistency-groups'
URI_BLOCK_SNAPSHOTS = '/block/snapshots/{0}'
URI_BLOCK_SNAPSHOTS_TAG = '/block/snapshots/{0}/tags'
URI_CONSISTENCY_GROUP = '/block/consistency-groups'
URI_CONSISTENCY_GROUPS_SNAPSHOT_DEACTIVATE = '/block/consistency-groups/{0}/protection/snapshots/{1}/deactivate'
URI_CONSISTENCY_GROUPS_SNAPSHOT_INSTANCE = '/block/consistency-groups/{0}/protection/snapshots/{1}'
URI_RESOURCE_DEACTIVATE = '{0}/deactivate'
URI_SEARCH_SNAPSHOT_BY_TAG = '/block/snapshots/search?tag={0}'
URI_SNAPSHOTS = '/{0}/snapshots/{1}'
URI_SNAPSHOT_LIST = '/{0}/{1}/{2}/protection/snapshots'
URI_SNAPSHOT_TASKS_BY_OPID = '/vdc/tasks/{0}'
VOLUMES = 'volumes'
snapshot_create(otype, typename, ouri, snaplabel, inactive, sync, readonly=False, synctimeout=0)

New snapshot is created, for a given volume.

:param otype : block type should be provided :param typename : either volume or consistency-groups should

be provided

:param ouri : uri of volume :param snaplabel : name of the snapshot :param inactive : if true, the snapshot will not activate the

synchronization between source and target volumes

: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
snapshot_delete(storageres_type, storageres_typename, resource_uri, name, sync, synctimeout=0)
snapshot_delete_uri(otype, resource_uri, suri, sync, synctimeout=0)

Delete a snapshot by uri.

:param otype : block :param resource_uri: uri of the source resource :param suri : Uri of the Snapshot :param sync : To perform operation synchronously :param synctimeout : Query for task status for “synctimeout” secs. If

the task doesn’t complete in synctimeout secs, an exception is thrown
snapshot_list_uri(otype, otypename, ouri)

Makes REST API call to list snapshots under a volume.

:param otype : block :param otypename : either volume or consistency-group should be

provided

:param ouri : uri of volume or consistency-group :returns: list of snapshots

snapshot_query(storageres_type, storageres_typename, resuri, snapshot_name)
snapshot_show_uri(otype, resource_uri, suri)

Retrieves snapshot details based on snapshot Name or Label.

:param otype : block :param suri : uri of the Snapshot. :param resource_uri: uri of the source resource :returns: Snapshot details in JSON response payload

storage_resource_query(storageres_type, volume_name, cg_name, project, tenant)
timeout = 300

Previous topic

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

Next topic

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

Project Source

This Page