Client side of the volume RPC API.
-
class VolumeAPI(topic=None)
Bases: object
Client side of the volume rpc API.
API version history:
1.0 - Initial version.
1.1 - Adds clone volume option to create_volume.
1.2 - Add publish_service_capabilities() method.
1.3 - Pass all image metadata (not just ID) in copy_volume_to_image.
1.4 - Add request_spec, filter_properties and
allow_reschedule arguments to create_volume().
1.5 - Add accept_transfer.
1.6 - Add extend_volume.
1.7 - Adds host_name parameter to attach_volume()
to allow attaching to host rather than instance.
1.8 - Add migrate_volume, rename_volume.
1.9 - Add new_user and new_project to accept_transfer.
1.10 - Add migrate_volume_completion, remove rename_volume.
1.11 - Adds mode parameter to attach_volume()
to support volume read-only attaching.
1.12 - Adds retype.
1.13 - Adds create_export.
1.14 - Adds reservation parameter to extend_volume().
1.15 - Adds manage_existing and unmanage_only flag to delete_volume.
1.16 - Removes create_export.
1.17 - Add replica option to create_volume, promote_replica and
sync_replica.
- 1.18 - Adds create_consistencygroup, delete_consistencygroup,
- create_cgsnapshot, and delete_cgsnapshot. Also adds
the consistencygroup_id parameter in create_volume.
-
BASE_RPC_API_VERSION = '1.0'
-
accept_transfer(ctxt, volume, new_user, new_project)
-
attach_volume(ctxt, volume, instance_uuid, host_name, mountpoint, mode)
-
copy_volume_to_image(ctxt, volume, image_meta)
-
create_cgsnapshot(ctxt, group, cgsnapshot)
-
create_consistencygroup(ctxt, group, host)
-
create_snapshot(ctxt, volume, snapshot)
-
create_volume(ctxt, volume, host, request_spec, filter_properties, allow_reschedule=True, snapshot_id=None, image_id=None, source_replicaid=None, source_volid=None, consistencygroup_id=None)
-
delete_cgsnapshot(ctxt, cgsnapshot, host)
-
delete_consistencygroup(ctxt, group)
-
delete_snapshot(ctxt, snapshot, host)
-
delete_volume(ctxt, volume, unmanage_only=False)
-
detach_volume(ctxt, volume)
-
extend_volume(ctxt, volume, new_size, reservations)
-
initialize_connection(ctxt, volume, connector)
-
manage_existing(ctxt, volume, ref)
-
migrate_volume(ctxt, volume, dest_host, force_host_copy)
-
migrate_volume_completion(ctxt, volume, new_volume, error)
-
promote_replica(ctxt, volume)
-
publish_service_capabilities(ctxt)
-
reenable_replication(ctxt, volume)
-
retype(ctxt, volume, new_type_id, dest_host, migration_policy='never', reservations=None)
-
terminate_connection(ctxt, volume, connector, force=False)