This function has been broken for some time, this patch replaces it with
a helpful message. This function can be removed in the next release.
Change-Id: Ic0a4177e7818c0a1493c15d9e496dc14c63ae7a3
Close-Bug: #1615695
Group feature was introduced in Cinder V3, So the command should
be there as well. But the "group show" command is in V2 which is
wrong.
Change-Id: If3ba44b2b188607542bdadfeb58f8e4b363837b7
Closes-bug: #1663496
If you specify duplicate fields in --fields, then it prints duplicate
columns on the console. By default 'ID' column is added to the output
so if you specified it in --fields, then it shouldn't be displayed
twice.
A user can pass 'NaMe', ' Name ' or 'naMe' in --fields option and it
displays same name values three times under the user supplied column
names. If a user doesn't pass --fields option, then it shows "Name"
column in the list. To maintain consistency between user supplied
column and default column names, converted it into title case and
removed leading and trailing whitespaces. Kept ID field as capital
only('ID') for consistency.
Closes-Bug: #1659742
Change-Id: I98999e4c5934b56cd2e5a3fac1fe4d2a73a0d5a1
In the commit I90a2b713556e91db69270a03ef6b798e08f93f90,
--metadata option of do_list() in v2/shell.py was
unexpectedly removed and --image_metadata option was
added instead of --metadata option.
This is wrong fix because --image_metadata option
requires API version >= "3.4" and is not supported at
API v2. On the other hands, --metadata option of
do_list() is supported from API v1.
We should remove --image_metadata option and then add
--metadata option to do_list() again.
Also comment on API v3 cinder list --metadata should
be fixed because this doesn't require API >=3.4.
Co-Authored-By: Masaki Kimura <masaki.kimura.kz@hitachi.com>
Change-Id: Ic7d5cfa2acb47fbf73776e034d958ad8fb9119a8
Closes-Bug: #1661045
@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
Now v2 API uses code from v3. It's confusing and logically incorrect.
This patch makes v3 API as an extended version of v2.
The next patches related to this bug duplicated code between v1 and v2,
v2 and v3 will be removed.
Change-Id: I90a2b713556e91db69270a03ef6b798e08f93f90
Partial-Bug: #1643584
Cinder currently has the ability to take over the management of
existing volumes and snapshots ("manage existing") and to relinquish
management of volumes and snapshots ("unmanage"). The API to manage an
existing volume takes a reference, which is a driver-specific string
that is used to identify the volume on the storage backend. This
patch adds the client code for APIs for listing volumes and snapshots
available for management to make this flow more user-friendly.
Change-Id: Icd81a77294d9190ac6dbaa7e7d35e4dedf45e49f
Implements: blueprint list-manage-existing
Following the commit fb2c434c2461a25193067104de766fc1142a6024 in
the cinder repo the --force option to upload-to-image is ignored
by default. To enable it the config option enable_force_upload
must be set to true.
The help text for upload-to-image in the python cinderclient
should remind user that --force may not work in some cloud now.
Closes-Bug: #1611667
Change-Id: Ib56fb2016d933a9bbbcb0185c50e33d2166b34e6
Commit Ie639179c5bbbaca4de62b42b368830afcfd8f7ac introduced 'visibility'
and 'protected' params. These params should be used only with
v3.1 microversion. Also these changes break current v2 users.
This patch fixes these issues.
Closes-Bug: #1584056
Change-Id: I0574631791c475bbefdb6e7d1647a20d0759df64
Add support for Cinder API /v3 endpoint.
A couple of unit tests for /v3 endpoint were added to v3/test_shell.py
to ensure that the v3 shell works, and to also test that modules work
with:
from cinderclient.v2.availability_zones import *
syntax.
Change-Id: I6ae0ada221bebb4ab1850d9c99b10fcbb585201f
Implements: https://blueprints.launchpad.net/python-cinderclient/+spec/add-v3-endpoint-support
This path is also allowing us to delete them by name or ID
instead of only by ID.
eg: cinder --os-volume-api-version 2 type-delete test01 test02
Closes-bug: #1554794
Change-Id: I54faad2c5b60ab69f4b406310eb8059cf1e8cf76
Some extra code is present like unused variables,
unreachable code after return statement etc.
Same is removed.
Change-Id: Ifca88a19625c56ed520321ecbdd91739a304be8e
With replication v2.1 merged in cinder and the calls merged in the
client, there is no longer a need for the old calls. If these commands
are called with the newest cinder code, it fails miserably.
Basically reverts this patch: https://review.openstack.org/#/c/231708
Change-Id: I29c0565c1efe518e40c3483ceb4ca0d40cd7d0d7
Admin can now filter snapshots on the basis of tenant.
No changes are needed on server side since snapshot model contains
project_id as a column which means that it supports native filtering
by tenant (i.e, project) via SQL.
This closely follows similar functionality for volume listing added in
the change-id - fa8c7e3d84bd93cdfc3641554e10d422281ea018
DocImpact
After this patch is merged we need to regenerate the CLI reference
guide so that the added documentation for the new option
"--tenant <tenant_id>" for "cinder snapshot-list" command gets
included.
Change-Id: I0bbd8e0b4aaf25da738c67638fb497337ead312b
Co-Authored-By: wuyuting <wytdahu@gmail.com>
This adds the --cascade parameter to the volume
delete command. Using this will call the volume delete
with an additional parameter that deletes snapshots as
part of the same operation.
The name "cascade" is chosen to be somewhat generic,
so that we can extend this if desired in the future.
(And to hint at the terminology from SQL.)
Depends-On: I33d15b76d4bd0de14c635d404b2c97096c977a58
Change-Id: I05ce61e647c43f9a1e6d74444356a76e5d284673
Blueprint: del-vols-with-snaps
This changes:
$ cinder rename asdf
ERROR: Must supply either name or description. (HTTP 1)
To:
$ cinder rename asdf
ERROR: Must supply either name or description.
Affects rename, snapshot-rename, consisgroup-update,
and consisgroup-create-from-src.
(consisgroup-* previously printed HTTP 400.)
Closes-Bug: #1549020
Closes-Bug: #1549026
Change-Id: Ia920b3b75b53170789b694cbdd49100bd6a72d21
Cheesecake introduces a host based replication use case.
This change includes the changes needed to support those
implementations in the Cinder API.
Implements: blueprint replication-update
Change-Id: I74dc1a00fb4a2c05510c6159253036ac19706959
In output of cinder show command, below fields contains extra 'u'
character being unicode:
1. volume_image_metadata
2. metadata
In output of "cinder credentials", below field contains extra 'u'
1. roles
In output of "cinder qos-create", below field contains extra 'u'
1. specs
In output of "cinder qos-list", below field contains extra 'u'
1. specs
In output of "cinder extra-specs-list", below field contains extra 'u'
1. extra_specs
In output of "cinder qos-show", below field contains extra 'u'
1. specs
Change-Id: I8be32f117ddc29b087ee872ff065c175dd70b372
Closes-Bug: #1538413
Closes-Bug: #1538415
While "cinder snapshot-delete" and "cinder delete" allow multiple resources to be deleted in a single command, "cinder backup-delete" request can only delete one backup at a time. Adding this capability to backups in cinderclient. Enables "cinder backup-delete" to delete multiple backups in a single command.
With this change the command can be run as below:
cinder backup-delete <backup> [<backup>...]
DocImpact
Closes-Bug: #1543056
Implements: blueprint cli-backup-multiple-deletes
Change-Id: I767710bda3b7c358c6525c9a9f074010084e411d
The sort in command snapshot-list and backup-list
doesn't work, and they show same results.
The patch is to fix the problem, and transfer
sortby_index as None in utils.print_list.
Closes-Bug: #1536054
Change-Id: I00760fd4b395b04b95a8139224e18ea8d649d377
Word misspelling in following message:
1. shell.py
help='A unqiue identifier that represents a failover target.'
2. volumes.py
:param secondary: A unqiue identifier that represents a failover
Should change the word 'unqiue' to 'unique'.
Change-Id: I44a94b403f0bb71864d03683bdaf3b98f4d73bb1
Before, when API in cinderclient was set to v2, the issued call
used to fail with an error message, that the call is connecting
to the endpoint compatible to API v1, when other quota calls
were connecting to the proper, v2 enpoint.
Change-Id: I99a16e93ed15e3819d48d193b550c786012462d8
Closes-Bug: 1526829
Cinder list command was intended to show summary of
volumes, but currently the command shows many entries
than we expected.
This patch adds these two fixes to show volume list
more simply.
- Remove 'migration status' and 'multiattach' from
default list view.
- Add '--field' optional argument to 'list' subcommand.
This argument allows users to show only specified
entries. Unavailable fields will be ignored from
the list result.
DocImpact
Change-Id: Iad4bf76e87f84b6e57ec59d134b9413fcad16ce8
Closes-Bug: #1502639
v2 replication has been merged in cinder, but there is no way to call
the api methods. This patch allows the following methods to be called
in order to fully support v2 replication:
- os-enable_replication
- os-disable_replication
- os-list_replication_targets
- os-failover_replication
Change-Id: Ic3cf082916bdf089de05eebce456dff8cdc11f7c
Implements: blueprint replication-v2
As part of commit 0d2bf657ae5271a01e9ec84d379d17910b263b7e,
qos-key command's v2 support got broken again reintroducing
bug #1284321.
Change-Id: I30d60b060bd1b161bc96c4a529f4732b9ceef90d
Closes-Bug: 1284321
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