Enable pep8 E128 test
Enable E128 continuation line under-indented for visual indent Change-Id: If662f729e7aacdd439b38c5e5630d74afefebcc6
This commit is contained in:
parent
2cef6de886
commit
ec2530b975
@ -49,19 +49,19 @@ class HeatShell(object):
|
||||
# they should be provided by python-keystoneclient. We will need to
|
||||
# refactor this code once this functionality is avaible in
|
||||
# python-keystoneclient.
|
||||
parser.add_argument('-k', '--insecure',
|
||||
default=False,
|
||||
action='store_true',
|
||||
parser.add_argument(
|
||||
'-k', '--insecure', default=False, action='store_true',
|
||||
help=_('Explicitly allow heatclient to perform '
|
||||
'\"insecure SSL\" (https) requests. The server\'s '
|
||||
'certificate will not be verified against any '
|
||||
'certificate authorities. This option should '
|
||||
'be used with caution.'))
|
||||
'\"insecure SSL\" (https) requests. '
|
||||
'The server\'s certificate will not be verified '
|
||||
'against any certificate authorities. '
|
||||
'This option should be used with caution.'))
|
||||
|
||||
parser.add_argument('--os-cert',
|
||||
help=_('Path of certificate file to use in SSL '
|
||||
'connection. This file can optionally be '
|
||||
'prepended with the private key.'))
|
||||
parser.add_argument(
|
||||
'--os-cert',
|
||||
help=_('Path of certificate file to use in SSL connection. '
|
||||
'This file can optionally be prepended with '
|
||||
'the private key.'))
|
||||
|
||||
# for backward compatibility only
|
||||
parser.add_argument('--cert-file',
|
||||
@ -72,7 +72,8 @@ class HeatShell(object):
|
||||
parser.add_argument('--os-key',
|
||||
help=_('Path of client key to use in SSL '
|
||||
'connection. This option is not necessary '
|
||||
'if your key is prepended to your cert file.'))
|
||||
'if your key is prepended to your cert '
|
||||
'file.'))
|
||||
|
||||
parser.add_argument('--key-file',
|
||||
dest='os_key',
|
||||
@ -334,17 +335,17 @@ class HeatShell(object):
|
||||
self._append_global_identity_args(parser)
|
||||
|
||||
if osprofiler_profiler:
|
||||
parser.add_argument('--profile',
|
||||
parser.add_argument(
|
||||
'--profile',
|
||||
metavar='HMAC_KEY',
|
||||
help=_('HMAC key to use for encrypting '
|
||||
'context data for performance profiling of '
|
||||
'operation. This key should be the value of '
|
||||
'HMAC key configured in osprofiler middleware '
|
||||
'in heat, it is specified in the paste '
|
||||
'configuration (/etc/heat/api-paste.ini). '
|
||||
'Without the key, profiling will not be '
|
||||
'triggered even if osprofiler is enabled '
|
||||
'on server side.'))
|
||||
help=_('HMAC key to use for encrypting context data '
|
||||
'for performance profiling of operation. '
|
||||
'This key should be the value of HMAC key '
|
||||
'configured in osprofiler middleware in heat, '
|
||||
'it is specified in the paste configuration '
|
||||
'(/etc/heat/api-paste.ini). Without the key, '
|
||||
'profiling will not be triggered '
|
||||
'even if osprofiler is enabled on server side.'))
|
||||
return parser
|
||||
|
||||
def get_subcommand_parser(self, version):
|
||||
@ -546,23 +547,23 @@ class HeatShell(object):
|
||||
return 0
|
||||
|
||||
if not args.os_username and not args.os_auth_token:
|
||||
raise exc.CommandError(_("You must provide a username via"
|
||||
" either --os-username or env[OS_USERNAME]"
|
||||
" or a token via --os-auth-token or"
|
||||
" env[OS_AUTH_TOKEN]"))
|
||||
raise exc.CommandError(_("You must provide a username via either "
|
||||
"--os-username or env[OS_USERNAME] "
|
||||
"or a token via --os-auth-token or "
|
||||
"env[OS_AUTH_TOKEN]"))
|
||||
|
||||
if not args.os_password and not args.os_auth_token:
|
||||
raise exc.CommandError(_("You must provide a password via"
|
||||
" either --os-password or env[OS_PASSWORD]"
|
||||
" or a token via --os-auth-token or"
|
||||
" env[OS_AUTH_TOKEN]"))
|
||||
raise exc.CommandError(_("You must provide a password via either "
|
||||
"--os-password or env[OS_PASSWORD] "
|
||||
"or a token via --os-auth-token or "
|
||||
"env[OS_AUTH_TOKEN]"))
|
||||
|
||||
if args.os_no_client_auth:
|
||||
if not args.heat_url:
|
||||
raise exc.CommandError(_("If you specify --os-no-client-auth"
|
||||
" you must also specify a Heat API URL"
|
||||
" via either --heat-url or"
|
||||
" env[HEAT_URL]"))
|
||||
raise exc.CommandError(_("If you specify --os-no-client-auth "
|
||||
"you must also specify a Heat API "
|
||||
"URL via either --heat-url or "
|
||||
"env[HEAT_URL]"))
|
||||
else:
|
||||
# Tenant/project name or ID is needed to make keystoneclient
|
||||
# retrieve a service catalog, it's not required if
|
||||
@ -570,20 +571,18 @@ class HeatShell(object):
|
||||
|
||||
if not (args.os_tenant_id or args.os_tenant_name or
|
||||
args.os_project_id or args.os_project_name):
|
||||
raise exc.CommandError(_("You must provide a tenant id via"
|
||||
" either --os-tenant-id or"
|
||||
" env[OS_TENANT_ID] or a tenant name"
|
||||
" via either --os-tenant-name or"
|
||||
" env[OS_TENANT_NAME] or a project id"
|
||||
" via either --os-project-id or"
|
||||
" env[OS_PROJECT_ID] or a project"
|
||||
" name via either --os-project-name or"
|
||||
" env[OS_PROJECT_NAME]"))
|
||||
raise exc.CommandError(
|
||||
_("You must provide a tenant id via either "
|
||||
"--os-tenant-id or env[OS_TENANT_ID] or a tenant name "
|
||||
"via either --os-tenant-name or env[OS_TENANT_NAME] "
|
||||
"or a project id via either --os-project-id or "
|
||||
"env[OS_PROJECT_ID] or a project name via "
|
||||
"either --os-project-name or env[OS_PROJECT_NAME]"))
|
||||
|
||||
if not args.os_auth_url:
|
||||
raise exc.CommandError(_("You must provide an auth url via"
|
||||
" either --os-auth-url or via"
|
||||
" env[OS_AUTH_URL]"))
|
||||
raise exc.CommandError(_("You must provide an auth url via "
|
||||
"either --os-auth-url or via "
|
||||
"env[OS_AUTH_URL]"))
|
||||
|
||||
kwargs = {
|
||||
'insecure': args.insecure,
|
||||
|
@ -72,8 +72,8 @@ def _authenticated_fetcher(hc):
|
||||
help=_('URL to retrieve template object (e.g. from swift).'))
|
||||
@utils.arg('-c', '--create-timeout', metavar='<TIMEOUT>',
|
||||
type=int,
|
||||
help=_('Stack creation timeout in minutes.'
|
||||
' DEPRECATED use %(arg)s instead.')
|
||||
help=_('Stack creation timeout in minutes. '
|
||||
'DEPRECATED use %(arg)s instead.')
|
||||
% {'arg': '--timeout'})
|
||||
@utils.arg('-t', '--timeout', metavar='<TIMEOUT>',
|
||||
type=int,
|
||||
@ -82,8 +82,8 @@ def _authenticated_fetcher(hc):
|
||||
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 '
|
||||
'separated by a semicolon.'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by a semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
|
||||
help=_('Parameter values from file used to create the stack. '
|
||||
@ -174,8 +174,8 @@ def hooks_to_env(env, arg_hooks, hook):
|
||||
action='append')
|
||||
@utils.arg('-c', '--create-timeout', metavar='<TIMEOUT>',
|
||||
type=int,
|
||||
help=_('Stack creation timeout in minutes.'
|
||||
' DEPRECATED use %(arg)s instead.')
|
||||
help=_('Stack creation timeout in minutes. '
|
||||
'DEPRECATED use %(arg)s instead.')
|
||||
% {'arg': '--timeout'})
|
||||
@utils.arg('-t', '--timeout', metavar='<TIMEOUT>',
|
||||
type=int,
|
||||
@ -185,8 +185,8 @@ def hooks_to_env(env, arg_hooks, hook):
|
||||
@utils.arg('-r', '--enable-rollback', default=False, action="store_true",
|
||||
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 '
|
||||
help=_('Parameter values used to create the stack. This can be '
|
||||
'specified multiple times, or once with parameters '
|
||||
'separated by a semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('name', metavar='<STACK_NAME>',
|
||||
@ -239,16 +239,16 @@ def do_stack_adopt(hc, args):
|
||||
@utils.arg('-o', '--template-object', metavar='<URL>',
|
||||
help=_('URL to retrieve template object (e.g. from swift)'))
|
||||
@utils.arg('-t', '--timeout', metavar='<TIMEOUT>', type=int,
|
||||
help=_('Stack creation timeout in minutes. This is only used during'
|
||||
'validation in preview.'))
|
||||
help=_('Stack creation timeout in minutes. This is only used '
|
||||
'during validation in preview.'))
|
||||
@utils.arg('-r', '--enable-rollback', default=False, action="store_true",
|
||||
help=_('Enable rollback on failure. This option is not used during'
|
||||
help=_('Enable rollback on failure. This option is not used during '
|
||||
'preview and exists only for symmetry with %(cmd)s.')
|
||||
% {'cmd': 'stack-create'})
|
||||
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
|
||||
help=_('Parameter values used to preview the stack. '
|
||||
'This can be specified multiple times, or once with parameters '
|
||||
'separated by semicolon.'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
|
||||
help=_('Parameter values from file used to create the stack. '
|
||||
@ -319,8 +319,8 @@ def do_stack_delete(hc, args):
|
||||
|
||||
@utils.arg('-O', '--output-file', metavar='<FILE>',
|
||||
help=_('file to output abandon result. '
|
||||
'If the option is specified, the result will be'
|
||||
' output into <FILE>.'))
|
||||
'If the option is specified, the result will be '
|
||||
'output into <FILE>.'))
|
||||
@utils.arg('id', metavar='<NAME or ID>',
|
||||
help=_('Name or ID of stack to abandon.'))
|
||||
def do_stack_abandon(hc, args):
|
||||
@ -426,15 +426,16 @@ def do_stack_show(hc, args):
|
||||
help=_('Set rollback on update failure. '
|
||||
'Values %(true)s set rollback to enabled. '
|
||||
'Values %(false)s set rollback to disabled. '
|
||||
'Default is to use the value of existing stack to be updated.')
|
||||
'Default is to use the value of existing stack to be '
|
||||
'updated.')
|
||||
% {'true': strutils.TRUE_STRINGS, 'false': strutils.FALSE_STRINGS})
|
||||
@utils.arg('-y', '--dry-run', default=False, action="store_true",
|
||||
help='Do not actually perform the stack update, but show what '
|
||||
'would be changed')
|
||||
@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 a semicolon.'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by a semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
|
||||
help=_('Parameter values from file used to create the stack. '
|
||||
@ -443,17 +444,18 @@ def do_stack_show(hc, args):
|
||||
action='append')
|
||||
@utils.arg('-x', '--existing', default=False, action="store_true",
|
||||
help=_('Re-use the template, parameters and environment of the '
|
||||
'current stack. If the template argument is omitted then the '
|
||||
'existing template is used. If no %(env_arg)s is specified then '
|
||||
'the existing environment is used. '
|
||||
'Parameters specified in %(arg)s will patch over the existing '
|
||||
'values in the current stack. Parameters omitted will keep '
|
||||
'the existing values.')
|
||||
'current stack. If the template argument is omitted then '
|
||||
'the existing template is used. If no %(env_arg)s is '
|
||||
'specified then the existing environment is used. '
|
||||
'Parameters specified in %(arg)s will patch over the '
|
||||
'existing values in the current stack. Parameters omitted '
|
||||
'will keep the existing values.')
|
||||
% {'arg': '--parameters', 'env_arg': '--environment-file'})
|
||||
@utils.arg('-c', '--clear-parameter', metavar='<PARAMETER>',
|
||||
help=_('Remove the parameters from the set of parameters of '
|
||||
'current stack for the %(cmd)s. The default value in the '
|
||||
'template will be used. This can be specified multiple times.')
|
||||
'template will be used. This can be specified multiple '
|
||||
'times.')
|
||||
% {'cmd': 'stack-update'},
|
||||
action='append')
|
||||
@utils.arg('id', metavar='<NAME or ID>',
|
||||
@ -554,8 +556,8 @@ def do_stack_cancel_update(hc, args):
|
||||
help=_('Include hidden stacks in the stack listing.'))
|
||||
@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 a semicolon.'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by a semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('-t', '--tags', metavar='<TAG1,TAG2...>',
|
||||
help=_('Show stacks containing these tags, combine multiple tags '
|
||||
@ -716,9 +718,9 @@ def do_output_show(hc, args):
|
||||
|
||||
@utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
|
||||
help=_('Filter parameters to apply on returned resource types. '
|
||||
'This can be specified multiple times, or once with parameters '
|
||||
'separated by a semicolon. It can be any of name, version and '
|
||||
'support_status'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by a semicolon. It can be any of '
|
||||
'name, version and support_status'),
|
||||
action='append')
|
||||
def do_resource_type_list(hc, args):
|
||||
'''List the available resource types.'''
|
||||
@ -1010,8 +1012,8 @@ def do_hook_clear(hc, args):
|
||||
help=_('Name of the resource to filter events by.'))
|
||||
@utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
|
||||
help=_('Filter parameters to apply on returned events. '
|
||||
'This can be specified multiple times, or once with parameters '
|
||||
'separated by a semicolon.'),
|
||||
'This can be specified multiple times, or once with '
|
||||
'parameters separated by a semicolon.'),
|
||||
action='append')
|
||||
@utils.arg('-l', '--limit', metavar='<LIMIT>',
|
||||
help=_('Limit the number of events returned.'))
|
||||
@ -1389,8 +1391,8 @@ def do_deployment_delete(hc, args):
|
||||
config_id = getattr(sd, 'config_id')
|
||||
hc.software_configs.delete(config_id=config_id)
|
||||
except Exception:
|
||||
print(_('Failed to delete the correlative config'
|
||||
' %(config_id)s of deployment %(deploy_id)s') %
|
||||
print(_('Failed to delete the correlative config '
|
||||
'%(config_id)s of deployment %(deploy_id)s') %
|
||||
{'config_id': config_id, 'deploy_id': deploy_id})
|
||||
|
||||
if failure_count == len(args.id):
|
||||
|
Loading…
Reference in New Issue
Block a user