For details on how to use block_storage, see Using OpenStack Block Storage
The block_storage high-level interface is available through the
block_storage
member of a Connection
object.
The block_storage
member will only be added if the service is detected.
openstack.block_storage.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)get_volume
(volume)Get a single volume
Parameters: | volume – The value can be the ID of a volume or a
Volume instance. |
---|---|
Returns: | One Volume |
Raises: | ResourceNotFound
when no resource can be found. |
volumes
(details=True, **query)Retrieve a generator of volumes
Parameters: |
|
---|---|
Returns: | A generator of volume objects. |
create_volume
(**attrs)Create a new volume from attributes
Parameters: | attrs (dict) – Keyword arguments which will be used to create
a Volume ,
comprised of the properties on the Volume class. |
---|---|
Returns: | The results of volume creation |
Return type: | Volume |
delete_volume
(volume, ignore_missing=True)Delete a volume
Parameters: |
|
---|---|
Returns: |
|
openstack.block_storage.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)backups
(details=True, **query)Retrieve a generator of backups
Parameters: |
|
---|---|
Returns: | A generator of backup objects. |
get_backup
(backup)Get a backup
Parameters: | backup – The value can be the ID of a backup
or a Backup
instance. |
---|---|
Returns: | Backup instance |
Return type: | Backup |
create_backup
(**attrs)Create a new Backup from attributes with native API
Parameters: | attrs (dict) – Keyword arguments which will be used to create
a Backup
comprised of the properties on the Backup class. |
---|---|
Returns: | The results of Backup creation |
Return type: | Backup |
delete_backup
(backup, ignore_missing=True)Delete a CloudBackup
Parameters: |
|
---|---|
Returns: |
|
restore_backup
(backup, volume_id, name)Restore a Backup to volume
Parameters: |
|
---|---|
Returns: | Updated backup instance |
Return type: |
openstack.block_storage.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)get_type
(type)Get a single type
Parameters: | type – The value can be the ID of a type or a
Type instance. |
---|---|
Returns: | One Type |
Raises: | ResourceNotFound
when no resource can be found. |
types
(**query)Retrieve a generator of volume types
Returns: | A generator of volume type objects. |
---|
create_type
(**attrs)Create a new type from attributes
Parameters: | attrs (dict) – Keyword arguments which will be used to create
a Type ,
comprised of the properties on the Type class. |
---|---|
Returns: | The results of type creation |
Return type: | Type |
delete_type
(type, ignore_missing=True)Delete a type
Parameters: |
|
---|---|
Returns: |
|
openstack.block_storage.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)get_snapshot
(snapshot)Get a single snapshot
Parameters: | snapshot – The value can be the ID of a snapshot or a
Snapshot
instance. |
---|---|
Returns: | One Snapshot |
Raises: | ResourceNotFound
when no resource can be found. |
snapshots
(details=True, **query)Retrieve a generator of snapshots
Parameters: |
|
---|---|
Returns: | A generator of snapshot objects. |
create_snapshot
(**attrs)Create a new snapshot from attributes
Parameters: | attrs (dict) – Keyword arguments which will be used to create
a Snapshot ,
comprised of the properties on the Snapshot class. |
---|---|
Returns: | The results of snapshot creation |
Return type: | Snapshot |
delete_snapshot
(snapshot, ignore_missing=True)Delete a snapshot
Parameters: |
|
---|---|
Returns: |
|
openstack.block_storage.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)backend_pools
()Returns a generator of cinder Back-end storage pools
:returns A generator of cinder Back-end storage pools objects
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.