| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The attachment_ids in the volume info returned by show volume
were incorrect. It was showing the volume_id, not the actual
attachment_id. This fix changes the attachment_ids returned by show
volume to correctly reflect the attachment_id.
Also, added a unit test for this, and added an attachment_id
to the fake volume so that other tests wouldn't now fail.
Closes-Bug: #1713082
Change-Id: I9ec36af5dd460d03d786aeeb3cc36a869c19ff62
|
| |/
|
|
|
|
|
|
|
| |
F811 is a little noisy with api_versions.wraps()
decorated methods, but opting to disable it in these
cases seems better than missing problems in the rest
of the code.
Change-Id: I9c46938ab2a442e55f96b5ab6c119c4475afaecd
|
| |
|
|
|
|
|
|
|
|
| |
These are caught by F811, but that test is
currently disabled because it fails on
@api_versions.wraps() decorated methods.
Just clean up these errors for now.
Change-Id: I42aed024352f798ebafddeb6f12880d8726360fe
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Enforce ordering of imports with H306.
For tests, this is mostly done by grouping test
imports after other cinderclient imports.
Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Support skip-validation parameter for quota update.
Change-Id: Iec4f1598987c632f45ad6eee751f78bedbf3ec26
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
get_highest_client_server_version should work with any endpoint type:
cinder-api with eventlet, uWSGI, etc.
This patch is based on python-novaclient patch [1]. In a future, we can
deprecate get_highest_client_server_version in flavor of keystoneauth
descovery feature.
[1] Icba858b496855e2ffd71b35168e8057b28236119
Closes-Bug: #1708188
Change-Id: I9acf6dc84c32b25bfe3254eb0f97248736498d32
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The show command currently just dumps the entire attachments
dictionary into the output which is a real mess and completely
screws up the displayed output (shell command).
There's really no reason to do this, we can just give the
attachment ID's and then when you're on the newer versions
you can do an attachment-show for all the crazy details if
you want. Keep in mind that the list command already shows
the server-id we're attached too, but that might also be
nice from the show command rather than jumping through
multiple commands. To try and accomodate various use cases
we'll also add an "attached_servers" field to the show command,
but you'll have to coorelate manually from there.
Change-Id: I45ac49d8d9a185c52727c5bc24a6a1323be83689
Closes-Bug: #1494941
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The get_server_version call in cidnerclient/client.py relies on
either finding v 3.x or encountering an exception to revert back
to v 2.0. It's not clear that this call will always raise if
a non V3 capable Cinder is called, so just to be safe make sure
we return a 2.0 response if there's no V3 reported back.
Change-Id: I3b5fb895cad4b85d5f4ea286fb33f7dd0929e691
Closes-Bug: #1694729
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
_get_server_version_range only supports a v3 client object
because ServiceManager.server_api_version() is only implemented
for the v3 client code. If you're trying to call this with a
v1 or v2 client object, it will raise an AttributeError which
is unhelpful for the end python API client.
This change handles the AttributeError and returns a more useful
error with an explanation of how the client code is wrong.
We could alternatively set versions = None and let it return two
empty APIVersion objects, but that seems confusing. This change
opts to be explicit about the failure.
Change-Id: I2266999df6332b8c5fb0ec808db69bcc847effb0
Closes-Bug: #1694739
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This patch added volume summary command support.
Change-Id: I7cf6e149b9ce9cae21818c60146e6db9cc2904bd
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Usage: It adds an optional argument --poll to the cinder
create command which waits while the creation of the volume
is completed and the volume goes to available state. In case
there is an error in volume creation, it throws an error message
and exits with a non zero status. The error message printed here
is the async error message in case it generates one.
Depends-On: Ic3ab32b95abd29e995bc071adc11b1e481b32516
Change-Id: I1a4d361d48a44a0daa830491f415be64f2e356e3
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Current code mistakenly thinks that 3.40 is older than 3.27, because
it's treating 3.40 as 3.4, thus returning the wrong maximum supported
version by both server and client.
It is also returning a 3.40 version as 3.4 because it's returning it as
a float.
This patch fixes both issues by not using float conversion but using the
APIVersion object to do the comparison and by changing returned type to
a string so it can be used to instantiate a client.
Change-Id: Ica4d718b3de31c31da047f07c5154b242e122596
Closes-Bug: #1705093
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Depending on the order of execution our unit tests could fail because we
are caching the reset methods in the RESET_STATE_RESOURCES dictionary in
cinderclient.v3.shell and mocking the methods before importing this file
will leave future tests with the mocked value.
This patch fixes this by mocking find_resource instead of individual
find methods, and in one of the tests with a method that will call
original method whenever it's not the call we actually wanted to mock.
Change-Id: Ic3ab32b95abd29e995bc071adc11b1e481b32516
Closes-Bug: #1705249
|
| |\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added capability to recognize volume name
too in command. It can work with both name
and id now.
Change-Id: If0fc63042d76beb354e6961e1f2d2936021c3d8e
Closes-Bug: #1661043
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Cinder doesn't support to update consistencygroup quota. And
since cg will be deprecated in Queue, there is no value to support it
at server or client side. So this patch removed it.
Change-Id: I5fbfb30611a60d575fedb676119bb0a1564700df
Closes-bug: #1693584
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Allow cinderclient to retrieve more than osapi_max_limit
(default 1000) snapshots, backups, etc.
Cinder pagination support has been added to the API quite some
time ago. Client support was only implemented for volumes.
This commit allows other resources to be paginated as well.
Change-Id: I9a6f446b680dadedccd14ba49efdef7f5ef0a58a
Closes-Bug: #1691229
Co-Authored-By: Gorka Eguileor <geguileo@redhat.com>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch adds support for microversion 3.32 allowing setting and
querying Cinder services' log levels.
Two new commands are available:
cinder service-get-log [--binary {,*,cinder-api,cinder-volume,cinder-scheduler,
cinder-backup}]
[--server SERVER] [--prefix PREFIX]
cinder service-set-log [--binary {,*,cinder-api,cinder-volume,cinder-scheduler,
cinder-backup}]
[--server SERVER] [--prefix PREFIX]
<log-level>
Implements: blueprint dynamic-log-levels
Depends-On: Ia5ef81135044733f1dd3970a116f97457b0371de
Change-Id: I50b5ea93464b15751e45afa0a05475651eeb53a8
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch adds CLI support for replication group.
It is built upon the generic volume groups.
Server side patch is here:
https://review.openstack.org/#/c/352228/
Depends-On: I4d488252bd670b3ebabbcc9f5e29e0e4e913765a
Change-Id: I462c3ab8c9c3a6a1b434748f81d208359ffd2431
Implements: blueprint replication-cg
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch added revert to snapshot support in
cinder client, also fix two pylint errors.
Change-Id: I20d8df8d7bcf763f6651f44901a98f6d853b27ce
Partial-Implements: blueprint revert-volume-to-snapshot
Depends-On: cca9e1ac54d123da8859ff918b2355606bfa474e
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These need to support Unicode values, like our API does.
Otherwise the shell client does not work for non-ascii names, etc.
Closes-Bug: #1695927
Change-Id: Ib661bb6f8df62084bdf80e7666de5708d13674b7
|
| |\ \ \ |
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Updated the help message to advertise we support
filter resource by inexact match since 3.34.
Depends-On: 93b1c1134931749f77c5b3c7bb0f92936b3124e4
Change-Id: I8ea0eb3f0c693c6a2adce33e4d74b2327f124d40
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Actions on updating volume quota class:
[1] Add cmd option 'backups, backup-gigabytes, per-volume-gigabytes'
[2] Add test cases for cmd quota-class-show and quota-class-update
[3] Fix according test cases
Now, cmd option '--consistencygroups' is not yet supported for updating
quota class.
Change-Id: I482ae501f15a103b9e07f4f17d182c853035dca9
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
V3.25 support query groups with volumes, this patch add the client
support.
Partial-Implements: blueprint improvement-to-query-consistency-group-detail
Partial-Bug: #1663474
Change-Id: Ic0d86b9265f295877eebca97ff450f5efd73b184
|
| | |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
'ddt.data' decorator is wrongly used in 'test_volumes.py',
correct it.
Change-Id: Ib60c4cad33c071f52391fcfa227ed29482ad9445
|
| |\ \ \
| |_|/
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While running the unittests, test_noauth_plugin() needs network access
and fails in build environments where no network is available:
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish \
connection to http://example.com/v2/admin/volumes/detail: HTTPConnectionPool \
(host='example.com', port=80): Max retries exceeded with url: /v2/admin/ \
volumes/detail (Caused by NewConnectionError('<requests.packages.urllib3. \
connection.HTTPConnection object at 0x7f04c4394290>: Failed to establish a \
new connection: [Errno -3] Temporary failure in name resolution',))
Prevent the need of network access to be able to run the unittest in such build
envs.
Closes-Bug: #1695009
Change-Id: I123919f29de7cb72a780b5f134a5bfaa404f5b53
|
| |\ \ \
| |/ /
|/| | |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce new command 'list-filters' to retrieve
enabled resource filters.
```
command: cinder list-filters --resource=volume
output:
+----------------+-------------------------------+
| Resource | Filters |
+----------------+-------------------------------+
| volume | name, status, image_metadata |
+----------------+-------------------------------+
```
Also Added new option '--filters' to these list commands:
1. list
2. snapshot-list
3. backup-list
4. attachment-list
5. message-list
6. group-list
7. group-snapshot-list
8. get-pools
Change-Id: I062e6227342ea0d940a8333e84014969c33b49df
Partial: blueprint generalized-filtering-for-cinder-list-resource
Depends-On: 04bd22c1eb371805a3ce9f6c8915325bc0da2d36
Depends-On: 7fdc4688fea373afb85d929e649d311568d1855a
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Openstack common has a wrapper for generating uuids. We should
use that function to generate uuids for consistency.
Change-Id: Ia64cceb8c17e8ee6cba83fceadf8510679c388d2
Closes-Bug: #1082248
|
| |\ \ \
| |_|/
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows a global_request_id to be created in the constructor which
will be passed on all subsequent calls to support cross service
request tracking.
oslo spec I65de8261746b25d45e105394f4eeb95b9cb3bd42
Change-Id: Ib271ac01c2a4a36e611ae9181ae93305f2318680
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
encryption-type-create currently takes args "--key_size"
and "--control_location".
Our standard is to use dashes rather than underscores for
arguments like this, because it's easier to type them.
Additionally, encryption-type-update already uses
"--key-size" and "--control-location" for the same args.
This adds the dashed versions to the CLI and makes them the
default shown in the help. The underscore versions are
retained for compatibility.
Also removes redundant "(Optional)" text for arguments listed
under "Optional Arguments". This matches other commands.
Change-Id: I1bd2b7657ec577b9775eacd163cfdf6eb6b6eab2
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now we can use 'cinder reset-state' command for 'volume',
'snapshot', 'backup', 'group' and 'group-snapshot'.
Also change volume's default status from 'available' to
'None' when not any status is specified.
Co-Authored-By: Eric Harney <eharney@redhat.com>
Change-Id: I0aefeaf5ece74f1f2bc4b72d5705c8c088921e20
Partial-implements: blueprint client-reset-state-improvements
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now we have 'extra_specs', 'group_specs' pretty
printed.
+-------------+---------------+
| other_key | value |
| extra_specs | key1 : value1 |
| | key2 : value2 |
+-------------+---------------+
Change-Id: I3500f148f29bad89aacc89ad12a993edf4f7d460
|
| |\ \ \
| |/ / |
|
| | |/
| |
| |
| |
| |
| |
| | |
This provides enough info to understand why this assertion
is failing without having to attach a debugger.
Change-Id: Ib042039d7589e7c86502ac15773fce995ff64bb9
|
| |\ \ |
|