summaryrefslogtreecommitdiff
path: root/cinderclient/v1/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Removed unnecessary 'service_type' decoratorIvan Kolodyazhny2017-01-231-64/+0
| | | | | | | | | | | | | | | @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
* remove raise "e"zheng yin2016-09-261-2/+2
| | | | | | | when it has an exception, it will call raise without arguments. we can use "raise" replace "raise e", the result is the same. Change-Id: I329932dcb2f49dcd3f0dfd88a5896860322e60ec
* deprecate command `cinder endpoints`Steve Martinelli2016-08-171-0/+5
| | | | | | | | | | | | The command `cinder endpoints` will now print a warning message, indicating that users should use openstackclient instead. This has already been done in nova's CLI [1]. Related-Bug: 1608166 [1] https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L4071-L4072 Change-Id: If68b40cf8116aa0ec386d8067c58703cb7b7c0da
* print endpoints using new keystoneauth catalog objectSteve Martinelli2016-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | cinderclient was assuming an identity v2 styled service catalog would always be returned (when using `cinder endpoints`). keystoneclient would return either a v2 or v3 styled catalog, whereas keystoneauth abstracts out the differences and handles them internally. the result is that there is no need to look for specific ['serviceCatalog'] or ['catalog'] keys in the dictionary returned from keystoneauth. it should be noted that perhaps cinderclient should deprecate the ability to list endpoints since that is mostly an identity and admin level operation, and likely an artifact from early openstack days, it should now be handled by openstackclient. further, it's not clear whether the command is meant to list all endpoints or just the endpoints in the user's token (which it does now). Change-Id: Ibfcccedee5baf43f5b5c517d37e3f046c8743078 Closes-Bug: 1608166
* Add strict Boolean checkingxiexs2016-06-271-3/+5
| | | | | | | | | | | | | | | | 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
* Use oslo_utils encodeutils and strutilsEric Harney2015-11-231-1/+1
| | | | | | | | | | 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
* Fix volume size units to match the APIKurt Martin2015-11-031-2/+2
| | | | | | | | | | | 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
* Use dictionary literal for dictionary creationAnkit Agrawal2015-09-241-5/+6
| | | | | | | | | | | | | | | | 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
* Fix help message for reset-state commandsRajesh Tailor2015-08-261-4/+4
| | | | | | | | Fixed help messages for reset-state and snapshot-reset-state commands for v1 as well as v2 api. Change-Id: I06ca6e33f4e4b486ed29f258325550b89f6dc930 Closes-Bug: 1489285
* Add response message when volume deleteTom Jose Kalapura2015-07-161-0/+1
| | | | | | | | | | 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
* Support pagination param limit in volume list in V1Anton Arefiev2015-04-221-1/+6
| | | | | | | | Since v1 api supports limit param in volume list, cinderclient should support it too. Change-Id: I60ffe0190a61dee354de5bc60ea3210c666bf6f2 Closes-Bug: #1447162
* cinder list now supports filter by tenantyatin karel2015-04-121-70/+77
| | | | | | | | | 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
* Updated help on cinder reset-state cliyatin karel2015-03-061-10/+10
| | | | | | | | | | 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
* Merge "Make cinderclient metadata CLI output consistent"Jenkins2015-03-021-1/+1
|\
| * Make cinderclient metadata CLI output consistentThang Pham2015-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* | Add missing all-tenants option to transfer-listliyingjun2015-02-241-1/+20
| | | | | | | | | | | | | | | | | | | | | | 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
* | Fix up help message for reset-state callJohn Griffith2015-01-281-8/+11
|/ | | | | | | | | | | 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
* Support Volume Backup QuotaDuncan Thomas2014-11-301-1/+10
| | | | | | | | | | | 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
* Merge "Fixed typos found by RETF rules"Jenkins2014-11-251-1/+1
|\
| * Fixed typos found by RETF rulesChristian Berendt2014-09-081-1/+1
| | | | | | | | | | | | | | Rules are available at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos Change-Id: I8de0631346b703870ce8ebe9ce728a0360f1ba7f
* | Merge "Quotaset update does not return result"Jenkins2014-09-081-1/+1
|\ \
| * | Quotaset update does not return resultJuan Manuel Olle2014-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | This patch adds the updated quota values to the output shell Closes-Bug: #1316474 Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
* | | Merge "Avoid extra lookups in extra-specs-list"Jenkins2014-08-231-14/+2
|\ \ \
| * | | Avoid extra lookups in extra-specs-listJordanP2014-08-051-14/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix the return code of the command reset-state"Jenkins2014-08-031-9/+5
|\ \ \
| * | | Fix the return code of the command reset-stateZhengguang2014-07-281-9/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | 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 tenant uuid when running cinder list --all-tenantsliyingjun2014-06-271-3/+9
|/ / | | | | | | | | | | | | | | | | | | 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
* | Merge "Add set-bootable command"Jenkins2014-07-161-0/+13
|\ \ | |/ |/|
| * Add set-bootable commandHiroyukiEguchi2014-04-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove "OPTIONAL:" from optional argument help textEric Harney2014-05-221-48/+48
| | | | | | | | | | | | | | | | 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
* | Update help strings for cinder clientDiane Fleming2014-04-231-218/+243
| | | | | | | | | | | | | | | | | | | | Make text consistent and clear. Add periods to end of sentences. Adjust test suite for change Closes-Bug: #1275881 Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
* | Merge "Accept deleting multiple snapshots in one shot"Jenkins2014-04-171-5/+13
|\ \
| * | Accept deleting multiple snapshots in one shotXavier Queralt2014-04-031-5/+13
| |/ | | | | | | | | | | | | | | | | 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
* | Merge "CLI for disable service reason"Jenkins2014-04-041-1/+12
|\ \ | |/ |/|
| * CLI for disable service reasonJay Lau2014-03-161-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add quota-delete command to cinder clientSergio Cazzolato2014-04-011-0/+9
|/ | | | | | | | | | | | 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
* Import access module from keystoneclient to handle V3 endpointsShao Kai Li2014-03-031-3/+3
| | | | | | | | | | | | | | | | | * 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
* Fix type-delete to allow deletion by name and IDPeter Hamilton2014-02-281-2/+3
| | | | | | | | | | | 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
* Require ctrl_location for encryption-type-createPeter Hamilton2014-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge "disable/enable a service has no output"Jenkins2014-01-251-2/+6
|\
| * disable/enable a service has no outputJay Lau2014-01-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add encryption-type-delete to cinderclient"Jenkins2014-01-241-0/+11
|\ \ | |/ |/|
| * Add encryption-type-delete to cinderclientPeter Hamilton2013-11-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | This modification adds support for deleting volume encryption types. The encryption-type-delete command accepts a single argument, the name or ID of the volume type whose associated encryption type should be deleted. The encryption type may only be deleted if the associated volume type is unused. blueprint encrypt-cinder-volumes Change-Id: Ie189e7ec91f5a8adc9d3496911de2811ad40f282
* | Reset-state and snapshot-reset-state for multiple objectsEric Harney2013-12-041-6/+37
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a user to call reset-state or snapshot-reset-state on a list of objects. The behavior is modeled after a similar change to delete multiple volumes. $ cinder reset-state good_volume good_volume_2 <no output> Error behavior is as follows: One success/one failure: $ cinder reset-state good_volume asdf Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists. One failure: $ cinder reset-state asdf ERROR: Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists. Two failures: $ cinder reset-state asdf qwert Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists. Reset state for volume qwert failed: No volume with a name or ID of 'qwert' exists. ERROR: Unable to reset the state for any of the specified volumes. Related-Bug: 1241941 Closes-Bug: 1256069 Change-Id: Id0a36fb7de0d69be0dac98ea04e4708775250b7a
* Adding volume readonly-mode-update interface to Cinder clientZhi Yan Liu2013-10-241-0/+14
| | | | | | | | | | | Adding volume readonly-mode-update interface to shell and client object (v1 and v2) to allow end user update volume read-only access mode flag. blueprint read-only-volumes Related-Id: I4c84614d6541d5f7c358abadb957da7b8c3d9c48 Change-Id: I2d587f301a21c0d42b8940465862da25a70ed5a8 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* Merge "Addition of volume/snapshot_metadata CLI"Jenkins2013-10-271-0/+77
|\
| * Addition of volume/snapshot_metadata CLIsaurabh2013-10-151-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | Added below CLIs:- 1. Set or Delete metadata of a snapshot 2. Show metadata of a snapshot 3. Show metadata of a volume 4. Update all metadata of volume 5. Update all metadata of snapshot Implements blueprint: add-metadata-cli Change-Id: Ic2b5f3fce6104d1756879718f666a42549458ad3
* | Enable "cinder delete" can delete multiple volumes in one requestJay Lau2013-10-251-10/+26
| | | | | | | | | | | | | | | | | | | | "nova delete" can delete multiple servers in one request but "cinder delete" can only delete one volume in one request, it is better to enhance cinder client to support remove multiple volumes in one request. Change-Id: I6a63aa3d7e4c152ae5e45bf2b36d862bdcd6df33 Closes-Bug: #1241941
* | Merge "Fixes broken v1 and v2 api backup-restore"Jenkins2013-10-221-2/+2
|\ \
| * | Fixes broken v1 and v2 api backup-restoreEdward Hope-Morley2013-10-151-2/+2
| |/ | | | | | | | | | | | | Also adds unit tests. Change-Id: I741889d49cffe46bf9165b266a62f2b328354e01 Fixes: bug 1240151