1177 Commits

Author SHA1 Message Date
Zuul
f69bfcbd7f Merge "fix tox python3 overrides" 2018-07-19 17:26:45 +00:00
huang.zhiping
9b0c6c46f6 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I04b87b308a82113a57ea41bde0329e92b07b642e
2018-07-17 16:21:54 -05:00
TommyLike
2b632c48e3 [Optimize] Update help text for hint argument
Update scheduler_hint's help text to describe
how to specify multiple hints and array value.

Change-Id: If975e06b6e9914848498fa2c3ab27c2f41d7860b
2018-07-17 16:03:02 -05:00
John Griffith
9072700887 Add mode option to attachment-create
We introduce a mode option in attachment-create starting with
microversion 3.54.  The mode option is the new/preferred way of
setting ro mode (as opposed to admin-metadata).

This patch adds the support for the mode option to the client for
endpoints that support 3.54.

Depends-on: https://review.openstack.org/532702/
Change-Id: I22cfddd0192c4a72b8f844f23d1fa51b96c57e06
2018-07-17 15:58:46 -05:00
Zuul
8f933a9a34 Merge "Remove initialization of logger if logger is None" 2018-07-03 19:15:25 +00:00
Neha Alhat
ebb3b675ad Remove initialization of logger if logger is None
If default_log_level=keystoneauth=WARN is enabled in nova.conf,
then these log messages [1][2][3] are logged using cinderclient.v3.client
logger name instead of keystoneauth.session. This is because cinderclient
initializes logger if not passed by nova and since debug=True is set in
nova.conf it’s uses root logger log level.

This patch removes initialization of logger code to ensure log
messages[1][2][3] are logged only when keystoneauth=DEBUG is enabled
in nova.conf. This will also enable us to consume split_logger config
option [4] when enabled in nova without making any additional changes
in client code.

[1] REQ: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@391
[2] RESP: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@422
[3] RESP BODY: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@454
[4] https://review.openstack.org/#/c/568878/

Change-Id: I937c6ac2f6e254c438ee2f36eb6c291f62c0f411
2018-06-26 14:46:30 +05:30
Zuul
d8b25483af Merge "Use api version 3 for functional test" 2018-06-25 02:17:12 +00:00
Sean McGinnis
a4fc1416ef Keep is_public usage backwards compatible
5a1513244caf7acbd41e181419bc8b62bf4bcaba added the ability to
filter by AZ, but it changed the existing behavior if is_public
was not specified. This adds handling to make sure we are still
consistent with the previous behavior.

Co-Authored-by: Alan Bishop <abishop@redhat.com>
Change-Id: I5000aab092c1b434c8dc17bbe4b2d3d632f528c3
Closes-bug: #1778055
2018-06-22 11:24:14 -05:00
wanghao
83864a25e2 unable to create group from src in cinderclient
According the api schema of cinder, create_group_from_src
should only specify one of arguments from [group_snapshot_id, source_group_id].
Now cinderclient specified them both even if one of them is None.

This patch fix this issue to just pass one argument.

Change-Id: Idef51ab9a1452dd5eb3be4d4b6dca095a777d611
Closes-Bug: #1777555
2018-06-20 09:09:54 +08:00
junboli
9aa1c9a485 Use api version 3 for functional test
switch to use OS_VOLUME_API_VERSION = 3 to run
functional tests.

Closes-bug: #1775354
Co-Authored-By: liuyamin <liuyamin@fiberhome.com>
Change-Id: If6c4291aa7d8e85a4f8c1d5665a0e4a72aa1f1d1
2018-06-19 09:01:42 +08:00
Zuul
36275be1c1 Merge "Fix failing functional test cases" 2018-06-18 21:36:19 +00:00
Zuul
6329391131 Merge "Unreadable output of upload-to-image." 2018-06-15 17:36:09 +00:00
Pooja Jadhav
5bd8f71505 Fix failing functional test cases
After applying schema validation to volume actions
APIs[1], error messages are formatted as per the
standards. So the tests are failing because of error
messages.

This patch fixes failed functional tests by correcting
error messages.

[1]https://review.openstack.org/#/c/559042/

Change-Id: Id05bf637d77ab401fc0aec5be09eee423bf1a223
2018-06-13 15:58:46 +05:30
deepak_mourya
a5d5ab5a21 Unreadable output of upload-to-image.
The output of upload-to-image is not readable due to
volume type is printed in output as a whole.
Printing volume type name only cleans up the output.

Change-Id: Ia588cf7ccc0873a8cf956c551afcccf4b6ddaa39
Closes-Bug: #1557486
2018-05-28 10:02:19 +05:30
Zuul
4856c7fc6e Merge "Add the parameter service-id for service cleanup command" 2018-05-28 03:38:58 +00:00
liuyamin
eafde59a3e Add the parameter service-id for service cleanup command
There isn't service_id param in cinderclient. We have this param
in cinder, so add this param in the cinderclient.

