| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds in a version-list command that reports the
min/max versions of the Cinder API supported by this
version of the client, and also queries the Cinder API
V3 server to obtain min/max micro-versions and report
those as well.
In addition, we bump the default version of the client to
3.0, of course if you specify V2 in your rc file or on the
cmd line that works fine too.
I did run into one problem where I broke:
cinder.tests.unit.test_shell:test_cinder_service_name
Seems to be some hidden trickery with a fake, fixture or
mock that I can't figure out. For now I added a skip to
that test, but maybe somebody can point out the problem
during review.
Change-Id: I44e667c511d89de28af758a3c9ea1f812e682f18
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add method to query a server that supports /v3 endpoint and get the
highest supported microversion.
Change-Id: If179760787526440c852803eafaf9617bcd2d36e
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The client method get_highest_client_server_version
was so nice, we added it twice. Turns out it's not so
nice and one is more than enough.
This patch removes the duplicate.
Change-Id: Ic5ad022e7cd0322c319bfb412e3113c121848fe0
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function has been broken for some time, this patch replaces it with
a helpful message. This function can be removed in the next release.
Change-Id: Ic0a4177e7818c0a1493c15d9e496dc14c63ae7a3
Close-Bug: #1615695
|
| |\ \ \
| | |/
| |/| |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
discover_version needs to find the proper module for server_api_version
method, and it needs to properly parse a list of versions.
Do some refactor to clean things up.
Add unit tests.
Co-Authored-By: waj334 <justin.wilson@intel.com>
Change-Id: I742bc33074cc55fe5f9682b8b97a82573c51183f
Closes-Bug: #1632872
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As in PY2 and PY3 we have different result after calling
print, add print_function import to have the same behaviour
when using empty print.
Change-Id: I59c644d196805bb8a2592fc84a839c7a75d78f1a
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: Ib145e6b0f15cf5bcacc1c3bb858e5c64c3839ee2
|
| | |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Group feature was introduced in Cinder V3, So the command should
be there as well. But the "group show" command is in V2 which is
wrong.
Change-Id: If3ba44b2b188607542bdadfeb58f8e4b363837b7
Closes-bug: #1663496
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If you specify duplicate fields in --fields, then it prints duplicate
columns on the console. By default 'ID' column is added to the output
so if you specified it in --fields, then it shouldn't be displayed
twice.
A user can pass 'NaMe', ' Name ' or 'naMe' in --fields option and it
displays same name values three times under the user supplied column
names. If a user doesn't pass --fields option, then it shows "Name"
column in the list. To maintain consistency between user supplied
column and default column names, converted it into title case and
removed leading and trailing whitespaces. Kept ID field as capital
only('ID') for consistency.
Closes-Bug: #1659742
Change-Id: I98999e4c5934b56cd2e5a3fac1fe4d2a73a0d5a1
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: Icae58a69d0accc0308d581951a26970ac3872a49
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: I5e2c2da4aec930ca080195d4d55c8c31e1fafdc4
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The image_metadata options requires Cinder API v3.4, but
user can specify this option before API v3.4 then the
option will be ignored without any warning message.
We should check this option using start_version to
avoid confusion.
Change-Id: I6983494cb6653a9eaf35f4eedba87aeb70b55260
|
| |\ \ \ \ \
| |/ / / / |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In the commit I90a2b713556e91db69270a03ef6b798e08f93f90,
--metadata option of do_list() in v2/shell.py was
unexpectedly removed and --image_metadata option was
added instead of --metadata option.
This is wrong fix because --image_metadata option
requires API version >= "3.4" and is not supported at
API v2. On the other hands, --metadata option of
do_list() is supported from API v1.
We should remove --image_metadata option and then add
--metadata option to do_list() again.
Also comment on API v3 cinder list --metadata should
be fixed because this doesn't require API >=3.4.
Co-Authored-By: Masaki Kimura <masaki.kimura.kz@hitachi.com>
Change-Id: Ic7d5cfa2acb47fbf73776e034d958ad8fb9119a8
Closes-Bug: #1661045
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.
[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: Ib5f86d1f0846e292457813c893b73c6999e554a5
Closes-Bug: #1596829
|
| | |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This method takes a url for the cinder server endpoint and queries
the server for version info. It then returns the min of the server's
highest supported version and the cinderclients MAX_VERSION.
Change-Id: Ifb3478f1dba660a5d75d243dc2aaf6b421940752
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We added cinderclient support for new cinder attach APIs,
but we didn't not bump the cindercliient MAX_VERSION to 3.27 to
correspond with the microversion of the new APIs.
Change-Id: I8ee93e28e8425cd46784a6f7280227ab28135177
Closes-Bug: 1660673
|
| | |/
|/|
| |
| | |
Change-Id: I60fbb9160d3a7b7cf68dd1ea5e611e7f154fec5d
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add an attachments API
This includes a new attachment controller and shell
commands. To use you'll need to set your api version
`export OS_VOLUME_API_VERSION=3.27`
Now you can do things like attach a volume (cinders part at least):
`cinder attachment-create --connect True ......`
List/show/delete existing attachments:
`cinder attachment-list`
`cinder attachment-show <attachment-id>`
`cinder attachment-delete <attachemnt-id>`
Change-Id: I2c463f0910b6c9e37502869b7ec33073f12939f1
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Attempting to call the "delete_metadata" method with a client
at version 3.0 gives versioning error.
closes bug: 1659670
Change-Id: I839d405f02bcb6cb6bf6ed91dba972809b9916f7
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Param that needs docstring is not volume_types, but search_opts,
update the param docstring to document the search_opts.
Change-Id: Idef956d6e616988d9dacee227781a85bb60d6ded
|
| |\ \ \ \
| |_|/ /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a static method that takes a url for the cinder endpoint
and returns the server's min and max api version as APIVersion objects.
Change-Id: I33fa9d0883ad7377c480c9e230412dfa487ccbc9
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Because of 'start_version' parameter in decorator here [0]
we won't have metadata attr in args using api versions from 3.0 to 3.21.
This patch changes getting metadata from args logic for compatibility with
the api versions 3.0 - 3.21.
[0] - https://github.com/openstack/python-cinderclient/blob/b73b3932404c4645e05aaefae5502ab2304a5334/cinderclient/v3/shell.py#L1237
Change-Id: I4aa099556c57c49e9ad74fe80e5591d738cf3aa0
Closes-Bug: #1659561
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
After v3.10, cinder support filter volumes by group_id, this patch
support this feature for client side.
Change-Id: Ie7df4d8b81789fd36ca6f91d96a477c88e8d5a52
Partial-Implements: blueprint improvement-to-query-consistency-group-detail
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Test is subject to spurious errors due to an incorrect data check.
The check is assuming that a call to json.dumps with different dicts
will always generate the same string, which is incorrect.
This patch tests the JSON data that is sent in the request on its own
based on converting the passed JSON string to a dict and comparing
expected and actual dicts instead of strings.
TrivialFix
Closes-Bug: #1658704
Change-Id: I386cfee2e2c1dc2971d8a760b485505a90f6f120
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
assertTableStruct is the same like in ClientTestBase, so we don't need
to duplicate the code.
Change-Id: I96c3bc450223d5f3f6f84c6313a0205cfb247514
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
@utils.service_type was introduced with 'Initial split from
python-novaclient' commit and used for CLI. Now both Python and
Command-line APIs for each version work well without this decorator.
Unused 'get_service_type' function is removed too.
'utils.retype_method' removed as well because everything works well
without it.
Change-Id: Ic2470d8ca9d581b7c47da8d7e6a414c3c78ad27a
Partial-Bug: #1643584
Related-Bug: #1621126
|
| |\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In the recent release of keystoneauth1 2.18.0 provision is made to log
x-openstack-request-id for session client. Once this new library is synced
in openstack projects, the x-openstack-request-id will be logged twice
on the console if session client is used.
For example,
$ cinder --debug list
DEBUG:keystoneauth:GET call to volumev2 for
http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail
used request id req-dcc22730-021e-468a-8b12-da7d58b573a7
DEBUG:cinderclient.client:GET call to volumev2 for
http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail
used request id req-dcc22730-021e-468a-8b12-da7d58b573a7
Above log will be logged twice on the console.
Removed logging of x-openstack-request-id in case of SessionClient as it
is already logged in keystoneauth1. x-openstack-request-id will only be
logged once on console if HTTPClient is used.
Depends-On: Id0693a9958d26162b7a2a40173ca28de2d3e4f62
Closes-Bug: #1657351
Change-Id: I0861212a38466d0e65cf3389c7d2757cff86ea0d
|
| |\ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Change-Id: Id0693a9958d26162b7a2a40173ca28de2d3e4f62
|
| |\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Modify some codes in order to lead them meet the python3 common pattern.
Look through the following patterns of Cinder,
map() and filter() if a list is needed on Python 3:
Replace map(func, data) with [func(item) for item in data]
Replace filter(lambda obj: test(obj), data) with
[obj for obj in data if test(obj)]
Replace exceptions.OSError with OSError and
remove "import exceptions"
Replace iterator.next() with next(iterator)
Replace basestring with six.string_types
Replace unicode with six.text_type
Replace (str, unicode) with six.string_types
Replace "for key in dict.iterkeys()" with "for key in dict"
Replace dict.iteritems() with dict.items()
Replace dict.itervalues() with dict.values()
I found that only "filter(lambda obj: test(obj), data)" and
"map(func, data)"need to modify.
The other items are not be founded in Cinder.
Reference:https://wiki.openstack.org/wiki/Python3#Common_patterns
Change-Id: If33ec39eb176c14086132d3099c6ec577f956ded
|