def register(self, config_file, contexts, config_template=None):
        """
        Register a config file with a list of context generators to be called
        during rendering.
        config_template can be used to load a template from a string instead of
        using template loaders and template files.
        :param config_file (str): a path where a config file will be rendered
        :param contexts (list): a list of context dictionaries with kv pairs
        :param config_template (str): an optional template string to use
        """
        self.templates[config_file] = OSConfigTemplate(
            config_file=config_file,
            contexts=contexts,
            config_template=config_template
        )
        log('Registered config file: {}'.format(config_file),
            level=INFO)
def register ( self , config_file , contexts , config_template = None ) : self . templates [ config_file ] = OSConfigTemplate ( config_file = config_file , contexts = contexts , config_template = config_template ) log ( 'Registered config file: {}' . format ( config_file ) , level = INFO )
Register a config file with a list of context generators to be called
        during rendering.
        config_template can be used to load a template from a string instead of
        using template loaders and template files.
        :param config_file (str): a path where a config file will be rendered
        :param contexts (list): a list of context dictionaries with kv pairs
        :param config_template (str): an optional template string to use