summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.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/CfgInfoXML.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/CfgInfoXML.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
index 956ebfe17..472a7dba3 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
@@ -1,3 +1,5 @@
+""" Handle info.xml files """
+
import logging
import Bcfg2.Server.Plugin
from Bcfg2.Server.Plugins.Cfg import CfgInfo
@@ -5,11 +7,16 @@ from Bcfg2.Server.Plugins.Cfg import CfgInfo
logger = logging.getLogger(__name__)
class CfgInfoXML(CfgInfo):
+ """ CfgInfoXML handles :file:`info.xml` files for
+ :ref:`server-plugins-generators-cfg` """
+
+ #: Handle :file:`info.xml` files
__basenames__ = ['info.xml']
def __init__(self, path):
CfgInfo.__init__(self, path)
self.infoxml = Bcfg2.Server.Plugin.InfoXML(path)
+ __init__.__doc__ = CfgInfo.__init__.__doc__
def bind_info_to_entry(self, entry, metadata):
mdata = dict()
@@ -17,14 +24,17 @@ class CfgInfoXML(CfgInfo):
if 'Info' not in mdata:
logger.error("Failed to set metadata for file %s" %
entry.get('name'))
- raise PluginExecutionError
+ raise Bcfg2.Server.Plugin.PluginExecutionError
self._set_info(entry, mdata['Info'][None])
+ bind_info_to_entry.__doc__ = CfgInfo.bind_info_to_entry.__doc__
def handle_event(self, event):
self.infoxml.HandleEvent()
+ handle_event.__doc__ = CfgInfo.handle_event.__doc__
def _set_info(self, entry, info):
CfgInfo._set_info(self, entry, info)
if '__children__' in info:
for child in info['__children__']:
entry.append(child)
+ _set_info.__doc__ = CfgInfo._set_info.__doc__