175 Commits

Author SHA1 Message Date
yatin karel
f47f973d9b Updated help on cinder reset-state cli
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
2015-03-06 01:45:08 +05:30
Jenkins
ae9dd86093 Merge "Make cinderclient metadata CLI output consistent" 2015-03-02 00:21:11 +00:00
liyingjun
c01529fa53 Add missing all-tenants option to transfer-list
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
2015-02-24 16:11:46 +08:00
Jenkins
9dcb38f5f2 Merge "Fix up help message for reset-state call" 2015-02-05 14:56:32 +00:00
John Griffith
e9e8aab2ec Fix up help message for reset-state call
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
2015-01-28 13:36:20 -06:00
Zhiteng Huang
200aeae76c Remove commented code in cinderclient/v1/volumes.py
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
2015-01-15 10:56:27 +08:00
Thang Pham
fdba364b7d Make cinderclient metadata CLI output consistent
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
2015-01-13 16:09:34 -05:00
Jenkins
4154f88fa1 Merge "Add the parameter bypass_url to the cinder client" 2014-12-01 19:10:17 +00:00
Vincent Hou
7a50182fbe Add the parameter bypass_url to the cinder client
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
2014-12-01 02:43:52 +00:00
Duncan Thomas
4ccb70a90f Support Volume Backup Quota
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
2014-11-30 19:37:10 +02:00
Jenkins
5b172959c6 Merge "Fix 'search_opts' error with backup delete command" 2014-11-30 06:39:01 +00:00
Jenkins
d6f4ab3c96 Merge "Fixed typos found by RETF rules" 2014-11-25 03:02:01 +00:00
seungjin
029a776455 Fix 'search_opts' error with backup delete command
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
2014-11-25 01:28:54 +00:00
Jenkins
9bd8c5dff9 Merge "Use adapter from keystoneclient" 2014-09-09 16:01:33 +00:00
Jenkins
42d13be346 Merge "Quotaset update does not return result" 2014-09-08 20:26:05 +00:00
Christian Berendt
17e4d6c381 Fixed typos found by RETF rules
Rules are available at
https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos

Change-Id: I8de0631346b703870ce8ebe9ce728a0360f1ba7f
2014-09-08 11:31:22 +00:00
Jamie Lennox
84af49ce97 Use adapter from keystoneclient
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
2014-09-02 12:38:03 +10:00
Jenkins
0c5f0a92b4 Merge "Avoid extra lookups in extra-specs-list" 2014-08-23 15:27:05 +00:00
JordanP
6565e275fd Avoid extra lookups in extra-specs-list
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
2014-08-05 11:28:09 +02:00
Jenkins
88ee3b385c Merge "Fix the return code of the command reset-state" 2014-08-03 17:14:06 +00:00
Juan Manuel Olle
02b32c8aed Quotaset update does not return result
This patch adds the updated quota values to the output shell

Closes-Bug: #1316474
Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
2014-07-29 17:56:07 +00:00
Zhengguang
bf8fa0b606 Fix the return code of the command reset-state
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
2014-07-28 09:08:36 -04:00
Jenkins
0c4010e7fb Merge "Add set-bootable command" 2014-07-16 22:30:28 +00:00
liyingjun
ae04b4b099 Add tenant uuid when running cinder list --all-tenants
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
2014-06-27 03:29:27 +08:00
Jenkins
6550b0ab5c Merge "Remove "OPTIONAL:" from optional argument help text" 2014-06-25 19:38:01 +00:00
Jenkins
408994c855 Merge "Fix Volume.extend and Volume.update_readonly_flag methods" 2014-06-23 14:45:52 +00:00
haneef ali
e8e06ee289 Added support for keystone v3client
Change-Id: I7bbc74c9e73f36f942f5800a7af0da717da0bc64
2014-06-17 13:10:32 -07:00
Eric Harney
811af8f374 Remove "OPTIONAL:" from optional argument help text
All arguments starting with '--' are optional and listed
under the 'Optional arguments:' header by argparse.  Remove
the extra note shown for each argument.

