Change "--sort" description in help message

In Cinder server project, class ManageResource just supports
'size' and 'refrence' sort key. So change "--sort" description
in manageable-list and snapshot-manageable-list commands help
message.

Change-Id: Ie07bb73a9b9f2ef1a2a1e90834fcbe1f53cb562d
Closes-Bug: #1657988
This commit is contained in:
lihaijing 2017-03-15 14:34:03 +08:00
parent 3b60eba9aa
commit 4d66365bbd
2 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,7 @@ from cinderclient import utils
SORT_DIR_VALUES = ('asc', 'desc')
SORT_KEY_VALUES = ('id', 'status', 'size', 'availability_zone', 'name',
'bootable', 'created_at', 'reference')
SORT_MANAGEABLE_KEY_VALUES = ('size', 'reference')
# Mapping of client keys to actual sort keys
SORT_KEY_MAPPINGS = {'name': 'display_name'}
# Additional sort keys for resources

View File

@ -733,7 +733,7 @@ def do_cluster_disable(cs, args):
help=(('Comma-separated list of sort keys and directions in the '
'form of <key>[:<asc|desc>]. '
'Valid keys: %s. '
'Default=None.') % ', '.join(base.SORT_KEY_VALUES)))
'Default=None.') % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
def do_manageable_list(cs, args):
"""Lists all manageable volumes."""
detailed = strutils.bool_from_string(args.detailed)
@ -1079,7 +1079,7 @@ def do_service_list(cs, args):
help=(('Comma-separated list of sort keys and directions in the '
'form of <key>[:<asc|desc>]. '
'Valid keys: %s. '
'Default=None.') % ', '.join(base.SORT_KEY_VALUES)))
'Default=None.') % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
def do_snapshot_manageable_list(cs, args):
"""Lists all manageable snapshots."""
detailed = strutils.bool_from_string(args.detailed)