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>
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
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
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
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
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
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
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
This replaces the deprecated (in python 3.2) unittest.TestCase method
assertRaisesRegexp() with assertRaisesRegex().
Change-Id: I85025ad141f8436913ba192716435ce63e1e2d05
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
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
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>
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>
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>
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>
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>
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
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>
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>
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>
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
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
This adds a release note announcing the availability of the
--mode CLI option to create attachments as RO or RW.
Change-Id: I89e2bdd9b6da2745a793db78450b15e701e23ed1
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
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
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