Change-Id: Ic361a3bdbd1f1669458e16b99995f0f108400699
2014-05-22 15:43:31 -04:00
Diane Fleming
0d2bf657ae Update help strings for cinder client
Make text consistent and clear.
Add periods to end of sentences.
Adjust test suite for change

Closes-Bug: #1275881

Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
2014-04-23 09:06:21 -05:00
Jenkins
71daa36023 Merge "Accept deleting multiple snapshots in one shot" 2014-04-17 19:21:42 +00:00
Jenkins
338755aa17 Merge "Add auth_plugin support to cinderclient" 2014-04-17 17:20:40 +00:00
Jenkins
fc2c916ce4 Merge "CLI for disable service reason" 2014-04-04 07:16:50 +00:00
Xavier Queralt
5a080b4d47 Accept deleting multiple snapshots in one shot
In bug 1241941 the delete and force-delete commands were updated to
accept multiple volumes for deleting in the same call. This patch adds
the same behaviour to the snapshot-delete command.

Closes-Bug: #1284540
Change-Id: I5e4bf8641d7fd261fa24b03832bad08007e43c12
2014-04-03 10:21:23 +02:00
HiroyukiEguchi
c364372477 Add set-bootable command
Bootable Status is set to "True" automatically when user
create a volume from a image. But user have to set bootable
status manually when creating a bootable volume manually.

blueprint add-bootable-option

this commit is related to https://review.openstack.org/#/c/84057/

Change-Id: Ib4a44334001b7b9e3b896c2e44607c414e75e952
2014-04-02 09:50:48 +09:00
Sergio Cazzolato
5278bdb0c5 Add quota-delete command to cinder client
Add the command quota-delete <tenant_id> to the client.

This change depends on the cinder change:
Ia040a20abb831c311eb13624ddecbbf0f12fdd9f

DocImpact

Implements blueprint quota-delete
Change-Id: I1e5c98154dc3c6de168747eb912b45265cd1b9db
2014-04-01 12:58:41 +00:00
yrunts
d3236f568e Fix Volume.extend and Volume.update_readonly_flag methods
Correct VolumeManager method signature called from Volume.extend and
Volume.update_readonly_flag methods for v1 and v2 api's.

Change-Id: I2ffb49112d39ad96b91a4173526502a5201666c6
Closes-Bug: #1293423
Closes-Bug: #1294178
2014-03-18 17:35:17 +02:00
Jay Lau
8a59f2ca57 CLI for disable service reason
Adds cli option to allow users to give reason
for service-disable. Also adds disabled reason
as a column in service list, so any disabled service
can be seen with reason.

A recent cinder change that allows disable-log-reason
allows users to provide reason for disabling service.
This just adds the cli option for the method.

Implements bp record-reason-for-disabling-service

Change-Id: I90f4566764790eeb0c047c4a0fd0108050ab6ad9
2014-03-16 09:34:09 +08:00
Jenkins
bd98d3264b Merge "Import access module from keystoneclient to handle V3 endpoints" 2014-03-13 23:05:32 +00:00
Shao Kai Li
1b0ea8768c Import access module from keystoneclient to handle V3 endpoints
* service_catalog.py will be used only by nova(cinder.py), it will be removed if nova
uses access instead of service_catalog. Then service_catalog.py and
test_service_catalog.py will be removed from cinderclient if necessary.

* Some unit tests are modified.

* Because of JSON format's modification, functions that process cinder
credentials and cinder endpoints are changed.

* Add dependency for keystoneclient in requirements.txt.

Change-Id: Icf7badfdddcf5f55536d95db7242aff58aa34b6e
Closes-Bug: #1263876
bp: service-catalog
2014-03-03 01:16:26 -05:00
Jay Lau
5cc624c4f3 Update doc string for service disable
It should be "Disable" but not "Enable" in doc string when disable
a service.

