Positive tests for the cinder CLI commands which check actions with
volume create command like create volume from snapshot,
create volume from volume.
Change-Id: I77912d413ac061eb8376233dfef772c55265d135
'six' is an independent third party module so it doesn't
need to be imported and used from oslo_utils.strutils.
TrivialFix
Change-Id: Icb3232bb1ebae0e8332e66c5806474d7f9dfd6df
The help for the 'api-version' command should state that
it is displaying the api-version info for the server, not the
client:
Display the server API version information.
Change-Id: Ia4380871ddca1b7ff41a5e6c8cf86488626e69fc
Currently with '--debug' option any cinder command only logs the
request from keystoneauth and not the main cinder service request.
Added keystoneauth logger to self.ks_logger so that logs can be
logged as expected.
Closes-Bug: #1606814
Change-Id: I7193aa6f43cb3186c49fc409b6e1ce7a36f596f9
cinderclient was assuming an identity v2 styled service catalog
would always be returned (when using `cinder endpoints`).
keystoneclient would return either a v2 or v3 styled catalog,
whereas keystoneauth abstracts out the differences and handles
them internally. the result is that there is no need to look
for specific ['serviceCatalog'] or ['catalog'] keys in the
dictionary returned from keystoneauth.
it should be noted that perhaps cinderclient should deprecate
the ability to list endpoints since that is mostly an identity
and admin level operation, and likely an artifact from early
openstack days, it should now be handled by openstackclient.
further, it's not clear whether the command is meant to list all
endpoints or just the endpoints in the user's token (which it does
now).
Change-Id: Ibfcccedee5baf43f5b5c517d37e3f046c8743078
Closes-Bug: 1608166
Cinder API allows specifying tenant_id to get tenant
specific resource usage. This was missing in the client.
This fix should allow fetching tenant specific resource usage
directly from the client. Added tenant argument to the limits CLI.
Closes-Bug: #1580562
Change-Id: I3fbd6341f6d018a79e7c343107ac974b6fbb9239
Edited do_backup_restore function to accept the name of the backup
as well as its id. Changed the test to comply with this.
DocImpact
Closes-Bug: #1604892
Change-Id: Iaec69dd053a119366fa5a8437701a6f7c3da2235
move cinderclient to keystoneauth as keystoneclient's auth session,
plugins and adapter code has been deprecated.
Co-Authored-By: Paulo Ewerton <pauloewerton@lsd.ufcg.edu.br>
Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Jamie Lennox <jamielennox@gmail.com>
Change-Id: Id4bf0e2088e8ad99e83cd4f9b8549c2aca1f65a2
Negative tests for the cinder CLI commands which check actions with
volume extend command like extend volume without arguments or with
incorrect arguments and check that correct error message raised.
Change-Id: Ic7c846fa2d8e7c867ed575d922b4a7e935120705
Negative tests for the cinder CLI commands which check actions with
volume create command like create volume without arguments or with
incorrect arguments and check that correct error message raised.
Partial-Bug: #1602592
Change-Id: Ic51842aeb50758171751ecb9bf162add187f963e
If type-key is set to unicode the command cinder extra-specs-list
fails with the ERROR: 'ascii' codec can't encode characters in position.
This patch fixes it.
Change-Id: Id82bfbe8870351605f53c7ca029b9aa7e6089f6a
Closes-Bug: #1568937
String interpolation should be delayed to be handled by the logging
code, rather than being done at the point of the logging call.
See the oslo i18n guideline.
* http://docs.openstack.org/developer/oslo.i18n/guidelines.html
Change-Id: I3fa26c1c5c672d5505fa556e03af35318f4774ab
Closes-Bug: #1596829
Now that there is a passing gate job, we can claim support for Python 3.5
in the classifier. This patch also adds the convenience py35 venv.
Change-Id: I29cab82225675fbb4e2f1701067b26e4a632b851
Mitaka Cinder added an API to return Versions from the base
endpoint URL:
http://<url>:8776/
This patch exposes that API for /v3 endpoint microversions 3.0 and
above with the command:
cinder api-version
Implements: blueprint add-get-server-versions
Change-Id: Ieb1a56b28188ec17946fe5564b28c165833ffc24
Before this patch, the output of "extra_specs"
in type-show command is this:
| extra_specs | {u'Alpha': u'a'} |
Becuase the type of "extra_specs" is not a string
and need to use unicode_key_value_to_string()
method to change it to string.
This patch add formatters and call
unicode_key_value_to_string() mothod for
"extra_specs" and change the output to this:
| extra_specs | {'Alpha': 'a'} |
Change-Id: Ia2e2633068ce5b5e6622474b145a1d4f074fd551
Closes-Bug: #1589461
Cinder support both v2 and v3 auth. Use v3 if possible.
In consideration of backwards compatibility, when we have
OS_PROJECT_NAME, the v2 auth should be ok because
tenant_name can be set by env[OS_PROJECT_NAME].
Change-Id: I9eed9c41a9deb5ecafa8d9e12f6d1b50d34f986d
Closes-Bug: #1588261
https://review.openstack.org/332848 added retry logic for the client.
Function _get_rate_limit may receive resp=None (seen in the Sahara
unit tests), and in that case we get an exception.
Change-Id: Ibfbb10087121bae7d6f4abdd4cdb8d04d039c970
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
cinderclient volume_type.unset_keys() only delete the first key even if
multiple keys are applied. The response of manager._delete() is tuple object,
it is not "None" if the deleting success, so the batch operation would
be broken when the first key is deleted successfully. The patch fix this
issue.
Change-Id: I60378a32cdc52aacdf869d69b246dec7eb6cdb77
Closes-Bug: #1596511
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