986 Commits

Author SHA1 Message Date
Jenkins
0daa4aa023 Merge "Tests for testing volume-create command" 2016-08-16 01:16:16 +00:00
Jenkins
8f1bfce806 Merge "Add backup-update" 2016-08-16 01:15:58 +00:00
Sergii Turivnyi
a4687688ee Tests for testing volume-create command
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
2016-08-09 09:27:18 -04:00
Jenkins
09d7e92dbc Merge "Change api-version help to indicate server API" 2016-08-09 10:54:36 +00:00
OpenStack Proposal Bot
931f847dc6 Updated from global requirements
Change-Id: I0b41e0ab210da31590ff21280bc5b9f342659302
2016-08-08 18:14:52 +00:00
dineshbhor
a635fd2199 Use 'six' instead of oslo_utils.strutils.six
'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
2016-08-08 09:22:29 +00:00
lisali
0c016c8b96 Add backup-update
Add backup-update command to update name and description
of a backup.

DocImpact

Change-Id: Ie24b2a13f8d1132b65f30e95059479e532fad41a
2016-08-05 09:33:34 +08:00
scottda
af4cfb0f64 Change api-version help to indicate server API
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
2016-08-04 16:52:19 -06:00
Jenkins
4e0476507c Merge "Add cluster related commands" 2016-08-04 19:58:07 +00:00
Jenkins
cb24088fea Merge "Changed backup-restore to accept backup name" 2016-08-03 12:34:54 +00:00
Jenkins
7167efce67 Merge "Replace OpenStack LLC with OpenStack Foundation" 2016-08-02 22:51:26 +00:00
Jenkins
4aa7e60c5f Merge "Add tenant_id parameter to limits." 2016-08-02 14:29:40 +00:00
Jenkins
efc9922776 Merge "print endpoints using new keystoneauth catalog object" 2016-08-01 16:16:51 +00:00
dineshbhor
29028b86b9 Use self.ks_logger instead of ks_logger
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
2016-08-01 11:11:47 +05:30
Steve Martinelli
f66b0d57d1 print endpoints using new keystoneauth catalog object
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
2016-07-30 21:06:16 -07:00
Dimitri Mazmanov
1a973235f0 Add tenant_id parameter to limits.
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
2016-07-29 12:41:44 +02:00
Ellen Leahy
2b0bd49b24 Changed backup-restore to accept backup name
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
2016-07-29 09:54:19 +01:00
Jenkins
3722a2a9d5 Merge "Support name option for volume restore" 2016-07-28 18:37:55 +00:00
Jenkins
762212f7fe Merge "Switch to keystoneauth" 2016-07-26 18:59:30 +00:00
Jenkins
3464a88a70 Merge "Make sure --bypass-url honored if specified" 2016-07-26 17:29:02 +00:00
dineshbhor
1f372ebcc7 Replace OpenStack LLC with OpenStack Foundation
Change-Id: Icf7d5b9f8887e75532ebf5b17835a2b1b22be3c3
Closes-Bug: #1214176
2016-07-26 14:51:33 +05:30
Steve Martinelli
16f83c4a53 Switch to keystoneauth
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
2016-07-23 07:35:40 +10:00
Jenkins
b61ec1e6a7 Merge "Fix string interpolation to delayed to be handled by the logging code" 2016-07-16 03:45:03 +00:00
Jenkins
38e47fec44 Merge "Add Python3.5 classifier and venv" 2016-07-16 03:44:56 +00:00
Jenkins
b3d5d5be38 Merge "Updated from global requirements" 2016-07-16 03:39:25 +00:00
Jenkins
8d0ab7eba9 Merge "Add Negative tests for cinder volume extend command" 2016-07-16 03:39:04 +00:00
Jenkins
b36ff1fc15 Merge "Fix authentication issue" 2016-07-15 20:58:36 +00:00
Jenkins
d96cc9fc08 Merge "OS_TENANT_NAME is not required when we have OS_PROJECT_NAME" 2016-07-15 20:58:19 +00:00
Jenkins
e2f2242d40 Merge "Add Negative tests for cinder volume create command" 2016-07-15 16:39:10 +00:00
Sergii Turivnyi
8835ceb9a1 Add Negative tests for cinder volume extend command
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
2016-07-15 12:08:07 -04:00
Sergii Turivnyi
22400e39f7 Add Negative tests for cinder volume create command
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
2016-07-15 08:38:59 -04:00
Yuriy Nesenenko
01c139181c Fix Unicode error printing extra-specs
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
2016-07-15 13:46:53 +03:00
haobing1
d2f4b63f64 Fix string interpolation to delayed to be handled by the logging code
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
2016-07-15 17:54:30 +08:00
OpenStack Proposal Bot
a6a131df4f Updated from global requirements
Change-Id: I983f38464ff819707a8e3441c3a7a9d8cdc5fef9
2016-07-12 16:41:51 +00:00
zheng yin
8517a3963b Add Python3.5 classifier and venv
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
2016-07-12 07:30:49 +08:00
scottda
09b51a294e Add api-version to get server versions
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
2016-07-11 10:44:12 -06:00
OpenStack Proposal Bot
72304df07a Updated from global requirements
Change-Id: I2df821d29ef8f03337a49759ff8e93464093bacc
2016-07-08 17:33:46 +00:00
Jenkins
7d136caf48 Merge "Fix output error for type-show command" 2016-07-08 04:40:28 +00:00
Jenkins
dd19ccd86d Merge "Fix batch deleting issue in volume_type.unset_keys()" 2016-07-08 02:45:53 +00:00
Huanxuan Ao
724901e374 Fix output error for type-show command
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
2016-07-07 22:37:33 +08:00
liyuanzhen
426055c48e OS_TENANT_NAME is not required when we have OS_PROJECT_NAME
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
2016-07-07 07:01:30 +00:00
Javier Pena
ebe02fb877 Fix _get_rate_limit when resp is None
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
2016-07-06 18:42:30 +02:00
Yuriy Nesenenko
f8eef18297 Cinder client should retry with Retry-After value
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
2016-07-06 11:42:20 +03:00
Rui Chen
bc5ddf1e6a Fix batch deleting issue in volume_type.unset_keys()
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
2016-07-06 15:15:35 +08:00
Jenkins
0a92c9fb19 Merge "base.Resource not define __ne__() built-in function" 2016-07-05 10:47:53 +00:00
yuyafei
ccde9b3ba7 base.Resource not define __ne__() built-in function
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
2016-07-04 07:15:11 +00:00
Abhishek Kekane
679cdd2451 Log request-id for each api call
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
2016-06-28 08:44:23 +00:00
Jenkins
d123164f30 Merge "Add strict Boolean checking" 2016-06-27 17:05:59 +00:00
xiexs
e5e0a7ee49 Add strict Boolean checking
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
2016-06-27 08:41:11 -04:00
SongmingYan
060e87438f Delete mox in cinderclient
Since we are no longer using mox in cinderclient,
delete it in "openstack/common/__init__.py".

Change-Id: Ia06d18aa20f239a2244fb64f6cc1ac3c8d66e24b
closes-Bug: #1595032
2016-06-27 10:46:28 +00:00