Change-Id: I658090d4e218222c76947c37f340fb2ab7d26ce3
2014-03-03 08:31:08 +08:00
Peter Hamilton
3ec28c3309 Fix type-delete to allow deletion by name and ID
This change addresses bug #1286314, fixing type deletion to allow
deletion by either volume type name or ID. The former implementation
only accepted the volume type ID. Help documentation is also updated
to reflect this change.

Change-Id: I0fc66b54a7bcfa4e00a4d136ac513fa40e628dd2
Closes-Bug: #1286314
DocImpact
2014-02-28 15:48:23 -05:00
Julie Pichon
ea8c9554c9 Fix typos in the volumes and snapshots docstrings
Change-Id: I0e4f3813b8e263ea59e182db153c5b4c6fd2a177
2014-02-26 16:30:53 +00:00
Cory Stone
d5334aa929 Add auth_plugin support to cinderclient
With CINDER_RAX_AUTH being rightfully removed, cinderclient is no longer
compatible with Rackspace/any non-keystone auth. To fix this, I stole
auth_system/auth_plugin from novaclient's implementation.

See https://review.openstack.org/#/c/23820/.

Change-Id: If5f84003f868ef02bb7eb7da67cf62018602e8f0
Closes-Bug: 1280393
2014-02-14 15:09:44 -06:00
Peter Hamilton
6fd8d8e12e Require ctrl_location for encryption-type-create
This bug fix addresses bug #1267168, adding a default value to the
optional control_location parameter for the encryption-type-create
command. Prior to this fix, any invocation of encryption-type-create
that omitted the control_location parameter would fail. The failure
arose from the expectations of the cinder volume encryption type
API extension, which expects to always receive a value for the
control_location on encryption type creation.

control_location indicates which service will conduct the volume
encryption for the encryption-type under consideration; valid options
are 'front-end' (i.e., nova) and 'back-end' (i.e., cinder). The new
default value is 'front-end' and is used whenever control_location
is omitted from encryption-type-create invocation. For prior
discussion and information, see the abandoned patch below:

https://review.openstack.org/#/c/58303/

blueprint encrypt-cinder-volumes
https://blueprints.launchpad.net/nova/+spec/encrypt-cinder-volumes

Change-Id: I8db80929adbf5a3d818b9d3a8115067ae8e7d9e2
Closes-Bug: #1267168
DocImpact
2014-02-12 21:38:41 +02:00
Swapnil Kulkarni
4273bbefb9 Fix typos in cinderclient
Small nit-pics in volume_transfers.

Change-Id: I846b38970b14e6385269a02bb495c63464ea0842
Closes-Bug: #1255905
2014-02-05 16:23:23 +02:00
Jenkins
36a92e1286 Merge "disable/enable a service has no output" 2014-01-25 14:23:20 +00:00
Jenkins
560df45093 Merge "Fix 'search_opts' unexpected keyword argument error" 2014-01-25 06:38:20 +00:00
Jenkins
e2642796b8 Merge "Add encryption-type-delete to cinderclient" 2014-01-24 11:39:12 +00:00
Jay Lau
c2ef5eaf49 disable/enable a service has no output
When disable/enable a cinder service, there is no output, this
caused end user does not know if the service was disabled/enabled
successfully.

It is better add some output for the command just like nova to tell
end user the service status.

Change-Id: I9d440ab7437c268b17627e255f152db0b3bf4f53
Closes-Bug: #1261120
2014-01-21 22:57:23 +08:00
Xiao Chen
2f0863b7d4 Fix 'search_opts' unexpected keyword argument error
When executing 'encryption-type-create' command using resource
name, it will use the findall() in base.py, then error will
occur because list() in findall() used 'search_opts' argument
which list() in VolumeEncryptionTypeManager did not have. Some
other command like 'transfer-delete' met same issue.

This patch will add 'search_opts' argument in list() function
in child class to avoid the bug.

Closes-Bug: #1248519
Related-Bug: #1252665

Change-Id: If1cd8b812af21335e5d4351766539a927a8fbdf4
2014-01-20 15:43:31 +08:00