From 69870ae439f18863979949f5728543a0fb1cbe83 Mon Sep 17 00:00:00 2001 From: Bram Verschueren Date: Fri, 13 Dec 2019 11:13:54 +0100 Subject: Fix faulthy state argument choice 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 --- openstackclient/volume/v1/volume_snapshot.py | 4 ++-- openstackclient/volume/v2/consistency_group_snapshot.py | 2 +- openstackclient/volume/v2/volume_snapshot.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'openstackclient/volume') diff --git a/openstackclient/volume/v1/volume_snapshot.py b/openstackclient/volume/v1/volume_snapshot.py index 50f81771..bfe249f5 100644 --- a/openstackclient/volume/v1/volume_snapshot.py +++ b/openstackclient/volume/v1/volume_snapshot.py @@ -175,10 +175,10 @@ class ListVolumeSnapshot(command.Lister): '--status', metavar='', choices=['available', 'error', 'creating', 'deleting', - 'error-deleting'], + 'error_deleting'], help=_("Filters results by a status. " "('available', 'error', 'creating', 'deleting'" - " or 'error-deleting')") + " or 'error_deleting')") ) parser.add_argument( '--volume', diff --git a/openstackclient/volume/v2/consistency_group_snapshot.py b/openstackclient/volume/v2/consistency_group_snapshot.py index 540deb01..3cba4eca 100644 --- a/openstackclient/volume/v2/consistency_group_snapshot.py +++ b/openstackclient/volume/v2/consistency_group_snapshot.py @@ -129,7 +129,7 @@ class ListConsistencyGroupSnapshot(command.Lister): '--status', metavar="", choices=['available', 'error', 'creating', 'deleting', - 'error-deleting'], + 'error_deleting'], help=_('Filters results by a status ("available", "error", ' '"creating", "deleting" or "error_deleting")') ) diff --git a/openstackclient/volume/v2/volume_snapshot.py b/openstackclient/volume/v2/volume_snapshot.py index 2b26ae32..6cbd1156 100644 --- a/openstackclient/volume/v2/volume_snapshot.py +++ b/openstackclient/volume/v2/volume_snapshot.py @@ -230,10 +230,10 @@ class ListVolumeSnapshot(command.Lister): '--status', metavar='', choices=['available', 'error', 'creating', 'deleting', - 'error-deleting'], + 'error_deleting'], help=_("Filters results by a status. " "('available', 'error', 'creating', 'deleting'" - " or 'error-deleting')") + " or 'error_deleting')") ) parser.add_argument( '--volume', @@ -345,7 +345,7 @@ class SetVolumeSnapshot(command.Command): '--state', metavar='', choices=['available', 'error', 'creating', 'deleting', - 'error-deleting'], + 'error_deleting'], help=_('New snapshot state. ("available", "error", "creating", ' '"deleting", or "error_deleting") (admin only) ' '(This option simply changes the state of the snapshot ' -- cgit v1.2.1