:template: A templated string using Jinja2 templates
        :template_vars: A dict containing the vars used in the :template: string
        :type: The type of configuration to load. The default is "text" or a standard Junos config block. Other options are: "set" for set style commands, "xml" for xml configs

        Uses standard `Jinja2`_ Templating.

        .. _`Jinja2`: http://jinja.pocoo.org/

        Example:

        .. code-block:: python

            from pyJunosManager import JunosDevice

            config_template = "system { host-name {{ hostname }}; }"

            dev = JunosDevice(host="1.2.3.4",username="root",password="Juniper")
            dev.open()
            dev.open_config()
            dev.load_config_template(config_template,hostname="foo")
            dev commit_and_quit()
            dev.close()

def load_config_template(self,template,template_vars,type="text"):
        """
        :template: A templated string using Jinja2 templates
        :template_vars: A dict containing the vars used in the :template: string
        :type: The type of configuration to load. The default is "text" or a standard Junos config block. Other options are: "set" for set style commands, "xml" for xml configs

        Uses standard `Jinja2`_ Templating.

        .. _`Jinja2`: http://jinja.pocoo.org/

        Example:

        .. code-block:: python

            from pyJunosManager import JunosDevice

            config_template = "system { host-name {{ hostname }}; }"

            dev = JunosDevice(host="1.2.3.4",username="root",password="Juniper")
            dev.open()
            dev.open_config()
            dev.load_config_template(config_template,hostname="foo")
            dev commit_and_quit()
            dev.close()

        """
        new_template = Template(template)
        final_template = new_template.render(template_vars)

        try:
            output = self.dev.cu.load(final_template,format=type,merge=True)
        except Exception as err:
            print err