summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-28 17:18:58 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-28 17:18:58 -0400
commit4d29fe21b69795505ce27bccbdb59566bc20d7b5 (patch)
treed8bedc271649a6c0918132b76c553b6bdff79a26
parent76f996d12103f446b785fd727480d12b2c6a6b91 (diff)
downloadbcfg2-4d29fe21b69795505ce27bccbdb59566bc20d7b5.tar.gz
bcfg2-4d29fe21b69795505ce27bccbdb59566bc20d7b5.tar.bz2
bcfg2-4d29fe21b69795505ce27bccbdb59566bc20d7b5.zip
GroupLogic: added docstrings
-rw-r--r--src/lib/Bcfg2/Server/Lint/Validate.py3
-rw-r--r--src/lib/Bcfg2/Server/Plugins/GroupLogic.py8
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/Validate.py b/src/lib/Bcfg2/Server/Lint/Validate.py
index 14d17a1e6..ae7c75804 100644
--- a/src/lib/Bcfg2/Server/Lint/Validate.py
+++ b/src/lib/Bcfg2/Server/Lint/Validate.py
@@ -88,6 +88,9 @@ class Validate(Bcfg2.Server.Lint.ServerlessPlugin):
self.parse(filename)
def parse(self, filename):
+ """ Parse an XML file, raising the appropriate LintErrors if
+ it can't be parsed or read. Return the
+ lxml.etree._ElementTree parsed from the file. """
try:
return lxml.etree.parse(filename)
except SyntaxError:
diff --git a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
index c572fee2b..810b273af 100644
--- a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
+++ b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
@@ -1,3 +1,6 @@
+""" GroupLogic is a connector plugin that lets you use an XML Genshi
+template to dynamically set additional groups for clients. """
+
import os
import lxml.etree
import Bcfg2.Server.Plugin
@@ -10,6 +13,7 @@ except ImportError:
class GroupLogicConfig(BundleTemplateFile):
+ """ Representation of the GroupLogic groups.xml file """
create = lxml.etree.Element("GroupLogic",
nsmap=dict(py="http://genshi.edgewall.org/"))
@@ -28,6 +32,10 @@ class GroupLogicConfig(BundleTemplateFile):
class GroupLogic(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Connector):
+ """ GroupLogic is a connector plugin that lets you use an XML
+ Genshi template to dynamically set additional groups for
+ clients. """
+
def __init__(self, core, datastore):
Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
Bcfg2.Server.Plugin.Connector.__init__(self)