The client restricts the sort keys that the user can supply. The
'name' key is allowed but is not the correct key for sorting by name,
it should be 'display_name'.
If 'name' is used then the client returns with the error 500
Internal Server Error.
This patch will add support for mapping client sort keys (eg, 'name')
to server sort keys (eg, 'display_name'), allowing the user to supply
the 'name' key to sort by name.
This patch also adds UT for the sort key and direction error cases
when an invalid value is supplied.
Change-Id: I0bdad6d61da83a3924a6b18678afe4722b5778d6
Closes-Bug: 1404020
migrate_volume_completion() function in Volume class was commented
out when it was added. It hasn't been changed since then. This
change remove it.
Change-Id: Iad8c88e20268265f9063e2faa2a21514439150ad
This commit fixes an error that occurs in a number of places in the v2
shell; the word 'the' is missing from a number of the error message
strings.
Change-Id: I6d1026c965f84c9c39fcfd175b5d5cbbbad5ef5c
An admin-api extension to show pool info was supported at commit
https://review.openstack.org/#/c/119938/.
This change adds a command to show pool information for backends
using the admin-api. This change also closes the gap for end users.
Partial-Bug: 1403902
Change-Id: I20e0828c5403b73bc44d07eebf08e2aa2deb428a
The cinder client supports invoking the volumes REST API with the
sort_dir and sort_key parameters. However, the client output table
is always sorted by ID even though the REST API is returning in
sorted order based on the sort key/direction provided.
For example, the command below supplies the 'size' sort key but the
output table is still sorted by ID:
cinder list --sort_key size --sort_dir desc
This fix contains:
* Updates to the print_list utility to prevent any re-ordering so
that the current object order is maintained
* Updates to the shell to disable re-ordering if the user supplies
sort parameters
Change-Id: I4cc111a8bdd2b89158dfc4bb0d16fa6dbf36cc57
Closes-Bug: 1402846
This patch added client handling and unit tests for volume type description:
* Added 2 client methods for volume type.
default: to get the default volume type
update: to upate an existing volume type to update description
* Added 2 new command-line operations.
type-update (adminitrator only)
type-default
* type-list should display description.
* type-create should have an option for entering the description.
The corresponding cinder APIs change volume-type-description:
https://review.openstack.org/#/c/131871/
Implements: blueprint volume-type-description
Change-Id: I2735d7050d90589d19f45e21096577febdcca8bb
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.
Change-Id: I58e362f5a94e2c47a103d6901464df38110d6383
Convert the function _list into a loop function, which can retrieve
the items from the next link till the limit or the end of items has
been reached. This works for v2 only.
So far, only volume list in v2 support limit. The limit parameter
work for volume list in v2 only, but other list can extend it in
future work.
Change-Id: I011f0ed1a4ab639f67db6cae580d978c0b44c1bb
closes-bug: #1342192
This patch added the ability for CG quota to be showed and updated.
- Added consistencygroups as a quota resource to be displayed.
- Added an option for consistencygroups quota to be updated.
Change-Id: I7e88eb426eb1733bce955b7a15b8bffdb1e8ee20
Closes-Bug: #1373766
If the bypass_url is specified in the http client, there is no need
to get it from Keystone.
Change-Id: I891849f77ad2ba98a83c993b401121216c8cfff6
closes-bug: #1350702
There are a number of functions that were implemented in keystoneclient
in response to needs from cinder and other clients.
Now that these were released in 0.11 cinderclient should make use of
them rather than keep its own versions.
Change-Id: I6444fc5bfd2d0505f9a7eb2c6068ab945ae5bb9b
Python-cinderclient support update volume backup quota.
Cinder server side commit for this feature was:
https://review.openstack.org/#/c/111460/
blueprint volume-backup-quota
Change-Id: I1fceeb9fc0eb92370e249c46749a61e4b11420b0
Follow on change from cinder code to all specifying an
image by either its name or ID for creating a volume.
This patch adds the --image option that will take either
ID or name as input. The service then will attempt to
locate the image to use and make sure there are not
multiple images with the same name.
If both --image-id and --image are used it will favor
the more explicit ID.
DocImpact
Closes-Bug: 1377823
Change-Id: I77d58258144970fac47da6da6b7870f2931e1823
Currently coverage reports on coverage of the tests themselves. This
makes the percentage coverage higher than if they are excluded and
therefore distorts the reports values for the codes as a whole.
This commit updates the .coveragerc files to remove
cinderclient/tests/* from the coverage report.
Change-Id: If7f1765017f3f0d55975219b12ff7bf149146931
The following error message is yield when we try to
backup volume which is not present.
ERROR: list() got an unexpected keyword argument 'search_opts'
This is from findall() method in the
cinderclient.base.ManagerWithFind class.
When cinderclient get a specific resource, it use the findall() method.
The error will yields which list() in
VolumeEncryptionTypeManager did not have.
Change-Id: Iffe568c6d2de41b8e24658f3a54f2861e2f7db31
Closes-Bug: #1282324
Related-Bug: #1248519
Most of these methods were imported when we forked away from
python-novaclient, but over the course of time, their existence
became redundant as no file seems to be importing them. Such
methods are removed in this change.
Change-Id: Ic93fc92ce624eefaeaca6de5c8fd965e88159030
valid_versions does not exist here, it is obviously supposed to mean
_VALID_VERSIONS.
Closes-Bug: #1386232
Change-Id: I477baa7642feba72f80d884d6183512185b02cf1
Added retry support when encounter requests.exceptions.Timeout
during HTTP request.
Closes-Bug: #1379505
Change-Id: I6253a109c3a76dd2f15c96a349da68936f9bfff4
Added functionality from keystoneclient to fallback to the tty for password
entry if no password is given via the environment or the --os-password option.
Change-Id: If5b27cb8c67712860faa24d543ed48eaa542f28b
Closes-Bug: 1357559
Ignore all dotfiles in the base dir of the tree except for
.gitignore.
This should solve the "ignore my IDE's files" problem in a
general way.
Change-Id: I689220b303d24c65c5fe9523eadc8ad48a93737f
To be able to create profiling traces for Cinder, client should be
able to send special HTTP header that contains trace info.
This patch is as well important to be able to make cross project
traces. (Typical case nova calls cinder via python client, if
profiler is initialized in nova, cinder client will add extra
header, that will be parsed by special osprofiler middleware in cinder
api)
Don't worry no security issue here, trace information is signed by HMAC
key that is setted in api-paste.ini. So only person that knows HMAC key
is able to send proper header.
Main patch (in Cinder) is:
https://review.openstack.org/#/c/103415/
Change-Id: I53bb1b92e62841a02f941bdafaed7f8ed5db7ce1
Volume not found error occurs when running these commands via cinderclient
with volume name as an argument.
unmanage, replication-promote, replication-reenable
However in their help text, it is described that Name and ID are supported.
Therefore, this patch fixes volume name support to their argument.
Closes-bug: #1374211
Change-Id: I8b90523d8e79a65eb27ff4e99820e8cb3feb3120
The 'cinder manage' command argumenst are kind of a disaster.
The positionals are <host> <id> where <id> is undefined/free form
K/V pairs. On top of it we then have --source-name and --source-id
optional arguments available. There absolutely no way to tell from
the help what one should be entering here without referring to the
code, and even then it's not quite clear how the options work and
which one will be used.
To clean this up, change the positionals to <host> <identifier>
where both are strings. Remove --source-name and --source-id
and consolidate those options with --id-type.
id-type will allow a user to specify the type of identifier
(source-name, source-id, or whatever), but defaults to
source-name which is most commonly used currently.
* NOTE *
Ideally we'd just do away with the designator source-name/source-id
altogether and just have an <identifier> positional arg. Each driver
would then be responsible for figuring out what was passed an how to
deal with it. This however requires changes in all of the drivers and
broader changes on the Cinder side which I don't think are warranted
during RC.
During Kilo we should clean all of this up, but for now at least the
syntax is somewhat ready for human consumption and a bit easier than
what we introduced.
Change-Id: I07696648ae647f17ab9180cd87b25f8cb888f5d6
Closes-Bug: 1376311