summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-11 10:32:30 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-11 10:32:30 -0400
commit71c679e1a0105490bd5845a15de5e8f1a32e2166 (patch)
treec528e62098b599d7ae74ea53908a045ccf2ffb63 /src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
parentb682d9e3c11f94a9a9dc254a6d53e44f953a74bf (diff)
downloadbcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.tar.gz
bcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.tar.bz2
bcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.zip
Cfg: documented all Cfg modules, added development docs
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
index f02461673..a0e999847 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
@@ -1,3 +1,7 @@
+""" The CfgCheetahGenerator allows you to use the `Cheetah
+<http://www.cheetahtemplate.org/>`_ templating system to generate
+:ref:`server-plugins-generators-cfg` files. """
+
import copy
import logging
import Bcfg2.Server.Plugin
@@ -13,7 +17,14 @@ except ImportError:
class CfgCheetahGenerator(CfgGenerator):
+ """ The CfgCheetahGenerator allows you to use the `Cheetah
+ <http://www.cheetahtemplate.org/>`_ templating system to generate
+ :ref:`server-plugins-generators-cfg` files. """
+
+ #: Handle .cheetah files
__extensions__ = ['cheetah']
+
+ #: :class:`Cheetah.Template.Template` compiler settings
settings = dict(useStackFrames=False)
def __init__(self, fname, spec, encoding):
@@ -22,6 +33,7 @@ class CfgCheetahGenerator(CfgGenerator):
msg = "Cfg: Cheetah is not available: %s" % entry.get("name")
logger.error(msg)
raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
+ __init__.__doc__ = CfgGenerator.__init__.__doc__
def get_data(self, entry, metadata):
template = Template(self.data.decode(self.encoding),
@@ -30,3 +42,4 @@ class CfgCheetahGenerator(CfgGenerator):
template.path = entry.get('realname', entry.get('name'))
template.source_path = self.name
return template.respond()
+ get_data.__doc__ = CfgGenerator.get_data.__doc__