Change-Id: I579741595f91802bcf117029889567f234b5b14c
Closes-bug: #1771721
2018-05-25 03:26:58 +00:00
wanghao
7283dedb13 Remove useless args in create_group_from_src
Remove status, project_id
and user_id args from create_group_from_src.

Those args will cause error when using cinderclient since
schema validation in Cinder side.

Change-Id: Iba9a45625f9e6423e8e582425605ca184238cde9
Closes-Bug: #1772375
2018-05-22 09:44:26 +08:00
Zuul
3f6aa2a648 Merge "Support availability-zone in volume type" 2018-05-20 06:05:13 +00:00
TommyLike
5a1513244c Support availability-zone in volume type
Since 3.52, new option '--filters' has been
added to 'type-list' command, and it's only
valid for administrator.

Change-Id: I140f6d61a2747d4fcaabfbccea864dcc7eb841d1
Depends-On: I4e6aa7af707bd063e7edf2b0bf28e3071ad5c67a
Partial-Implements: bp support-az-in-volumetype
2018-05-02 10:25:27 +08:00
Eric Harney
3142e9f9b3 Allow --help for specific commands
This makes calls such as:
     $ cinder list --help

work as expected, equivalent to:
     $ cinder help list

rather than just printing the full help message.

Change-Id: I038eeeea554f0bb5dd170f503eaec570441520b3
2018-04-10 15:37:22 -04:00
Zuul
bd712fa0ca Merge "fix a typo in documentation" 2018-04-02 16:24:49 +00:00
Zuul
cba7305ac3 Merge "Correct errors in snapshot-manageable-list help text" 2018-03-27 08:24:42 +00:00
Zuul
cd87e5d4b4 Merge "Support cross AZ backups" 2018-03-27 08:10:24 +00:00
melissaml
953bd8cb89 fix a typo in documentation
Change-Id: Icb6c9808829c6088f6ae2408718bcb03ddc7b53a
2018-03-23 08:09:10 +08:00
Sean McGinnis
3e78fc4260 Correct errors in snapshot-manageable-list help text
Fixes some copy paste issues with the help text for listing
snapshots. Also minor grammar fixes.

Closes-bug: #1756358
Change-Id: Idee5e8400d8e7d55e9f9232df55b0dfec3e36c3b
2018-03-20 09:33:25 -05:00
jeremy.zhang
0fb448cc6d Add api_version wraps for group snapshot list in v3/shell.py
The API 'do_group_snapshot_list' in v3/shell.py misses api_version wraps,
and the cmd 'cinder group-snapshot-list' can be used even not specifing
the param 'os-volume-api-version'. This patch just to fix it.

Change-Id: I6a46e587b1aab692fe6b81b46fa3d95ab66c0625
2018-03-12 01:26:25 +00:00
Matt Riedemann
98822d1fb4 Remove unused cinderclient/apiclient/client.py module
This old module was a carry over from the oslo incubator days
and is no longer used.

Change-Id: I44982d2581e90b781c78f3d2421cd1dcd8e590fd
Related-Bug: #1685678
Related-Bug: #1640269
2018-02-20 10:16:16 -05:00
Brianna Poulos
5e5f6a2d8a Update help text for encryption provider
The volume encryption provider no longer uses class names.
Instead, 'luks' and 'plain' are used. This patch updates
the help text for the volume encryption provider to use
the new encryption provider format constants.

Change-Id: I6072e18f8c1945082f421a3bf725a874565d6f80
2018-02-16 16:06:19 -05:00
Gorka Eguileor
2c774cc015 Support cross AZ backups
Add support for microversion 3.51 that allows us to specify the
Availability Zone of the backup service that should create the backup.

New optional parameter available for "backup-create" when using
microversion 3.51 is "--availability-zone".

Depends-On: I595932276088d25abd464025c99dce33a2cc502b
Change-Id: Ia4bab5fcb95f6a8d1adb99c5d7dc1b3f7546c6f6
2018-02-12 15:03:20 +01:00
Zuul
c46785561b Merge "Add api_version wraps for some v3 volume APIs" 2018-01-31 07:00:25 +00:00
jeremy.zhang
e2618ebb24 Add api_version wraps for some v3 volume APIs
This patch is mainly to add api_version wraps for some v3 volume APIs.

Change-Id: Iea8b9b68930548156749da3f98629e3602ffca83
2018-01-25 21:56:28 +08:00
jeremy.zhang
18f7dff64d Fix for v3 volume unit tests
This patch is mainly to specify the APIversion for FakeClient used in
different volume resources' unit tests.

