1666 Commits

Author SHA1 Message Date
Zuul
ef95b503f2 Merge "Fix functional error check for invalid volume create size" 2018-10-02 16:28:31 +00:00
Zuul
63b36a901b Merge "Fix endpoint identification for api-version query" 2018-10-02 16:16:14 +00:00
Zuul
59b2dd1124 Merge "Default help output to include MV updates" 2018-10-02 15:51:52 +00:00
Zuul
62dcf6aa18 Merge "Update reno for stable/rocky" 2018-10-01 17:15:50 +00:00
Zuul
3dbf4728ea Merge "[Optimize] Update help text for hint argument" 2018-10-01 17:15:49 +00:00
Sean McGinnis
fefe331f21
Default help output to include MV updates
We are inconsistent with some other projects with hiding client help
output for commands added with microversions by default. This often
leads to confusion with users of the CLI not being aware of these
changes.

This changes the default to display all help output. Users can still
specify a version and have the output limited to include only options up
to the version they specify.

Change-Id: I39d90a1ecc824fcf445e98609de47d45e71a0ff6
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-09-20 11:42:41 -05:00
whoami-rajat
525a855643 [Trivial] Add backup-id to 'size' param info
Specifying size is not required while providing --backup-id.
Also When we don't provide the size the output turns out to be
error: Size is a required parameter if snapshot or source
volume or backup is not specified.
which should be modified in 'size' info too.

Change-Id: Ia250df37db9170757d5f834d516781e04582f08b
2018-09-19 11:30:22 +00:00
Goutham Pacha Ravi
223d754f61 Fix encoding of query parameters
IETF RFC 3986 classifies "~" as a reserved character [1],
however until python3.7 [2], python's url parsing
used to encode this character.

urllib has seen a lot of churn in various python
releases, and hence we were using a six wrapper
to shield ourselves, however, this backwards-incompatible
change in encoding norms forces us to deal with
the problem at our end.

Cinder's API accepts "~" in both, its encoded
or un-encoded forms. So, let's stop encoding it
within cinderclient, regardless of the version
of python running it.

Also fix an inconsitency around the use of the
generic helper method in utils added in
I3a3ae90cc6011d1aa0cc39db4329d9bc08801904
(cinderclient/utils.py - build_query_param)
to allow for False as a value in the query.

[1] https://tools.ietf.org/html/rfc3986.html
[2] https://docs.python.org/3/library/urllib.parse.html#url-quoting

Change-Id: I89809694ac3e4081ce83fd4f788f9355d6772f59
Closes-Bug: #1784728
2018-09-13 18:51:17 -06:00
Zuul
64b2d5d83b Merge "Use templates for cover and lower-constraints" 2018-09-12 08:28:08 +00:00
Zuul
564f60fca6 Merge "add lib-forward-testing-python3 test job" 2018-09-11 19:36:28 +00:00
Zuul
edc49c52c2 Merge "add python 3.6 unit test job" 2018-09-11 19:29:47 +00:00
Zuul
33730c8df4 Merge "switch documentation job to new PTI" 2018-09-11 19:29:45 +00:00
Sean McGinnis
6b2bc49492 Fix functional error check for invalid volume create size
With the api-schema enforcement on the Cinder API side, the error
message returned when specifying a volume creation of 0 has changed.
This results in our functional tests failing.

Change-Id: I1a9a13f683134faa01ad50f7f073db8b1845a901
2018-09-11 18:04:14 +00:00
Zuul
9c941aabc1 Merge "import zuul job settings from project-config" 2018-09-11 18:00:10 +00:00
Andreas Jaeger
24b13a2024 Use templates for cover and lower-constraints
Use openstack-tox-cover template, this runs the cover job
in the check queue only.

Use openstack-lower-constraints-jobs template.

Remove jobs that are part of the templates.

Sort list of templates alphabetically.

