Add support for Cinder API /v3 endpoint.
A couple of unit tests for /v3 endpoint were added to v3/test_shell.py
to ensure that the v3 shell works, and to also test that modules work
with:
from cinderclient.v2.availability_zones import *
syntax.
Change-Id: I6ae0ada221bebb4ab1850d9c99b10fcbb585201f
Implements: https://blueprints.launchpad.net/python-cinderclient/+spec/add-v3-endpoint-support
Added request_ids attribute to resource object for all the
volume_backups, volume_encryption_types and volume_transfers
APIs by updating following APIs:
volume_backups: reset_state, delete, export_record, import_record
volume_transfers: delete
volume_encryption_types: list
Returning list with request_ids as attribute in case of 'list' API
for volume_encryption_types.
These changes are required to return 'request_id' from client to log
request_id mappings of cross projects.
For more details on how request_id will be returned to the caller,
please refer to the approved blueprint [1] discussed with the
cross-project team.
[1] http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html
DocImpact
'request-ids' will be returned as an attribute with response object.
User can access it using 'res.request_ids' where 'res' is a
response object.
Change-Id: I2197ca38f6c9a8b0ced5c82d29676b49c9700b09
Partial-Implements: blueprint return-request-id-to-caller
This adds CLI support for backup snapshots.
Server side change is here:
https://review.openstack.org/#/c/243406/
Depends-on: Ib4ab9ca9dc72b30151154f3f96037f9ce3c9c540
Change-Id: I5b58d872c9b4842fae5f2e7a4ddfc6662a6c8d7a
Implements: blueprint backup-snapshots
This patch adds the ability to reset the state of
a backup with the command backup-reset-state.
DocImpact
Change-Id: I5851bb21c62252f61ad6a09f01859582e774a9db
Closes-Bug: #1279764
Snapshot and backups pagination was recently implemented in the Cinder
backend. This patch is implementing a pagination for the snapshots and
backups on the client side in the same way that volume pagination works
using limit, marker and sort parameters.
Partial-Implements: blueprint extend-limit-implementations
Change-Id: Ie3660854407a947f7470b4dc0911704c0a31c1b4
There are three resources: VolumeBackup, Snapshot, VolumeTransfer.
None of them can be deleted by using their names on V2.
For example, Snapshot client side filtering fails in the function
findall. The reason is that snapshot object
<class 'cinderclient.v2.volume_snapshots.Snapshot'> does not have
a attribute 'display_name'.
The response of /v2/{tenant_id}/backups/detail does not have
a parameter 'display_name', but have a parameter 'name'.
So class Snapshot does not need to define NAME_ATTR = 'display_name'.
The superclass of Snapshot 'Resource' has defined NAME_ATTR = 'name'.
Closes-Bug: #1497873
Closes-Bug: #1495428
Change-Id: I3c89fd9a82918e8a02385cfccb32dc9c3f4c4095
This is the CLI change required to support non-disruptive backup
for volumes in 'in-use' status. A force flag is added to the create
backup CLI. The force flag needs to be True when backing up an
'in-use' volume. By default it is False and it is not needed when
backing up an 'available' volume.
The Cinder server side change is merged:
https://review.openstack.org/#/c/193937/
Partial-implements blueprint non-disruptive-backup
Change-Id: I53aff3973cc6365a5b1d40c21b0885c1d8166df5
Also added support '--name', '--status', '--volume-id' arguments
for cinder backup-list.
DocImpact
Closes-Bug: #1422046
Depends On: I73f6377c7d6fd92d0464d13f9c8dd6682fef78e3
Change-Id: I5f2ab6370a8333a9ee498c6158037b0433f36a23
The 'name' field for some resources is called something different,
for example 'display_name' for volumes, 'name' for volumes type.
So class 'resource' has attribute 'NAME_ATTR' wich contains
attribute name for different resources.
This change removes reduntant call find in resource manager, instead
of it checks NAME_ATTR value.
Related-Bug: #1449444
Change-Id: Ide334d7535c73cbdff72c30319eb539d8f5304d6
Added a new option to "cinder backup-create" to support incremental backups.
Specify --incremental to create an incremental backup. By default, it will
be a full backup.
Co-Authored-By: Xing Yang <xing.yang@emc.com>
Implements: blueprint incremental-backup
Change-Id: Id11ecd2982ea838181b4adaa5a742fc65f864acb
A minor commit.
Credit to Jeremy Stanley for findind out this in other projects.
The developer documentation changed. It is now at infra manual, so now
the CONTRIBUTING.md was updated accordingly.
Fixed some other things, like a line break which was not needed
(80 char limit), the help text, and updated URL for jacobian
Change-Id: I3b7cce90f72349a986a5b055fa59e53c089ba308
The following error message is yield when we try to
backup volume which is not present.
ERROR: list() got an unexpected keyword argument 'search_opts'
This is from findall() method in the
cinderclient.base.ManagerWithFind class.
When cinderclient get a specific resource, it use the findall() method.
The error will yields which list() in
VolumeEncryptionTypeManager did not have.
Change-Id: Iffe568c6d2de41b8e24658f3a54f2861e2f7db31
Closes-Bug: #1282324
Related-Bug: #1248519
Make text consistent and clear.
Add periods to end of sentences.
Adjust test suite for change
Closes-Bug: #1275881
Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
Add client code to a new admin API for backup-export and
backup-import allowing an admin to copy the backup metadata
details.
client code for https://review.openstack.org/#/c/69351/
blueprint cinder-backup-recover-api
DocImpact new admin API calls backup-import and backup-export
Change-Id: Id306fc9cf562a87bb6a36eae692852eefc592b74
Implements support for the volume backup api added to cinder in
https://review.openstack.org/19468. This is a resubmit of the
expired change https://review.openstack.org/25299 with the
following changes:
* Added unit tests for backups (v1 and v2)
* Changed references in backup code to display_name and
display_description to name and description respectively
* Removed links from backup-show output
* Added object_count to _translate_backup_keys
* Removed unneccesary items from _translate_backup_keys
* Fixed backups docstrings including removing references to swift.
Adds backup-create, backup-delete, backup-list, backup-restore
and backup-show to both the v1 and v2 clients, since the volume
backup extension is available via both APIs.
Change-Id: I197384f1c2fd2af641d207a5f4dba0dfbc5c681a