VolumesΒΆ

Volume interface (1.1 extension).

class novaclient.v2.volumes.Volume(manager, info, loaded=False, resp=None)

Bases: novaclient.base.Resource

DEPRECATED: A volume is an extra block level storage to the OpenStack instances.

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
  • resp – Response or list of Response objects
NAME_ATTR = 'display_name'
delete()

DEPRECATED: Delete this volume.

Returns:An instance of novaclient.base.TupleWithMeta
class novaclient.v2.volumes.VolumeManager(api)

Bases: novaclient.base.ManagerWithFind

DEPRECATED: Manage Volume resources.

create(size, snapshot_id=None, display_name=None, display_description=None, volume_type=None, availability_zone=None, imageRef=None)

DEPRECATED: Create a volume.

Parameters:
  • size – Size of volume in GB
  • snapshot_id – ID of the snapshot
  • display_name – Name of the volume
  • display_description – Description of the volume
  • volume_type – Type of volume
  • availability_zone – Availability Zone for volume
  • imageRef – reference to an image stored in glance
Return type:

Volume

create_server_volume(server_id, volume_id, device=None)

Attach a volume identified by the volume ID to the given server ID

Parameters:
  • server_id – The ID of the server
  • volume_id – The ID of the volume to attach.
  • device – The device name (optional)
Return type:

Volume

delete(volume)

DEPRECATED: Delete a volume.

Parameters:volume – The Volume to delete.
Returns:An instance of novaclient.base.TupleWithMeta
delete_server_volume(server_id, attachment_id)

Detach a volume identified by the attachment ID from the given server

Parameters:
  • server_id – The ID of the server
  • attachment_id – The ID of the attachment
Returns:

An instance of novaclient.base.TupleWithMeta

get(volume_id)

DEPRECATED: Get a volume.

Parameters:volume_id – The ID of the volume to get.
Return type:Volume
get_server_volume(server_id, attachment_id)

Get the volume identified by the attachment ID, that is attached to the given server ID

Parameters:
  • server_id – The ID of the server
  • attachment_id – The ID of the attachment
Return type:

Volume

get_server_volumes(server_id)

Get a list of all the attached volumes for the given server ID

Parameters:server_id – The ID of the server
Return type:list of Volume
list(detailed=True, search_opts=None)

DEPRECATED: Get a list of all volumes.

Return type:list of Volume
resource_class

alias of Volume

update_server_volume(server_id, attachment_id, new_volume_id)

Update the volume identified by the attachment ID, that is attached to the given server ID

Parameters:
  • server_id – The ID of the server
  • attachment_id – The ID of the attachment
  • new_volume_id – The ID of the new volume to attach
Return type:

Volume

Previous topic

Volume_snapshots

Next topic

Volume_types

Project Source

This Page