Change-Id: I4175d4b66a488f2b332f5e540dd433837f9ad440
2018-09-09 19:44:44 +02:00
Zuul
b6890fce51 Merge "update wrong link" 2018-09-09 17:15:32 +00:00
Doug Hellmann
15f2986b50 add lib-forward-testing-python3 test job
This is a mechanically generated patch to add a functional test job
running under Python 3 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ib006f24d774f5e18361450fdfa8725ed76fff410
Story: #2002586
Task: #24288
2018-09-09 05:50:09 -04:00
Doug Hellmann
67afb0d539 add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ibb825b662f5ed8e8e43a836fbed91b9dda7c68ed
Story: #2002586
Task: #24288
2018-09-09 05:50:07 -04:00
Doug Hellmann
cf72922e08 switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I3ee1ac67daf28f8272125e9d540c5a10e68afa51
Story: #2002586
Task: #24288
2018-09-09 05:50:02 -04:00
Doug Hellmann
0a8e1f93b3 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I5f3e59c0f8ce40668b85d6585d55afcdc8243f93
Story: #2002586
Task: #24288
2018-09-09 05:49:59 -04:00
zhangyangyang
3362a65085 Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase method
assertRaisesRegexp() with assertRaisesRegex().

Change-Id: I85025ad141f8436913ba192716435ce63e1e2d05
2018-08-29 16:34:13 +08:00
whoami-rajat
b3487484d8 __repr__ crashes when empty dict passed
The Capabilities class __repr__ method crashes when
along with any manager object, the info is passed as
empty dict.
This patch handles the issue.

Change-Id: Ife5cfc82137d107b27b011aa83c3a9c89e78d701
Closes-Bug: #1785091
2018-08-13 14:34:47 +00:00
e5a21faae0 Update reno for stable/rocky
Change-Id: I2fb713c5b80ecec17281279437f895c00e926bb1
2018-08-08 09:35:21 +00:00
zhubx007
42b598d109 refactor the getid method base.py
Refer to a merged commit.
https://review.openstack.org/#/c/588983/

Refactor the getid method both in cinderclient/base.py
and in cinderclient/apiclient/base.py

TrivialFix

Change-Id: I4d1fb81f6876ab072ded3f14004ad064dcc949d3
2018-08-08 10:55:44 +08:00
Sean McGinnis
e5217d901d
Fix endpoint identification for api-version query
The api-version query is a GET against the root endpoint of cinder.
Determining this root endpoint had a flaw with the newer wsgi deployment
URLs that would cause it to find the root endpoint of the web server and
not cinder.

This updates the logic to work with legacy, wsgi, and custom URLs for
the Cinder endpoint.

Change-Id: Iaeba1f8d50ee8cc9410cc9f638770a56796871fb
Closes-bug: #1785594
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-08-06 10:26:33 -05:00
Sean McGinnis
b3f3cafd1e
Fix backwards compat for volume transfer < 3.55
All volume transfer v3 calls were being sent to the endpoint introduced
with microversion 3.55. This fixes backwards compatibility by routing
calls less than 3.55 to the original API extension endpoint.

Change-Id: I7205033ddd5be126b8614372a9fc82a2bc555f48
Closes-bug: #1785330
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-08-04 12:24:35 -05:00
wu.chunyang
e76a989989 update wrong link
the link may be https://github.com/rackerlabs/python-cloudservers
the previous link can not open.

Change-Id: Ieabcb80976d2f5e58cfb03381b25f2b4ce911176
2018-08-02 15:11:31 +08:00
Sean McGinnis
460229c609
Allow volume-transfer creation < 3.55 microversion
Handling for the new `no_snapshots` option was incorrectly handling
microversion evaluation that would prevent anything less than the new
microversion from working. This changes the check to only handle the
changed argument for 3.55 and later.

Change-Id: If96889ccde6044706e6a5dcd83fde3c20fe1c1fd
Closes-bug: #1784703
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-31 16:22:17 -05:00
Zuul
e76c4958ea Merge "Reflect multiattach deprecation in help text" 2018-07-27 02:16:21 +00:00
Sean McGinnis
fee0b58ef8 Reflect multiattach deprecation in help text
Change Icbb9c0ca89b25620cedff6cac7a4723e7126eca6 notified that the
``multiattach`` argument was deprecated, but nothing was added to the
args help text to indicate this, relying on a user to have read the
release notes.

In preparation of removing this option, this updates the help text so
there is at least some indication that it is going away.

Change-Id: I9e767a3f1411fbfc0bf0e433b45560e451d547d5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-26 15:39:52 -05:00
Sean McGinnis
32251f0ea3
Remove replication v1 support
The replication v1 implementation in Cinder was deprecated in the Mitaka
release in favor of the v2 "Cheesecake" version. Support was kept in the
client for backwards compatibility, but it has now been several releases
and these options should be removed.

