This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.volume.api Module

Handles all requests relating to volumes.

class nova.volume.api.API(db_driver=None)

Bases: nova.db.base.Base

API for interacting with the volume manager.

check_attach(context, volume_id)
check_detach(context, volume_id)
create(context, size, snapshot_id, name, description, volume_type=None, metadata=None, availability_zone=None)
create_snapshot(context, volume_id, name, description)
create_snapshot_force(context, volume_id, name, description)
delete(context, volume_id)
delete_snapshot(context, snapshot_id)
delete_volume_metadata(context, volume_id, key)

Delete the given metadata item from an volume.

get(context, volume_id)
get_all(context, search_opts={})
get_all_snapshots(context)
get_snapshot(context, snapshot_id)
get_volume_metadata(context, volume_id)

Get all metadata associated with a volume.

get_volume_metadata_value(volume, key)

Get value of particular metadata key.

remove_from_compute(context, volume_id, host)

Remove volume from specified compute host.

update(context, volume_id, fields)
update_volume_metadata(context, volume_id, metadata, delete=False)

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_id)