From 28025c9bf4079cebc0a529090755f96d4c1820a5 Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Thu, 12 Nov 2015 12:38:43 +0800 Subject: [PATCH] Make help message of execution pagination query more readable Partially implements: blueprint pagination-execution-mitralclient Change-Id: I8a6520a19af90a0da4557ff071810159787170c1 --- mistralclient/commands/v2/executions.py | 56 +++++++++++++------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/mistralclient/commands/v2/executions.py b/mistralclient/commands/v2/executions.py index 8a10de10..b3fd25fc 100644 --- a/mistralclient/commands/v2/executions.py +++ b/mistralclient/commands/v2/executions.py @@ -71,32 +71,36 @@ class List(base.MistralLister): def get_parser(self, parsed_args): parser = super(List, self).get_parser(parsed_args) - parser.add_argument('--marker', - type=str, - help='Pagination marker for large data sets(' - 'workflow execution id).' - 'Example: mistral execution-list --marker ' - 'workflow_execution_id ', - default='', - nargs='?') - parser.add_argument('--limit', - type=int, - help='Maximum number of resources to ' - 'return in a single result.' - 'Example: mistral execution-list --limit 5', - nargs='?') - parser.add_argument('--sort_keys', - help='Columns to sort results by.' - ' Default: created_at.' - 'Example : mistral execution-list ' - '--sort_keys=id,Description', - default='created_at', nargs='?') - parser.add_argument('--sort_dirs', - help='Sorting Directions (asc/desc)' - 'Default:asc.' - 'Example : mistral execution-list ' - '--sort_keys=id --sort_dirs=desc', - default='asc', nargs='?') + parser.add_argument( + '--marker', + type=str, + help='The last execution uuid of the previous page, displays list ' + 'of executions after "marker".', + default='', + nargs='?' + ) + parser.add_argument( + '--limit', + type=int, + help='Maximum number of executions to return in a single result.', + nargs='?' + ) + parser.add_argument( + '--sort_keys', + help='Comma-separated list of sort keys to sort results by. ' + 'Default: created_at. ' + 'Example: mistral execution-list --sort_keys=id,description', + default='created_at', + nargs='?' + ) + parser.add_argument( + '--sort_dirs', + help='Comma-separated list of sort directions. Default: asc. ' + 'Example: mistral execution-list --sort_keys=id,description ' + '--sort_dirs=asc,desc', + default='asc', + nargs='?' + ) return parser