If a request fails but the response contains a "Retry-After",
the cinder client should wait the amount of time and then retry.
Cinder client should report a warning to user and continue with
retry, so that user can cancel the operation if not interested
in retry. The value in "Retry-After" header will be in seconds
or GMT value, client should handle both the cases.
How many times client should retry will be controlled by user
through "--retries" argument to cinder api example,
$ cinder --retries 3 availability-zone-list
If request was not sucessful within the retries, client should
raise the exception.
Change-Id: I99af957bfbbe3a202b148dc2fcafdd20b5d7cda0
Partial-Bug: #1263069
Class base.Resource defines __eq__() built-in function, but does
not define __ne__() built-in function, so self.assertEqual works
but self.assertNotEqual does not work at all in this test case in
python2. This patch fixes it by defining __ne__() built-in function
of class base.Resource. Also fixes spelling errors:resoruces.
Change-Id: I845d531880ad74d928a3e15335ed10e71590826e
Closes-Bug: #1586268
Added new private method to log request-id of each api call
for both SessionClient and HTTPClient. Already available
ks_logger and client_logger will be used for SessionClient
and HTTPClient respectively.
Change-Id: I679c57b96071ecd9bcd1ab2ed50692195586ca52
Implements: blueprint log-request-id
Because of lack of strict boolean checking, the unexpected
'False' value will always be send to server if invalid bool
value is specifed.
For instance:
the parameter 'is-public' of cinder type-update,
the parameter 'force' of cinder qos-delete
as so forth.
This patch tries to add a strict checking for them
to prevent invalid bool value.
Change-Id: I896ddbb6ec4760bfd4d721db960138e2df0b86e1
Closes-Bug: #1596418
Since we are no longer using mox in cinderclient,
delete it in "openstack/common/__init__.py".
Change-Id: Ia06d18aa20f239a2244fb64f6cc1ac3c8d66e24b
closes-Bug: #1595032
The self.name is undefined in the Service class.
And also there is no need any unique information to
identify this object, so we just remove it directly.
Change-Id: I3ce8663f830357855f2155e080393ea97f8f80ba
Partial-Bug: #1585024
The self.name is undefined in the Capabilities class.
And also there is no need any unique information to
identify this object, so we just remove it directly.
Change-Id: I0b821345c0d4c9a4636b9d097b9a66ba59768092
Partial-Bug: #1585024
We have implemented cascade deleting volume in CLI now,
but there's still something that should be improved:
1. A parsing problem of cascade is existing that always
evaluate parameter to True.
So now change the cascade parameter to a flag that don't
accept value anymore.
If user want to delete volume with snapshot, just need to
use 'cinder delete --cascade [volume_id]'.
Change-Id: I92e9400d5d7fbb741607bdbde7ac0c0667fca85d
Closes-Bug: #1585441
Implements: blueprint support-deleting-vols-with-snps-in-cli
assertEqual expects that the arguments provided to it should be
(expected, observed). If a particluar order is kept as a convention,
then it helps to provide a cleaner message to the developer if Unit
Tests fail. The following patch fixes this issue.
TrivialFix
Change-Id: I817a654733e0f3886ca85778a49aa579592f60ff
Closes-Bug: #1259292
The change I9c8db9487b554b637a41620c858a7e7abf802879 introduced a
regression in nova and trove. Importing cinderclient.client now calls
_i18n.enable_lazy() which calls oslo_i18n.enable_lazy(). It's wrong to
modify a global variable (oslo_i18n._lazy.USE_LAZY) when a module is
imported.
This change removes the call to _i18n.enable_lazy() from client.py.
Closes-Bug: #1587071
Related-Bug: 1586976
Change-Id: I1512b86815e7248fa226c6969124ddc654145562
Cinder snapshot force delete is supported from cinder server
side but cinderclient support is not present.
This patchset adds support for cinder snapshot force delete
from cinderclient side.
Closes-Bug:#1418353
Change-Id: I8c4f02f9c3b855d44b1a3c7da7083d87b3b70da9
Implements: Blueprint snapshot-backup-force-delete
The self.name attribute is undefined in the VolumeEncryptionType
class. Instead we should print the self.encryption_id attribute
in the __repr__().
Change-Id: Ic11b45069145bbae078c8175928c5dd869bd8cb8
Partial-Bug: #1585024
Cinder backup force delete is supported from cinder server
side but cinderclient support is not present.
This patchset adds support for cinder backup force delete
from cinderclient side.
Closes-Bug:#1567243
Partially-Implements: blueprint snapshot-backup-force-delete
Change-Id: I4ec38376d57ef6f74fefdd3bd2fea7a10bc51672
Commit Ie639179c5bbbaca4de62b42b368830afcfd8f7ac introduced 'visibility'
and 'protected' params. These params should be used only with
v3.1 microversion. Also these changes break current v2 users.
This patch fixes these issues.
Closes-Bug: #1584056
Change-Id: I0574631791c475bbefdb6e7d1647a20d0759df64
Since 10.0.0 release tempest-ib is deprecated now.
Cinderclient should use tempest.lib in test code
and add tempest>=11.0.0 in requirements following
global-requirements.
Closes-Bug: #1583583
Change-Id: I9d766f46eb6fff29ae9c0267a60ff2ef4bf2343e
The "aligns" attribute no longer exists in the Prettytable,
"align" instead. So we should use "align" attribute to force
the output with left alignment by default.
Change-Id: I97b30216000b6e31c1bef614cf0b0d68ab8cfb08
Closes-Bug: #1583880
The dict.keys()[0] will raise a TypeError in PY3,
as dict.keys() doesn't return a list any more in PY3
but a view of list.
Change-Id: Ia6c0783ca8c8514a06defbeed0fa9ef24bbd9d4a
Closes-Bug: #1583419
In case of failed volume migration, status of the volume is
still in-use and the migration status is set to error.
Current reset-migration-status command resets not only
migration status but also volume status. However the volume
status should not reset because the volume is still attached.
Closes-Bug #1552058
Change-Id: I9a8a5ed6a00bdcffecbf98862fe60aee373f5e9b
Currently we can specify a client certificate key using --os-key option
inherited from keystoneclient cli options but it has no effect because
keystoneclient Session expects as cert argument, one of the followings:
* None (no client certificate),
* a path to client certificate,
* a tuple with client certificate/key paths.
The change updates cinderclient code to support the last case (ie:
os_cert and os_key are non-empty) in order to take into --os-key option
and OS_KEY environment variable.
Closes-Bug: #1564646
Change-Id: I258fd554ad2d6a5413ffe778acefa3a0b83e591f
Call to _construct_http_client uses:
api_version=api_version
but should be:
api_version=self.api_version
Change-Id: If2686461bff1ef9afd318e999c9e517e15b1677f
Closes-Bug: 1580319
Added --visibility and --protected options
when uploading volumes to the image service.
DocImpact
Change-Id: Ie639179c5bbbaca4de62b42b368830afcfd8f7ac
Closes-Bug: #1288131
Depends-On: I6e6b2276af22b7809ea88289427c6873211b3faf
Signed-off-by: Nathaniel Potter <nathaniel.potter@intel.com>