Handles all requests relating to volumes.
-
class API(db_driver=None)
Bases: nova.db.base.Base
API for interacting with the volume manager.
-
attach(context, target_obj, *args, **kwargs)
-
check_attach(context, target_obj, *args, **kwargs)
-
check_detach(context, target_obj, *args, **kwargs)
-
create(context, size, name, description, snapshot=None, volume_type=None, metadata=None, availability_zone=None)
-
create_snapshot(context, volume, name, description)
-
create_snapshot_force(context, volume, name, description)
-
delete(context, target_obj, *args, **kwargs)
-
delete_snapshot(context, target_obj, *args, **kwargs)
-
delete_volume_metadata(context, target_obj, *args, **kwargs)
Delete the given metadata item from an volume.
-
detach(context, target_obj, *args, **kwargs)
-
get(context, volume_id)
-
get_all(context, search_opts={})
-
get_all_snapshots(context)
-
get_snapshot(context, snapshot_id)
-
get_volume_metadata(context, target_obj, *args, **kwargs)
Get all metadata associated with a volume.
-
get_volume_metadata_value(volume, key)
Get value of particular metadata key.
-
initialize_connection(context, target_obj, *args, **kwargs)
-
remove_from_compute(context, volume, instance_id, host)
Remove volume from specified compute host.
-
reserve_volume(context, target_obj, *args, **kwargs)
-
terminate_connection(context, target_obj, *args, **kwargs)
-
unreserve_volume(context, target_obj, *args, **kwargs)
-
update(context, target_obj, *args, **kwargs)
-
update_volume_metadata(context, target_obj, *args, **kwargs)
Updates or creates volume metadata.
If delete is True, metadata items that are not specified in the
metadata argument will be deleted.
-
wait_creation(context, volume)
-
check_policy(context, action, target_obj=None)
-
wrap_check_policy(func)
Check policy corresponding to the wrapped methods prior to execution
This decorator requires the first 3 args of the wrapped function
to be (self, context, volume)