summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-19 11:40:52 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-20 11:37:55 -0400
commit92bc95f86a834b2853c77bbbfa1c0021213e1e17 (patch)
treefd0445f1434495e8cc7fc13af553889285d168a6 /src/lib/Bcfg2/Server/Plugin
parent52cee5a20d6981e35b9df1c7438dffd1210f5a78 (diff)
downloadbcfg2-92bc95f86a834b2853c77bbbfa1c0021213e1e17.tar.gz
bcfg2-92bc95f86a834b2853c77bbbfa1c0021213e1e17.tar.bz2
bcfg2-92bc95f86a834b2853c77bbbfa1c0021213e1e17.zip
documented Packages base class
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin')
-rw-r--r--src/lib/Bcfg2/Server/Plugin/base.py11
-rw-r--r--src/lib/Bcfg2/Server/Plugin/interfaces.py10
2 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/base.py b/src/lib/Bcfg2/Server/Plugin/base.py
index 6b75bd174..74ec6df39 100644
--- a/src/lib/Bcfg2/Server/Plugin/base.py
+++ b/src/lib/Bcfg2/Server/Plugin/base.py
@@ -3,6 +3,7 @@
import os
import logging
+
class Debuggable(object):
""" Mixin to add a debugging interface to an object and expose it
via XML-RPC on :class:`Bcfg2.Server.Plugin.base.Plugin` objects """
@@ -11,6 +12,14 @@ class Debuggable(object):
__rmi__ = ['toggle_debug']
def __init__(self, name=None):
+ """
+ :param name: The name of the logger object to get. If none is
+ supplied, the full name of the class (including
+ module) will be used.
+ :type name: string
+
+ .. autoattribute:: __rmi__
+ """
if name is None:
name = "%s.%s" % (self.__class__.__module__,
self.__class__.__name__)
@@ -92,6 +101,8 @@ class Plugin(Debuggable):
filesystem
:type datastore: string
:raises: :class:`Bcfg2.Server.Plugin.exceptions.PluginInitError`
+
+ .. autoattribute:: __rmi__
"""
object.__init__(self)
self.Entries = {}
diff --git a/src/lib/Bcfg2/Server/Plugin/interfaces.py b/src/lib/Bcfg2/Server/Plugin/interfaces.py
index ea0b50233..59f3636fb 100644
--- a/src/lib/Bcfg2/Server/Plugin/interfaces.py
+++ b/src/lib/Bcfg2/Server/Plugin/interfaces.py
@@ -10,6 +10,7 @@ from Bcfg2.Compat import Queue, Empty, Full, cPickle
from exceptions import *
from base import Plugin
+
class Generator(object):
""" Generator plugins contribute to literal client configurations.
That is, they generate entry contents.
@@ -46,7 +47,7 @@ class Generator(object):
return False
def HandleEntry(self, entry, metadata):
- """ HandlesEntry is the slow path method for binding
+ """ HandleEntry is the slow path method for binding
configuration binding requests. It is called if the
``Entries`` dict does not contain a method for binding the
entry, and :func:`HandlesEntry`
@@ -230,7 +231,7 @@ class Connector(object):
:param metadata: The client metadata
:type metadata: Bcfg2.Server.Plugins.Metadata.ClientMetadata
- :return: list of strings
+ :return: dict
"""
return dict()
@@ -473,8 +474,9 @@ class StructureValidator(object):
:param metadata: The client metadata
:type metadata: Bcfg2.Server.Plugins.Metadata.ClientMetadata
:param config: A list of lxml.etree._Element objects
- describing the structures for this client
- :type config: list
+ describing the structures (i.e., bundles) for
+ this client. This can be modified in place.
+ :type config: list of lxml.etree._Element
:returns: None
:raises: :class:`Bcfg2.Server.Plugin.exceptions.ValidationError`
"""