summaryrefslogtreecommitdiff
path: root/openstackclient/volume
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Wait for volume being available to set bootable or readonly"Zuul2023-02-222-8/+66
|\
| * Wait for volume being available to set bootable or readonlymatbu2023-02-222-8/+66
| | | | | | | | | | | | | | | | This patch add a check to be sure that the volume created is in a available state before trying to set bootable or readonly flag. Story: 2002158 Change-Id: I8db71fd8cf5bd14eb67880f76d2e9135edeb3ed2
* | Merge "Fix really long help strings"Zuul2023-02-221-6/+8
|\ \
| * | Fix really long help stringsStephen Finucane2022-12-121-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Each command should have a summary line followed by a longer description, if needed. Some commands were not following this. Fix them. Change-Id: If1ce7654037d192626460f34c069ea0979919b9b Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "volume: Remove duplication from 'consistency group create' opts"Zuul2023-02-221-13/+32
|\ \ \
| * | | volume: Remove duplication from 'consistency group create' optsStephen Finucane2023-02-141-13/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The '--consistency-group-source' and '--consistency-group-snapshot' opts are unnecessarily verbose. Shorten them to '--source' and '--snapshot', respectively, maintaining aliases to avoid breaking users. Change-Id: I2b6656a8a09d953eb4406f1d4fd1e804743a8963 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Deprecate positional args for 'volume group create'Stephen Finucane2023-02-171-36/+91
| |/ |/| | | | | | | | | | | | | There are now many ways to create a new volume group, thus the positional arguments don't make sense. Deprecate them. Change-Id: Id0b212426861719db1812b7d07b82613cf591de4 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Add options to create volume group from source6.1.0whoami-rajat2023-02-171-29/+88
| | | | | | | | | | | | | | | | This patch adds ``--source-group`` and ``--group-snapshot`` options to the ``volume group create`` command to allow creating group from a source group or a group snapshot. Change-Id: I87482a5dd43c519dfdcf981635aa879914a70a5c
* | Add block storage manageable list commandswhoami-rajat2023-02-171-0/+258
| | | | | | | | | | | | | | | | | | This patch adds the ``block storage volume manageable list`` and ``block storage snapshot manageable list`` commands that allow operators to list the volumes and snapshots on a particular host or cluster for management under OpenStack. Change-Id: I328dada5a0dc4e9e44c0d51db5cf3f224e27f88f
* | Add block storage cleanup commandwhoami-rajat2023-02-171-0/+146
| | | | | | | | | | | | | | | | | | This patch adds the ``block storage cleanup`` command that allow operators to cleanup resources (volumes and snapshots) with failed operations by requesting services in other hosts in the same cluster to cleanup resources of a failed service. Change-Id: I1375223f525021db5201fa0a9f9a647d17dd01f7
* | Add block storage log level {list, set} commandswhoami-rajat2023-02-161-0/+147
| | | | | | | | | | | | | | | | | | This patch adds the ``block storage log level list`` and ``block storage log level set`` commands that allow operators to list the current log levels of cinder services and also enables them to set a particular log level. Change-Id: I16cd8084fb505a9e68a35a936ef3b8b1f3cdc712
* | Add volume revert commandwhoami-rajat2023-02-161-0/+33
| | | | | | | | | | | | This command allows users to revert a volume to a given snapshot. Change-Id: If35ee394d654f5264558a281c835affff524ca50
* | Add volume summary commandwhoami-rajat2023-01-131-0/+81
|/ | | | | | | | | This patch adds the ``volume summary`` command which shows the total size, total count and metadata of all volumes. This command is available from microversion 3.12 and the metadata info is available from microversion 3.36. Change-Id: I6472337e8b1dc91aad5fbe416673a5d5a5d5fa88
* Add test for creating volume from sourcewhoami-rajat2022-11-231-4/+9
| | | | | | | | | | | | | This patch adds a test to create a new volume from source. We also include code changes to pass the right size i.e. either size passed by the user via --size argument or the source volume size. This case is already handled at the API layer[1] but it helps being consistent with passing the right size value as in case of creating a volume from snapshot or backup. [1] https://github.com/openstack/cinder/blob/7c1a5ce7b11964da4537fd6a7d157ede646b9e94/cinder/api/v3/volumes.py#L381-L382 Change-Id: Idc71636dad6bb678fe24f19b0836d2e9bd92d7d2
* Change --size helptext to include backupwhoami-rajat2022-11-221-2/+2
| | | | | | | | | Followup from [1]. Modifying help text of --size argument to include --backup option. [1] https://review.opendev.org/c/openstack/python-openstackclient/+/864893 Change-Id: I12cf60079ebcfe1cd059602fbfc1a13c8fe86803
* Add option to create volume from backupwhoami-rajat2022-11-211-3/+26
| | | | | | | | Support for creating a volume from backup was added in microversio 3.47. This patch adds a --backup option to the volume create command to add that support. Change-Id: Ib26d2d335475d9aacbf77c0fd7b7cda2ba743943
* Docstring fix for CreateVolumeAttachment classJadon Naas2022-11-101-1/+1
| | | | | | | | | | | The command "volume attachment create" has a typo in the docstring. The docstring says to use "server add volume", but the command is actually "server volume add". This change fixes the typo in the docstring. Task: 46781 Story: 2010401 Change-Id: Ie19a24ead100dd9177669653a7a9997772ef4538
* volume: Volume names are optionalStephen Finucane2022-09-141-1/+2
| | | | | | | Who knew? Change-Id: I1c1a811c0db59250e8a20a87f25c2662bc3ab3e8 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "volume: Correct output of 'volume attachment create'"Zuul2022-06-271-7/+16
|\
| * volume: Correct output of 'volume attachment create'Stephen Finucane2022-05-161-7/+16
| | | | | | | | | | | | | | | | | | When adding these, we missed that the underlying cinder library call actually returns a dictionary and not a Resource-based object. This requires slightly different handling. Fix this. Change-Id: Ie065fe4198ae1238830cb619220e856390d4cb6e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Refactor "volume backup restore" command"Zuul2022-06-202-13/+50
|\ \ | |/ |/|
| * Refactor "volume backup restore" commandHuanxuan Ao2022-03-102-13/+50
| | | | | | | | | | | | | | | | Make the positional argument "volume" optional and add a "--force" option (volume v2 only) to the "volume backup restore" command. Closes-Bug: #1597189 Change-Id: If944e10158bd18e8331be63e96187a23e23095d7
* | Merge "Fix typos"Zuul2022-05-162-2/+2
|\ \
| * | Fix typosCyril Roelandt2021-10-262-2/+2
| |/ | | | | | | Change-Id: Idd502c8df21da79ff3b9339870f38378f5337879
* | volume: Add 'block storage resource filter list' commandStephen Finucane2022-05-131-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are based on the 'cinder list-filters' command, which accepts an optional '--resource {resource}' option to limit the listed filters to a single resource type. block storage resource filter list block storage resource filter show We used the 'block storage resource filter' terminology rather than simply 'resource filter' to highlight the fact that this is specific to the block storage service. Note that while this feature is a bit weird, good documentation can be found at [1]. [1] https://docs.openstack.org/cinder/latest/admin/generalized_filters.html Change-Id: I21e7c0ea427aef1f6665394d4b8e9a1f30d6dbb1 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | volume: Add 'block storage cluster *' commandsStephen Finucane2022-05-131-0/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These mirror the 'cinder cluster-*' commands, with arguments copied across essentially verbatim. The only significant departure is the replacement of "tenant" terminology with "project". block storage cluster list block storage cluster set block storage cluster show We used the 'block storage' terminology rather than simply 'volume' to allow us to start distinguishing between the volume service and a volume resource. Change-Id: I9105a9e4a139af4929e3b1f3a6de6c9a53e0b598 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "volume: fix backup list of deleted volume"Zuul2022-04-111-3/+11
|\ \
| * | volume: fix backup list of deleted volumeJan Hartkopf2022-03-081-3/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to list backups of a deleted volume with --volume, openstackclient fails because the volume does not exist. However, for listing a volume's backups, the volume itself does not need to be present. Fix this issue by allowing the volume of the requested backups to not exist. Story: 2009901 Task: 44716 Change-Id: Iea1a567151f427fa0e1ccff3af5cbeab620defcd Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
* | volume list: don't fail when there's no compute serviceDr. Jens Harbott2022-02-171-1/+1
|/ | | | | | | | | | There may be deployments that only have a volume service but no compute service, possibly as an intermediate step during the initial setup. Don't fail the "volume list" command when no compute client can be initiated. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Idef77bdc8753a456a4c431b0385318dff6581a65
* Merge "volume: Add 'volume transfer request create --(no-)snapshots' option"Zuul2021-08-261-0/+36
|\
| * volume: Add 'volume transfer request create --(no-)snapshots' optionStephen Finucane2021-07-131-0/+36
| | | | | | | | | | | | | | | | | | This closes a gap with cinderclient's 'transfer-create' command. Change-Id: I7386a7be15c0e3ee87abbcfc2275ba8524c10ff8 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2009054 Task: 42831
* | volume: Add missing 'volume list --offset' parameterStephen Finucane2021-07-271-0/+10
|/ | | | | | | | | | | | | Looking at the code for the ancient v1 cinder API, we see that this supported offset-style pagination [1][2][3]. Add this parameter, simplifying a future patch to standardize pagination across OSC. [1] https://github.com/openstack/cinder/blob/juno-eol/cinder/api/v1/volumes.py#L259 [2] https://github.com/openstack/cinder/blob/juno-eol/cinder/api/v1/volumes.py#L292 [3] https://github.com/openstack/cinder/blob/juno-eol/cinder/api/common.py#L120 Change-Id: Ifec208ea9ed7afb4bebced6132abb96a3af034b5 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add more missing 'volume backup *' optionsStephen Finucane2021-06-101-2/+85
| | | | | | | | Add an additional '--no-property' option to the 'volume backup set' command, along with a brand spanking new 'volume backup unset' command. Change-Id: Id7ca925e0ada03e259f0ecaf3e02af11c900641e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add 'volume group snapshot *' commandsStephen Finucane2021-06-101-0/+234
| | | | | | | | | | | | | | These mirror the 'cinder group-snapshot-*' commands, with arguments copied across essentially verbatim. The only significant departure is the replacement of "tenant" terminology with "project". volume group snapshot create volume group snapshot delete volume group snapshot list volume group snapshot show Change-Id: Ia5084749b7c1a5a936fd6d6e8d89b9b80969f68c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add 'volume group type *' commandsStephen Finucane2021-06-031-0/+410
| | | | | | | | | | | | | | | | | | These mirror the 'cinder group-type-*' commands, with arguments copied across essentially verbatim. The only significant departure is the merging of some commands, such as 'group-type-default' and 'group-type-list' into 'group type list', and 'group-type-update' and 'group-type-key' into 'group type set/unset'. volume group type create volume group type delete volume group type list volume group type show volume group type set volume group type unset Change-Id: Iee6ee2f1f276e6ef6f75a74f8f2980f14c0d5e2f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add 'volume group *' commandsStephen Finucane2021-06-031-0/+506
| | | | | | | | | | | | | | | | | | | These mirror the 'cinder group-*' commands, with arguments copied across essentially verbatim. The only significant departures are the replacement of "tenant" terminology with "project" and the merging of the various volume group replication action commands into the parent volume group (e.g. 'openstack volume group set --enable-replication' instead of 'cinder group enable-replication') volume group create volume group delete volume group list volume group show volume group set volume group failover Change-Id: I3b2c0cb92b8a53cc1c0cefa3313b80f59c9e5835 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add missing 'volume backup *' optionsStephen Finucane2021-06-031-48/+171
| | | | | | | | | | | | | | | | | | | Add a couple of missing options to each command: volume backup create --no-incremental --property --availability-zone volume backup set --property Most of these are version dependent so we add the relevant version checks as part of this work. While we're here, we also make the formatting a little easier on the eye in places. Change-Id: I328d5c981cb32b2ee9a4b1bd43aa36b22347ff63 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Add 'volume message *' commandsStephen Finucane2021-06-031-0/+165
| | | | | | | | | | | | | This patch implements the necessary commands to utilize the Messages API introduced in Cinder API version 3.3. Version 3.5 built upon this by implementing pagination support for these commands which is present in this patch as well. volume message get volume message list volume message delete Change-Id: I64aa0b4a8d4468baa8c63e5e30ee31de68df999d
* volume: Add 'volume attachment *' commandsStephen Finucane2021-06-031-0/+511
| | | | | | | | | | | | | | | | | | | | These mirror the 'cinder attachment-*' commands, with arguments copied across essentially verbatim. The only significant departure is the replacement of "tenant" terminology with "project". volume attachment create volume attachment delete volume attachment list volume attachment complete volume attachment set volume attachment show Full support for filtering is deferred for now since that's a more complicated change that requires additional commands be added first. TODOs are included to this effect. Change-Id: If47c2b56fe65ee2cee07c000d6ae3688d5ef3b42 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* volume: Allow more versionsStephen Finucane2021-06-031-5/+50
| | | | | | | | | Copy the API version checks from the 'openstackclient.compute.client' module. These will only be necessary until we migrate everything to SDK but it's very helpful until then. Change-Id: I2d9c68db5bf891ffa25fd5a7fc9e8953e44b73ab Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Add check for cinderclient.v2 supportBrian Rosmaita2021-05-201-1/+5
| | | | | | | | | | Block Storage API v2 support is being removed from the cinderclient during the Xena development cycle [0], so add a check to determine whether the available cinderclient has v2 support. [0] https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Removing_the_Block_Storage_API_v2 Change-Id: Id54da1704d94526071f500c36a6e38d6d84aa7b8
* Allow to resize in-use volumesDmitriy Rabotyagov2020-11-112-6/+15
| | | | | | | | | Since Pike (microversion 3.42) [1] Cinder API allows to resize in-use volumes. So no reason not to implement it in CLI. [1] https://opendev.org/openstack/cinder/src/branch/master/cinder/api/openstack/rest_api_version_history.rst#user-content-section-39 Change-Id: I22462a56d261e0a100aac3f27af7be47223edec0
* Merge "Switch image to use SDK"Zuul2020-03-251-3/+2
|\
| * Switch image to use SDKArtem Goncharov2020-03-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a work to switch OSC from using glanceclient to OpenStackSDK. With this change only v2 is using OpenStackSDK. V1 is still using glanceclient and will be switched in a separate change. Remove the direct depend on keystoneauth- let that flow through openstacksdk. Depends-on: https://review.opendev.org/#/c/698972 Change-Id: I36f292fb70c98f6e558f58be55d533d979c47ca7
* | Merge "Fix faulthy state argument choice"5.1.0Zuul2020-03-243-6/+6
|\ \
| * | Fix faulthy state argument choiceBram Verschueren2019-12-193-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct state name for a failing volume snapshot deletion is 'error_deleting' instead of 'error-deleting'. [1] [1] https://opendev.org/openstack/cinder/src/commit/89d6a5042fcb2ede5a0b1112d72fae805ea52fcd/cinder/objects/fields.py#L126 Task: #37844 Story: #2007037 Change-Id: Ia99900ece4f1cd29769b22ddaa3965789d719556
* | | Honor endpoint override from config for volumeMonty Taylor2020-03-241-0/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm guessing we should do this for everyone, but we have volume on the brain right now. Rackspace is in the weird situation where they do support v2 but only have v1 in the catalog (wut) So we need to override the block-storage enpdoint by config. To do that, we need to actually honor the config setting over here in OSC. NOTE: We need to systemically overhaul how we're injesting config over here - because there's too much variation. But we can leave that for another day. Story: 2007459 Task: 39137 Change-Id: Ifddf1ddd5abaa768ab18049c09d18bc269f3a4f5
* | Replace six.iteritems() with .items()lihaijing2020-01-0915-48/+33
|/ | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Default to Cinder v3 APISean McGinnis2019-09-091-1/+1
| | | | | | | | This switches the default Cinder API version to v3 to prepare for v2 going away. Change-Id: Icca1512b715409e3001c0fd2d1ea663d5e71ec02 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Merge "Use cliff formattable columns in volume v2 commands"Zuul2019-06-236-69/+169
|\