Closes-bug: #1705470

Change-Id: I978a39a552fffc9ac7ba6e4726d1df2072fa45ba
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-26 11:41:57 -05:00
Neha Alhat
8d56668900 Remove unnecessary parameters from volume create APIs
As per Cinder code, following parameters are not required to be
passed in the request body of create volume API.

    * status
    * user_id
    * attach_status
    * project_id
    * source_replica

If you pass these parameters, previously it was ignored but in the
schema validation changes[1] we don't allow additionalProperties to be
passed in the request body. If user passes additional parameters which
are not as per API specs[2], then it will be rejected with 400 error.
On patch[3], tempest tests: test_volume_snapshot_create_get_list_delete,
test_volume_create_get_delete" are failing because of these unnecessary
parameters.

This patch removes these unnecessary parameters passed to the create
Volume API.

[1]https://blueprints.launchpad.net/cinder/+spec/json-schema-validation
[2]https://review.openstack.org/#/c/507386/
[3]https://review.openstack.org/#/c/573093/

Change-Id: I37744bfd0b0bc59682c3e680c1200f608ad3991b
2018-07-26 11:29:08 -05:00
Zuul
0f56085c02 Merge "Remove deprecated CLI options" 2018-07-24 05:10:35 +00:00
Zuul
93dae2a822 Merge "Update pylint to work with python 3" 2018-07-23 22:56:12 +00:00
Sean McGinnis
258586fb18
Update pylint to work with python 3
The pylint job was switched over to run under python 3, but
the job is not voting and it was apparently missed that the
conversion was causing it to fail.

This updates the version of pylint to one that is actually
supported by python 3 and makes tweaks to our script to
for the minor changes between versions.

Single character change to get rid of the more strict py3
regex string escape character format.

Change-Id: I93124b62c5ee177815457b32f55f5453fc3d387e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-23 14:05:13 -05:00
Sean McGinnis
7e1db55245
Add reno to requirements
Our HACKING documentation instructs developers to use:

"tox -e venv -- reno new <slug>"

to create new release notes. We did not add reno to our requirements
though, so attempting to run "tox -e venv -- reno" fails with the
command not found. This adds reno to our requirements so they get
installed in the venv.

Change-Id: Ie888297098e9380587769affad1a8ca9a6dfe5bc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-23 11:52:17 -05:00
Sean McGinnis
a331f06df0
Remove deprecated CLI options
The following options were deprecated in Queens or Pike and are now
being removed:

--endpoint-type
--bypass-url
--os-auth-system

Change-Id: I3b951cc4eb3adff23f3d2cbe674971816261ef56
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-23 11:50:35 -05:00
liuyamin
4536b2fb9f Switch from ostestr to stestr
os-testr has moved over to use stestr instead of testr. This change
updates the tox.ini file to call stestr directly instead of going
through ostestr and remove testrepository from test-requirements.txt.

Change-Id: I31fa5fefd610ec783471e15992675bd39ff0ebc4
2018-07-20 08:17:43 -05:00
Zuul
fbf5a70dd1 Merge "Add release note for ability to set attachment mode" 2018-07-20 03:32:53 +00:00
Zuul
9b1d6247be Merge "Transfer snapshots with volumes" 2018-07-20 03:32:53 +00:00
wanghao
a554faa653 Transfer snapshots with volumes
This patch will support to transfer volumes with or without
snapshots in new V3 api after mircoversion 3.55.

Change-Id: I61a84b5abf386a4073baea57d8820c8fd762ae03
Depends-On: https://review.openstack.org/533564/
Implements: blueprint transfer-snps-with-vols
2018-07-19 14:02:19 -05:00
Zuul
f69bfcbd7f Merge "fix tox python3 overrides" 2018-07-19 17:26:45 +00:00
Sean McGinnis
826c5fc16d Add release note for ability to set attachment mode
This adds a release note announcing the availability of the
--mode CLI option to create attachments as RO or RW.

Change-Id: I89e2bdd9b6da2745a793db78450b15e701e23ed1
2018-07-19 09:34:48 -05: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