Merge "Fix faulthy state argument choice"
This commit is contained in:
commit
81dcc91214
@ -115,7 +115,7 @@ List volume snapshots
|
||||
.. option:: --status <status>
|
||||
|
||||
Filters results by a status.
|
||||
('available', 'error', 'creating', 'deleting' or 'error-deleting')
|
||||
('available', 'error', 'creating', 'deleting' or 'error_deleting')
|
||||
|
||||
.. option:: --name <name>
|
||||
|
||||
|
@ -121,6 +121,24 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
||||
cmd_output["size"],
|
||||
)
|
||||
self.wait_for_status('volume snapshot', name2, 'available')
|
||||
|
||||
raw_output = self.openstack(
|
||||
'volume snapshot set ' +
|
||||
'--state error_deleting ' +
|
||||
name2
|
||||
)
|
||||
self.assertOutput('', raw_output)
|
||||
|
||||
# Test list --long, --status
|
||||
cmd_output = json.loads(self.openstack(
|
||||
'volume snapshot list -f json ' +
|
||||
'--long ' +
|
||||
'--status error_deleting'
|
||||
))
|
||||
names = [x["Name"] for x in cmd_output]
|
||||
self.assertNotIn(name1, names)
|
||||
self.assertIn(name2, names)
|
||||
|
||||
raw_output = self.openstack(
|
||||
'volume snapshot set ' +
|
||||
'--state error ' +
|
||||
|
@ -174,10 +174,10 @@ class ListVolumeSnapshot(command.Lister):
|
||||
'--status',
|
||||
metavar='<status>',
|
||||
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',
|
||||
|
@ -128,7 +128,7 @@ class ListConsistencyGroupSnapshot(command.Lister):
|
||||
'--status',
|
||||
metavar="<status>",
|
||||
choices=['available', 'error', 'creating', 'deleting',
|
||||
'error-deleting'],
|
||||
'error_deleting'],
|
||||
help=_('Filters results by a status ("available", "error", '
|
||||
'"creating", "deleting" or "error_deleting")')
|
||||
)
|
||||
|
@ -229,10 +229,10 @@ class ListVolumeSnapshot(command.Lister):
|
||||
'--status',
|
||||
metavar='<status>',
|
||||
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',
|
||||
@ -344,7 +344,7 @@ class SetVolumeSnapshot(command.Command):
|
||||
'--state',
|
||||
metavar='<state>',
|
||||
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 '
|
||||
|
Loading…
Reference in New Issue
Block a user