2
Templating using standard Python str.format() method.
5
from charmhelpers.core import hookenv
8
def render(template, extra={}, **kwargs):
9
"""Return the template rendered using Python's str.format()."""
10
context = hookenv.execution_environment()
12
context.update(kwargs)
13
return template.format(**context)