Add extra methods in template when using template override

Add the Kolla template methods when using --template-override parameter

TrivialFix

Change-Id: I67ab579817fc5462143e5742d78db4a202debf2e
Signed-off-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
This commit is contained in:
Jeffrey Zhang 2016-09-07 20:17:18 +08:00
parent 9d9f3eea04
commit 754a0cef25
No known key found for this signature in database
GPG Key ID: B178EDF8751547E8

View File

@ -672,6 +672,7 @@ class KollaWorker(object):
env = jinja2.Environment( # nosec: not used to render HTML
loader=jinja2.FileSystemLoader(template_path))
env.filters.update(self._get_filters())
env.globals.update(self._get_methods())
template = env.get_template(template_name)
if self.include_header:
with open(self.include_header, 'r') as f: