#
# enable templates
-template_enable=1
+template_enable=0
# default template engine (only mako is currently supported)
template_engine=mako
nifaces = networkInterfaces(self.interfacesfile,
self.interfacesfileiobuf,
self.interfacesfileformat,
+ template_enable=self.config.get('template_enable', 0),
template_engine=self.config.get('template_engine'),
template_lookuppath=self.config.get('template_lookuppath'))
if self._ifaceobj_squash or self._ifaceobj_squash_internal:
def __init__(self, interfacesfile='/etc/network/interfaces',
interfacesfileiobuf=None, interfacesfileformat='native',
- template_engine=None, template_lookuppath=None):
+ template_enable='0', template_engine=None,
+ template_lookuppath=None):
"""This member function initializes the networkinterfaces parser object.
Kwargs:
class templateEngine():
""" provides template rendering methods """
- def __init__(self, template_engine, template_lookuppath=None):
+ def __init__(self, template_engine, template_enable='0',
+ template_lookuppath=None):
self.logger = logging.getLogger('ifupdown.' +
self.__class__.__name__)
self.tclass = None
self.tclassargs = {}
self.render = self._render_default
+ if template_enable == '0':
+ return
if template_engine == 'mako':
try:
self.tclass = utils.importName('mako.template', 'Template')