novaclient.v2.volumes
Module¶Volume interface
novaclient.v2.volumes.
Volume
(manager, info, loaded=False, resp=None)¶Bases: novaclient.base.Resource
A volume is an extra block level storage to the OpenStack instances.
Populate and bind to a manager.
Parameters: |
|
---|
NAME_ATTR
= 'display_name'¶novaclient.v2.volumes.
VolumeManager
(api)¶Bases: novaclient.base.Manager
Manage Volume
resources. This is really about volume attachments.
create_server_volume
(obj, *args, **kwargs)¶Attach a volume identified by the volume ID to the given server ID
Parameters: |
|
---|---|
Return type: |
delete_server_volume
(server_id, volume_id=None, attachment_id=None)¶Detach a volume identified by the volume ID from the given server
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
get_server_volume
(server_id, volume_id=None, attachment_id=None)¶Get the volume identified by the volume ID, that is attached to the given server ID
Parameters: |
|
---|---|
Return type: |
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 |
update_server_volume
(server_id, src_volid, dest_volid)¶Swaps the existing volume attachment to point to a new volume.
Takes a server, a source (attached) volume and a destination volume and performs a hypervisor assisted data migration from src to dest volume, detaches the original (source) volume and attaches the new destination volume. Note that not all backing hypervisor drivers support this operation and it may be disabled via policy.
Parameters: |
|
---|---|
Return type: |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.