19 Commits

Author SHA1 Message Date
scottda
27e6f6f7f8 Add /v3 endpoint support for cinderclient
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
2016-04-18 10:49:51 -06:00
Jenkins
33a6589106 Merge "Add request_ids attribute to resource objects" 2016-02-23 22:04:29 +00:00
Ankit Agrawal
2b25183c97 Fix return type in backup docstring
Fixed return type for export_record and import_record
in volume backups.

TrivialFix

Change-Id: I58aea0996961eab33e5cfa7d57b59cda9859e82e
2016-02-17 01:23:51 -08:00
Ankit Agrawal
c49fce3909 Add request_ids attribute to resource objects
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
2016-02-16 00:34:58 -08:00
Xing Yang
8fbbf7be94 CLI for backup snapshots
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
2015-11-20 13:47:46 -05:00
Nate Potter
8690e41c22 Adding backup-reset-state to CLI
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
2015-10-20 19:17:55 +00:00
Jenkins
92f3d35d5b Merge "Adding pagination to snapshots and backups lists" 2015-10-10 13:09:54 +00:00
Sergey Gotliv
e707c7aa9f Adding pagination to snapshots and backups lists
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
2015-10-05 10:38:37 +03:00
chenying
62aa713a1b Fix three resources not being deleted by using name
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
2015-09-28 02:36:04 +00:00
Xing Yang
2c3169e55e CLI: Non-disruptive backup
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
2015-08-11 10:18:01 -04:00
Yuriy Nesenenko
8cc3ee2782 Add support '--all-tenants' for cinder backup-list
Also added support '--name', '--status', '--volume-id' arguments
for cinder backup-list.

DocImpact
Closes-Bug: #1422046
Depends On: I73f6377c7d6fd92d0464d13f9c8dd6682fef78e3
Change-Id: I5f2ab6370a8333a9ee498c6158037b0433f36a23
2015-08-19 18:05:34 +03:00
Jenkins
f860668d71 Merge "Fix outdated URLs and some minor fixes" 2015-07-08 01:48:36 +00:00
Anton Arefiev
c5c2d67b7f Find resource refactoring
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
2015-05-12 14:52:46 +03:00
Xing Yang
3ee941c1e6 Add support to incremental backups in cinder
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
2015-04-21 10:34:35 -04:00
Kallebe Monteiro
020f011ab9 Fix outdated URLs and some minor fixes
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
2015-03-02 16:14:44 -03:00
seungjin
029a776455 Fix 'search_opts' error with backup delete command
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
2014-11-25 01:28:54 +00:00
Diane Fleming
0d2bf657ae Update help strings for cinder client
Make text consistent and clear.
Add periods to end of sentences.
Adjust test suite for change

Closes-Bug: #1275881

Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
2014-04-23 09:06:21 -05:00
Ronen Kat
c48e41b8b7 Client support for export and import backup service metadata
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
2014-03-04 17:18:40 +02:00
Stephen Mulcahy
cc8dd55264 Add support for volume backups
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
2013-04-26 14:05:58 +00:00