From 1039cd3a9883288abda18c5892c4ed98b7aa79a2 Mon Sep 17 00:00:00 2001 From: Zhang Yang Date: Fri, 16 May 2014 20:13:30 -0700 Subject: [PATCH] Remove no use option parameters for template-validate template-validate only validates the template body, so option parameters here is no use, if you want to validate a template with parameters, you can use stack-preview Change-Id: I3dadbe649440a53bb039ab146c92c34c6d5cec4d --- heatclient/tests/test_shell.py | 6 ------ heatclient/v1/shell.py | 11 ----------- 2 files changed, 17 deletions(-) diff --git a/heatclient/tests/test_shell.py b/heatclient/tests/test_shell.py index cc9b1227..6588b91f 100644 --- a/heatclient/tests/test_shell.py +++ b/heatclient/tests/test_shell.py @@ -143,12 +143,6 @@ class ShellParamValidationTest(TestCase): ('stack-update', dict( command='stack-update ts -P "a-b"', err='Malformed parameter')), - ('validate', dict( - command='validate -P "a=b;c"', - err='Malformed parameter')), - ('template-validate', dict( - command='template-validate -P "a$b"', - err='Malformed parameter')), ] def setUp(self): diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index 09794fc5..814cc60b 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -507,11 +507,6 @@ def do_template_show(hc, args): help='Path to the environment.') @utils.arg('-o', '--template-object', metavar='', help='URL to retrieve template object (e.g. from swift).') -@utils.arg('-P', '--parameters', metavar='', - help='Parameter values to validate. ' - 'This can be specified multiple times, or once with parameters ' - 'separated by a semicolon.', - action='append') def do_validate(hc, args): '''DEPRECATED! Use template-validate instead.''' logger.warning('DEPRECATED! Use template-validate instead.') @@ -526,11 +521,6 @@ def do_validate(hc, args): help='Path to the environment.') @utils.arg('-o', '--template-object', metavar='', help='URL to retrieve template object (e.g. from swift).') -@utils.arg('-P', '--parameters', metavar='', - help='Parameter values to validate. ' - 'This can be specified multiple times, or once with parameters ' - 'separated by a semicolon.', - action='append') def do_template_validate(hc, args): '''Validate a template with parameters.''' @@ -543,7 +533,6 @@ def do_template_validate(hc, args): env_files, env = template_utils.process_environment_and_files( env_path=args.environment_file) fields = { - 'parameters': utils.format_parameters(args.parameters), 'template': template, 'files': dict(list(tpl_files.items()) + list(env_files.items())), 'environment': env