diff options
author | Andreas Jaeger <aj@suse.de> | 2014-02-10 19:11:09 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2014-02-10 19:26:11 +0100 |
commit | c676536d95b4606079e6eef3f65fef0489f83830 (patch) | |
tree | 5a4fdbc4303269b4cf6b7e95c0db2143f0564730 | |
parent | a2ff9eaeed983ff3bacf60ce32c6bc1e95cff5b5 (diff) | |
download | python-heatclient-c676536d95b4606079e6eef3f65fef0489f83830.tar.gz |
Improve help strings
Follow oslo.config style guide for help strings better to create
consistent help strings:
* Finish help strings with "."
* Add missing spaces between words
Change-Id: I6191842c253b254768bcc5c22fcfb435296f3945
Co-Authored-By: Shilla Saebi<shilla.saebi@gmail.com>
-rw-r--r-- | heatclient/shell.py | 44 | ||||
-rw-r--r-- | heatclient/v1/shell.py | 42 |
2 files changed, 43 insertions, 43 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py index c6fa947..4e5444a 100644 --- a/heatclient/shell.py +++ b/heatclient/shell.py @@ -52,21 +52,21 @@ class HeatShell(object): parser.add_argument('--version', action='version', version=heatclient.__version__, - help="Shows the client version and exits") + help="Shows the client version and exits.") parser.add_argument('-d', '--debug', default=bool(utils.env('HEATCLIENT_DEBUG')), action='store_true', - help='Defaults to env[HEATCLIENT_DEBUG]') + help='Defaults to env[HEATCLIENT_DEBUG].') parser.add_argument('-v', '--verbose', default=False, action="store_true", - help="Print more verbose output") + help="Print more verbose output.") parser.add_argument('-k', '--insecure', default=False, action='store_true', - help="Explicitly allow the client to perform" + help="Explicitly allow the client to perform " "\"insecure\" SSL (https) requests. The server's " "certificate will not be verified against any " "certificate authorities. " @@ -74,8 +74,8 @@ class HeatShell(object): parser.add_argument('--cert-file', help='Path of certificate file to use in SSL ' - 'connection. This file can optionally be prepended' - 'with the private key.') + 'connection. This file can optionally be ' + 'prepended with the private key.') parser.add_argument('--key-file', help='Path of client key to use in SSL connection.' @@ -90,53 +90,53 @@ class HeatShell(object): parser.add_argument('--timeout', default=600, - help='Number of seconds to wait for a response') + help='Number of seconds to wait for a response.') parser.add_argument('--os-username', default=utils.env('OS_USERNAME'), - help='Defaults to env[OS_USERNAME]') + help='Defaults to env[OS_USERNAME].') parser.add_argument('--os_username', help=argparse.SUPPRESS) parser.add_argument('--os-password', default=utils.env('OS_PASSWORD'), - help='Defaults to env[OS_PASSWORD]') + help='Defaults to env[OS_PASSWORD].') parser.add_argument('--os_password', help=argparse.SUPPRESS) parser.add_argument('--os-tenant-id', default=utils.env('OS_TENANT_ID'), - help='Defaults to env[OS_TENANT_ID]') + help='Defaults to env[OS_TENANT_ID].') parser.add_argument('--os_tenant_id', help=argparse.SUPPRESS) parser.add_argument('--os-tenant-name', default=utils.env('OS_TENANT_NAME'), - help='Defaults to env[OS_TENANT_NAME]') + help='Defaults to env[OS_TENANT_NAME].') parser.add_argument('--os_tenant_name', help=argparse.SUPPRESS) parser.add_argument('--os-auth-url', default=utils.env('OS_AUTH_URL'), - help='Defaults to env[OS_AUTH_URL]') + help='Defaults to env[OS_AUTH_URL].') parser.add_argument('--os_auth_url', help=argparse.SUPPRESS) parser.add_argument('--os-region-name', default=utils.env('OS_REGION_NAME'), - help='Defaults to env[OS_REGION_NAME]') + help='Defaults to env[OS_REGION_NAME].') parser.add_argument('--os_region_name', help=argparse.SUPPRESS) parser.add_argument('--os-auth-token', default=utils.env('OS_AUTH_TOKEN'), - help='Defaults to env[OS_AUTH_TOKEN]') + help='Defaults to env[OS_AUTH_TOKEN].') parser.add_argument('--os_auth_token', help=argparse.SUPPRESS) @@ -144,33 +144,33 @@ class HeatShell(object): parser.add_argument('--os-no-client-auth', default=utils.env('OS_NO_CLIENT_AUTH'), action='store_true', - help="Do not contact keystone for a token.\ - Defaults to env[OS_NO_CLIENT_AUTH]") + help="Do not contact keystone for a token. " + "Defaults to env[OS_NO_CLIENT_AUTH].") parser.add_argument('--heat-url', default=utils.env('HEAT_URL'), - help='Defaults to env[HEAT_URL]') + help='Defaults to env[HEAT_URL].') parser.add_argument('--heat_url', help=argparse.SUPPRESS) parser.add_argument('--heat-api-version', default=utils.env('HEAT_API_VERSION', default='1'), - help='Defaults to env[HEAT_API_VERSION] or 1') + help='Defaults to env[HEAT_API_VERSION] or 1.') parser.add_argument('--heat_api_version', help=argparse.SUPPRESS) parser.add_argument('--os-service-type', default=utils.env('OS_SERVICE_TYPE'), - help='Defaults to env[OS_SERVICE_TYPE]') + help='Defaults to env[OS_SERVICE_TYPE].') parser.add_argument('--os_service_type', help=argparse.SUPPRESS) parser.add_argument('--os-endpoint-type', default=utils.env('OS_ENDPOINT_TYPE'), - help='Defaults to env[OS_ENDPOINT_TYPE]') + help='Defaults to env[OS_ENDPOINT_TYPE].') parser.add_argument('--os_endpoint_type', help=argparse.SUPPRESS) @@ -186,7 +186,7 @@ class HeatShell(object): parser.add_argument('--include-password', default=bool(utils.env('HEAT_INCLUDE_PASSWORD')), action='store_true', - help='Send os-username and os-password to heat') + help='Send os-username and os-password to heat.') return parser @@ -401,7 +401,7 @@ class HeatShell(object): print(' '.join(commands | options)) @utils.arg('command', metavar='<subcommand>', nargs='?', - help='Display help for <subcommand>') + help='Display help for <subcommand>.') def do_help(self, args): """Display help about this program or one of its subcommands.""" if getattr(args, 'command', None): diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index 41bbff5..7b5a73c 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -29,12 +29,12 @@ import heatclient.exc as exc @utils.arg('-u', '--template-url', metavar='<URL>', help='URL of template.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-c', '--create-timeout', metavar='<TIMEOUT>', default=60, type=int, - help='Stack creation timeout in minutes. Default: 60') + help='Stack creation timeout in minutes. Default: 60.') @utils.arg('-r', '--enable-rollback', default=False, action="store_true", - help='Enable rollback on create/update failure') + help='Enable rollback on create/update failure.') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' @@ -54,12 +54,12 @@ def do_create(hc, args): @utils.arg('-u', '--template-url', metavar='<URL>', help='URL of template.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-c', '--create-timeout', metavar='<TIMEOUT>', default=60, type=int, - help='Stack creation timeout in minutes. Default: 60') + help='Stack creation timeout in minutes. Default: 60.') @utils.arg('-r', '--enable-rollback', default=False, action="store_true", - help='Enable rollback on create/update failure') + help='Enable rollback on create/update failure.') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' @@ -177,11 +177,11 @@ def do_stack_show(hc, args): @utils.arg('-u', '--template-url', metavar='<URL>', help='URL of template.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' - 'separated by semicolon.', + 'separated by a semicolon.', action='append') @utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to update.') @@ -197,11 +197,11 @@ def do_update(hc, args): @utils.arg('-u', '--template-url', metavar='<URL>', help='URL of template.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' - 'separated by semicolon.', + 'separated by a semicolon.', action='append') @utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to update.') @@ -237,12 +237,12 @@ def do_list(hc): @utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Filter parameters to apply on returned stacks. ' 'This can be specified multiple times, or once with parameters ' - 'separated by semicolon.', + 'separated by a semicolon.', action='append') @utils.arg('-l', '--limit', metavar='<LIMIT>', - help='Limit the number of stacks returned') + help='Limit the number of stacks returned.') @utils.arg('-m', '--marker', metavar='<ID>', - help='Only return stacks that appear after the given stack ID') + help='Only return stacks that appear after the given stack ID.') def do_stack_list(hc, args=None): '''List the user's stacks.''' kwargs = {} @@ -306,11 +306,11 @@ def do_template_show(hc, args): @utils.arg('-e', '--environment-file', metavar='<FILE or URL>', help='Path to the environment.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values to validate. ' 'This can be specified multiple times, or once with parameters ' - 'separated by semicolon.', + 'separated by a semicolon.', action='append') def do_validate(hc, args): '''DEPRECATED! Use template-validate instead.''' @@ -324,11 +324,11 @@ def do_validate(hc, args): @utils.arg('-e', '--environment-file', metavar='<FILE or URL>', help='Path to the environment.') @utils.arg('-o', '--template-object', metavar='<URL>', - help='URL to retrieve template object (e.g from swift)') + help='URL to retrieve template object (e.g. from swift).') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values to validate. ' 'This can be specified multiple times, or once with parameters ' - 'separated by semicolon.', + 'separated by a semicolon.', action='append') def do_template_validate(hc, args): '''Validate a template with parameters.''' @@ -405,7 +405,7 @@ def do_resource_show(hc, args): @utils.arg('resource', metavar='<RESOURCE>', help='Name of the resource to generate a template for.') @utils.arg('-F', '--format', metavar='<FORMAT>', - help="The template output format, one of: %s" + help="The template output format, one of: %s." % ', '.join(utils.supported_formats.keys())) def do_resource_template(hc, args): '''Generate a template based on a resource.''' @@ -441,7 +441,7 @@ def do_resource_metadata(hc, args): @utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to show the events for.') @utils.arg('-r', '--resource', metavar='<RESOURCE>', - help='Name of the resource to filter events by') + help='Name of the resource to filter events by.') def do_event_list(hc, args): '''List events for a stack.''' fields = {'stack_id': args.id, @@ -468,7 +468,7 @@ def do_event_list(hc, args): @utils.arg('resource', metavar='<RESOURCE>', help='Name of the resource the event belongs to.') @utils.arg('event', metavar='<EVENT>', - help='ID of event to display details for') + help='ID of event to display details for.') def do_event(hc, args): '''DEPRECATED! Use event-show instead.''' do_event_show(hc, args) @@ -479,7 +479,7 @@ def do_event(hc, args): @utils.arg('resource', metavar='<RESOURCE>', help='Name of the resource the event belongs to.') @utils.arg('event', metavar='<EVENT>', - help='ID of event to display details for') + help='ID of event to display details for.') def do_event_show(hc, args): '''Describe the event.''' fields = {'stack_id': args.id, |