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

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.

Parameters:
  • otype – block type should be provided
  • typename – either volume or consistency-groups should be provided
  • ouri – uri of volume
  • snaplabel – name of the snapshot
  • inactive – if true, the snapshot will not activate the synchronization between source and target volumes
  • sync – synchronous request
  • 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.

Parameters:
  • otype – block
  • resource_uri – uri of the source resource
  • suri – Uri of the Snapshot
  • sync – To perform operation synchronously
  • 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.

Parameters:
  • otype – block
  • otypename – either volume or consistency-group should be provided
  • 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.

Parameters:
  • otype – block
  • suri – uri of the Snapshot.
  • 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
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.