The cinder.volume.rpcapi Module

class VolumeAPI

Bases: cinder.rpc.RPCAPI

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.
1.19 - Adds update_migrated_volume
1.20 - Adds support for sending objects over RPC in create_snapshot()
       and delete_snapshot()
1.21 - Adds update_consistencygroup.
1.22 - Adds create_consistencygroup_from_src.
1.23 - Adds attachment_id to detach_volume.
1.24 - Removed duplicated parameters: snapshot_id, image_id,
       source_volid, source_replicaid, consistencygroup_id and
       cgsnapshot_id from create_volume. All off them are already
       passed either in request_spec or available in the DB.
1.25 - Add source_cg to create_consistencygroup_from_src.
1.26 - Adds support for sending objects over RPC in
       create_consistencygroup(), create_consistencygroup_from_src(),
       update_consistencygroup() and delete_consistencygroup().
1.27 - Adds support for replication V2
1.28 - Adds manage_existing_snapshot
1.29 - Adds get_capabilities.
1.30 - Adds remove_export
1.31 - Updated: create_consistencygroup_from_src(), create_cgsnapshot()
       and delete_cgsnapshot() to cast method only with necessary
       args. Forwarding CGSnapshot object instead of CGSnapshot_id.
1.32 - Adds support for sending objects over RPC in create_volume().
1.33 - Adds support for sending objects over RPC in delete_volume().
1.34 - Adds support for sending objects over RPC in retype().
1.35 - Adds support for sending objects over RPC in extend_volume().
1.36 - Adds support for sending objects over RPC in migrate_volume(),
       migrate_volume_completion(), and update_migrated_volume().
1.37 - Adds old_reservations parameter to retype to support quota
       checks in the API.
1.38 - Scaling backup service, add get_backup_device() and
       secure_file_operations_enabled()
1.39 - Update replication methods to reflect new backend rep strategy
1.40 - Add cascade option to delete_volume().

... Mitaka supports messaging version 1.40. Any changes to existing
methods in 1.x after that point should be done so that they can handle
the version_cap being set to 1.40.

2.0  - Remove 1.x compatibility
2.1  - Add get_manageable_volumes() and get_manageable_snapshots().
2.2  - Adds support for sending objects over RPC in manage_existing().
2.3  - Adds support for sending objects over RPC in
       initialize_connection().
2.4  - Sends request_spec as object in create_volume().
2.5  - Adds create_group, delete_group, and update_group
2.6  - Adds create_group_snapshot, delete_group_snapshot, and
       create_group_from_src().

... Newton supports messaging version 2.6. Any changes to existing
methods in 2.x after that point should be done so that they can handle
the version_cap being set to 2.6.

3.0  - Drop 2.x compatibility
BINARY = 'cinder-volume'
RPC_API_VERSION = '3.0'
TOPIC = 'cinder-volume'
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, cgsnapshot)
create_consistencygroup(ctxt, group, host)
create_consistencygroup_from_src(ctxt, group, cgsnapshot=None, source_cg=None)
create_group(ctxt, group, host)
create_group_from_src(ctxt, group, group_snapshot=None, source_group=None)
create_group_snapshot(ctxt, group_snapshot)
create_snapshot(ctxt, volume, snapshot)
create_volume(ctxt, volume, host, request_spec, filter_properties, allow_reschedule=True)
delete_cgsnapshot(ctxt, cgsnapshot)
delete_consistencygroup(ctxt, group)
delete_group(ctxt, group)
delete_group_snapshot(ctxt, group_snapshot)
delete_snapshot(ctxt, snapshot, host, unmanage_only=False)
delete_volume(ctxt, volume, unmanage_only=False, cascade=False)
detach_volume(ctxt, volume, attachment_id)
extend_volume(ctxt, volume, new_size, reservations)
failover_host(ctxt, host, secondary_backend_id=None)

Failover host to the specified backend_id (secondary).

freeze_host(ctxt, host)

Set backend host to frozen.

get_backup_device(ctxt, backup, volume)
get_capabilities(ctxt, host, discover)
get_manageable_snapshots(ctxt, host, marker, limit, offset, sort_keys, sort_dirs)
get_manageable_volumes(ctxt, host, marker, limit, offset, sort_keys, sort_dirs)
initialize_connection(ctxt, volume, connector)
manage_existing(ctxt, volume, ref)
manage_existing_snapshot(ctxt, snapshot, ref, host)
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)
remove_export(ctxt, volume)
retype(ctxt, volume, new_type_id, dest_host, migration_policy='never', reservations=None, old_reservations=None)
secure_file_operations_enabled(ctxt, volume)
terminate_connection(ctxt, volume, connector, force=False)
thaw_host(ctxt, host)

Clear the frozen setting on a backend host.

update_consistencygroup(ctxt, group, add_volumes=None, remove_volumes=None)
update_group(ctxt, group, add_volumes=None, remove_volumes=None)
update_migrated_volume(ctxt, volume, new_volume, original_volume_status)

Previous topic

The cinder.volume.qos_specs Module

Next topic

The cinder.volume.targets.cxt Module

Project Source

This Page