Make help message of execution pagination query more readable

Partially implements: blueprint pagination-execution-mitralclient

Change-Id: I8a6520a19af90a0da4557ff071810159787170c1
This commit is contained in:
Lingxian Kong 2015-11-12 12:38:43 +08:00
parent ef58b731dc
commit 28025c9bf4

View File

@ -71,32 +71,36 @@ class List(base.MistralLister):
def get_parser(self, parsed_args): def get_parser(self, parsed_args):
parser = super(List, self).get_parser(parsed_args) parser = super(List, self).get_parser(parsed_args)
parser.add_argument('--marker', parser.add_argument(
'--marker',
type=str, type=str,
help='Pagination marker for large data sets(' help='The last execution uuid of the previous page, displays list '
'workflow execution id).' 'of executions after "marker".',
'Example: mistral execution-list --marker '
'workflow_execution_id ',
default='', default='',
nargs='?') nargs='?'
parser.add_argument('--limit', )
parser.add_argument(
'--limit',
type=int, type=int,
help='Maximum number of resources to ' help='Maximum number of executions to return in a single result.',
'return in a single result.' nargs='?'
'Example: mistral execution-list --limit 5', )
nargs='?') parser.add_argument(
parser.add_argument('--sort_keys', '--sort_keys',
help='Columns to sort results by.' help='Comma-separated list of sort keys to sort results by. '
'Default: created_at. ' 'Default: created_at. '
'Example : mistral execution-list ' 'Example: mistral execution-list --sort_keys=id,description',
'--sort_keys=id,Description', default='created_at',
default='created_at', nargs='?') nargs='?'
parser.add_argument('--sort_dirs', )
help='Sorting Directions (asc/desc)' parser.add_argument(
'Default:asc.' '--sort_dirs',
'Example : mistral execution-list ' help='Comma-separated list of sort directions. Default: asc. '
'--sort_keys=id --sort_dirs=desc', 'Example: mistral execution-list --sort_keys=id,description '
default='asc', nargs='?') '--sort_dirs=asc,desc',
default='asc',
nargs='?'
)
return parser return parser