Because of lack of strict boolean checking, the unexpected
'False' value will always be send to server if invalid bool
value is specifed.
For instance:
the parameter 'is-public' of cinder type-update,
the parameter 'force' of cinder qos-delete
as so forth.
This patch tries to add a strict checking for them
to prevent invalid bool value.
Change-Id: I896ddbb6ec4760bfd4d721db960138e2df0b86e1
Closes-Bug: #1596418
The self.name is undefined in the Service class.
And also there is no need any unique information to
identify this object, so we just remove it directly.
Change-Id: I3ce8663f830357855f2155e080393ea97f8f80ba
Partial-Bug: #1585024
The self.name attribute is undefined in the VolumeEncryptionType
class. Instead we should print the self.encryption_id attribute
in the __repr__().
Change-Id: Ic11b45069145bbae078c8175928c5dd869bd8cb8
Partial-Bug: #1585024
Some extra code is present like unused variables,
unreachable code after return statement etc.
Same is removed.
Change-Id: Ifca88a19625c56ed520321ecbdd91739a304be8e
With oslo-incubator being deprecated, move
our use of strutils to oslo_utils.
This leaves in place the use of oslo-incubator's
strutils by other oslo-incubator modules for now.
Change-Id: Ic4e50060b42aeca9d1e54424a8a3a123140fbf2a
Both Horizon and the cinder client documents the size paramater in
gigabyes(GBs) but the API docs(both v1 and v2) list the size units as
gibibytes(GiBs). The correct unit should be gibibytes(GiBs). This
should help in clearing up any confusion on what units are used in
Cinder.
Closes-bug: 1511167
Change-Id: I42e15c18d1f084d435a2be9b343fb2f6c3cf377f
There is a way to get the version of the API being used. We need such
feature to work correct with different versions of the Cinder API
from third-party tools.
Change-Id: Ifde689df08644f9452138a9cd22052bc57fcb5d5
Dictionary creation could be rewritten as a dictionary literal.
for example:
body = {}
body['provider'] = args.provider
could be rewritten as
body = {'provider': args.provider}
TrivialFix
Change-Id: Ieae7b33332eca31754cbfe91288ef3001c573eb3
Fixed help messages for reset-state and snapshot-reset-state
commands for v1 as well as v2 api.
Change-Id: I06ca6e33f4e4b486ed29f258325550b89f6dc930
Closes-Bug: 1489285
When a request is send for deleting a volume it will not print any
success message if it deleted successfully.It will print only error
message if the volume deletion fails. This fix will print response
message if the volume deletion is success.
Change-Id: Icef2045107e1dcc3b7f2abfeb50b3f180ded1a27
Closes-Bug: #1475430
This patch adds the host_name optional argument to attach API
in order to enable users of cinderclient to attach volumes
not only to the instances but also to the hosts.
The API interface is implemented in
https://review.openstack.org/#/c/34125/ .
Change-Id: I0ff8ef19d1e3073fee1b9ec0f60609c37dfab9ab
Implements: blueprint host-attach
The 'name' field for some resources is called something different,
for example 'display_name' for volumes, 'name' for volumes type.
So class 'resource' has attribute 'NAME_ATTR' wich contains
attribute name for different resources.
This change removes reduntant call find in resource manager, instead
of it checks NAME_ATTR value.
Related-Bug: #1449444
Change-Id: Ide334d7535c73cbdff72c30319eb539d8f5304d6
ManagerWithFind.findall require search_opts for all tenants support,
the parameter search_opts should also be in all manager classes, which
use find method, qos spec does't have this parameter for list().
This change add it.
Change-Id: Iea619d66d217d92047a5b965d1e375acc97fa65b
Related-Bug: #1252665
Since v1 api supports limit param in volume list, cinderclient
should support it too.
Change-Id: I60ffe0190a61dee354de5bc60ea3210c666bf6f2
Closes-Bug: #1447162
Admin can now filter volumes on the basis of tenant.
Also updated help argument, to be consistent over the
v1 and v2 shell module.
Closes-Bug: #1341411
Change-Id: I647f0c9331ee4cd27acbfada6cdb9a56f80701b4
volumes also have 'in-use', 'attaching' and 'detaching' states.
These were missing in cinder help for reset-state cli. I have added
these in help.
Partial-Bug: #1309086
Change-Id: I094a61dd4921bed83e97134a4bfbcdc7d0c9ad63
The quota-class-update commands for v1 and v2 are both broken,
Fix v1 by returning result for update method in QuotaClassSetManager,
fix v2 by changing arg 'class-name' to 'class_name' for consistent
with v1.
Change-Id: Ic7188f485b914dc55048cf056a0685618134e87a
Closes-bug: #1423884
cinder transfer-list is missing the --all-tenants option, which makes
it inconsistent with 'cinder list'. Without this fix, when running as
admin horizon will need to make multiple queries to cinder (one for
each tenant present in the volume list) in order to display the transfers
that exist for the volumes being shown.
Change-Id: Ic4d72a54c450876ff24c64efd83678062c93a24e
Closes-bug: 1351084
There's some confusion about what the reset-state
call does. It's not clear to some that this call
simply changes the state of the object in the data-base.
This patch just updates the help message to indicate more
clearly that reset-state ONLY changes state in the DB.
Change-Id: Ia389cfd8b1a821a356706201c009cf3c8dca8419
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
cinder metadata-update-all and metadata-show produces
inconsistent output. The following patch makes the output of each
command above consistent, where each metadata property will
be printed on a separate table row.
Change-Id: I42933bc6c0e4f925c19cfd4db6d1a205de06a73d
Closes-Bug: #1366289
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
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
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
The keystoneclient provides an adapter which maintains the client state
around the session. We should re-use this rather than copy it and it
also means we will get new adapter functions and parameters as they
become available.
Change-Id: I05c0d650dcdd69f7e77a06563d735efe521a41ae
extra-specs-list used to use the extra-specs cinder extension
to get information on volume type extra specs. This information
is publicly available through the volume-type API [1] thus we
can avoid the extra-lookups of querying the extra-specs extension.
As the extra-spec info is publicly available, remove the part of
the docstring of cinder extra-specs-list that says 'admin only'.
[1] http://docs.openstack.org/api/openstack-block-storage/2.0/content/GET_getVolumeTypes__v2__tenant_id__types_Volume_Types.html
Change-Id: I9a8256a044511ac5233d8170fc57118ccaa1e217
Closes-Bug: 1343876
Currently, the command reset-state return code is zero if it
failed for any of volumes, it should be nonzero.
Change-Id: Ic6da238861fd003375003399bc6def6bf860a015
Closes-Bug: #1339643
Add the tenant uuid to the output when running cinder list --all-tenants,
since this is an admin command any way, it would help to list the tenant
UUID so we do not have to run cinder show to see the tenant uuid when we
have further queries to run.
Change-Id: I661789e957fa00947c4d5595f7e0515c27963735
Closes-bug: 1333257