Change-Id: I18eb9b57434061e95c909907e6ba263b9091a446
2018-01-25 21:00:08 +08:00
Zuul
1de605cdd3 Merge "Add snapshot_id param note for backup-create" 2018-01-23 22:58:59 +00:00
Zuul
b5e373034d Merge "Bump API microversion to 3.50" 2018-01-23 20:48:33 +00:00
Jay S. Bryant
cf4d215544 Bump API microversion to 3.50
This change is to bump MAX_VERSION to
3.50 in api_version.  This bump is necessary to
keep cinderclient in sync with cinder which moved
to 3.50 with change: f1bfd9790d2a7cac9a3e66417b11dc8e3edd8109

With MV 3.50 we are able to request multiple attachments for
a single volume.

Change-Id: Ic51b890b816112cecaedd68df8d13ec175623c66
2018-01-23 10:36:00 -06:00
Abijitha Nadagouda
c3a22519bc Removes unicode 'u' response for "cinder get-capabilities"
The output of "cinder get-capabilities" command returns
unicoded response. But it would appear from the utils
class that setting formatters will go through the
capabilities dict and make sure all values are properly
string formatted. Therefore added formatters to return
string formatted response.

Added formatters=sorted(prop.keys()) line instead of
static values as suggested by the reviewer, to avoid
tying server knowledge to the client and also any
update on the server side would easily reflect here.

Closes-bug: #1680444
Change-Id: Ie38236db364d59ddab42cb925d0435777b0ffe86
2018-01-23 18:32:11 +05:30
Zuul
0a323eaf94 Merge "Support for reporting backend state in service list" 2018-01-18 02:13:59 +00:00
Zuul
1e5bbca37c Merge "Add api_version wraps for generic volume groups" 2018-01-18 01:38:01 +00:00
Zuul
4b508e85f2 Merge "Migrate to keystoneauth identity cli opts." 2018-01-17 18:06:16 +00:00
Zuul
0a0dc01ea2 Merge "Fix v2 volume unit tests" 2018-01-16 23:15:47 +00:00
Zhao Chao
77143d43dc Migrate to keystoneauth identity cli opts.
Use keystoneauth1 to parse keystone authentication arguments. Previously
these arguments are parsed in the different service clients seperately.
Use keystoneauth1 instead will make this consistent across projects and
less error-prone.

This change is inspired by NovaClient.

Co-Authored-By: Morgan Fainberg <morgan.fainberg@gmail.com>
Co-Authored-By: David Hu <david.hu@hp.com>
Co-Authored-By: Monty Taylor <mordred@inaugust.com>

Closes-Bug: #1734945

Change-Id: I3c5141eeddd3747ff542e95b04e4848470ad9508
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-01-16 20:49:14 +08:00
Zuul
d2cf6e6ddc Merge "Add service cleanup command" 2018-01-16 12:26:57 +00:00
Zuul
24e46d116a Merge "Add cluster support in manage listings" 2018-01-16 07:37:17 +00:00
jeremy.zhang
9c95a3fe7e Add api_version wraps for generic volume groups
This patch is mainly to add api_verion wraps for volume group APIs.

Change-Id: I1f71ef67c482410b9a671226f68160afde98ae5d
2018-01-11 23:21:37 +08:00
zhengyin
62d40cefb5 Add snapshot_id param note for backup-create
Change-Id: Id7c565629aeed6d915b21b8de514afcee42470cf
2018-01-11 10:22:36 +08:00
wanghao
1eb2d6c9f6 Support for reporting backend state in service list
This patch will support the feature: report backend state in service list
in client side.

Depends-On: I561dca3ef7c1901401621bc112389dbd178a907e

Change-Id: If15e1fa50b5feecd74c7394c918f4fc9d87bcf3e
Implements: blueprint report-backend-state-in-service-list
2018-01-09 09:04:00 +08:00
jeremy.zhang
41d6ed0861 Fix v2 volume unit tests
This patch is mainly to fix the wrongly used fake client in v2 volume
unit tests.

Change-Id: If0d0aa7a95b7d58886cc77e8a377ac2f17985f18
2018-01-08 20:51:57 +08:00
jeremy.zhang
97925fe251 Fix 'cluster' paramter using for v3 volume manage
The 'cluster' paramter is wrongly provided for v3 volume manage, as it
should be included in the 'volume' object.

Change-Id: I12440aa6ada9c0e058138e8da7f7bc12359847bb
2018-01-05 21:48:56 +08:00
Sean McGinnis
adb141a262 Deprecate multiattach flag on volume create
This form of multiattach was never fully supported and is now being
replaced by the new mutliattach workflow with Nova. As part of this,
volume type extra specs will be used to indicate multiattach ability
and will allow retyping between volume types to change the flag after
creation.

That work is still in progress and has some potential to change. But
we know we are not going to support this old style, so we should get
that deprecated now so we can remove it and not cause any confusion.

Change-Id: Icbb9c0ca89b25620cedff6cac7a4723e7126eca6
2017-12-21 16:08:55 -06:00
Zuul
7b34445a3c Merge "Fix the way to get backup metadata" 2017-12-20 02:59:53 +00:00