summaryrefslogtreecommitdiff
path: root/heatclient/v1/shell.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-29 01:37:11 +0000
committerGerrit Code Review <review@openstack.org>2016-03-29 01:37:11 +0000
commit349a2c85b17be5d8f438e1b511dcbeb69f0fb7f1 (patch)
tree6a42f1a19c663e3c9ea5c9b2f56cf6aba13b6a67 /heatclient/v1/shell.py
parentcff00ac9bae0a900c25801c6a0f38e76ef17a624 (diff)
parent1d4c407fc53ed2b57377095f0f5d99079afcf51f (diff)
downloadpython-heatclient-349a2c85b17be5d8f438e1b511dcbeb69f0fb7f1.tar.gz
Merge "OSC plugin for orchestration template validate"
Diffstat (limited to 'heatclient/v1/shell.py')
-rw-r--r--heatclient/v1/shell.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py
index 98cc427..05a5d29 100644
--- a/heatclient/v1/shell.py
+++ b/heatclient/v1/shell.py
@@ -39,19 +39,6 @@ import heatclient.exc as exc
logger = logging.getLogger(__name__)
-def _authenticated_fetcher(hc):
- """A wrapper around the heat client object to fetch a template."""
-
- def _do(*args, **kwargs):
- if isinstance(hc.http_client, http.SessionClient):
- method, url = args
- return hc.http_client.request(url, method, **kwargs).content
- else:
- return hc.http_client.raw_request(*args, **kwargs).content
-
- return _do
-
-
def show_deprecated(deprecated, recommended):
logger.warning(_LW('"%(old)s" is deprecated, '
'please use "%(new)s" instead'),
@@ -114,7 +101,7 @@ def do_stack_create(hc, args):
args.template_file,
args.template_url,
args.template_object,
- _authenticated_fetcher(hc))
+ http.authenticated_fetcher(hc))
env_files_list = []
env_files, env = template_utils.process_multiple_environments_and_files(
env_paths=args.environment_file, env_list_tracker=env_files_list)
@@ -269,7 +256,7 @@ def do_stack_preview(hc, args):
args.template_file,
args.template_url,
args.template_object,
- _authenticated_fetcher(hc))
+ http.authenticated_fetcher(hc))
env_files_list = []
env_files, env = template_utils.process_multiple_environments_and_files(
env_paths=args.environment_file, env_list_tracker=env_files_list)
@@ -519,7 +506,7 @@ def do_stack_update(hc, args):
args.template_file,
args.template_url,
args.template_object,
- _authenticated_fetcher(hc),
+ http.authenticated_fetcher(hc),
existing=args.existing)
env_files_list = []
env_files, env = template_utils.process_multiple_environments_and_files(
@@ -907,12 +894,14 @@ def do_template_show(hc, args):
help=_('List of heat errors to ignore.'))
def do_template_validate(hc, args):
"""Validate a template with parameters."""
+ show_deprecated('heat template-validate',
+ 'openstack orchestration template validate')
tpl_files, template = template_utils.get_template_contents(
args.template_file,
args.template_url,
args.template_object,
- _authenticated_fetcher(hc))
+ http.authenticated_fetcher(hc))
env_files_list = []
env_files, env = template_utils.process_multiple_environments_and_files(