From 2bdb9dce1bd1a9e77dd7383af4ca2c554021adbe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Jul 2010 08:20:20 +0000 Subject: Some docstrings added git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5967 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugin.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/lib/Server/Plugin.py') diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index b8278bf13..95569e3ac 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -131,11 +131,11 @@ class Connector(object): return list() def get_additional_data(self, metadata): - """Determine additional data for metadata inst.""" + """Determine additional data for metadata instances.""" return dict() class Probing(object): - """Signal probe capability for this plugin""" + """Signal probe capability for this plugin.""" def GetProbes(self, _): """Return a set of probes for execution on client.""" return [] @@ -163,7 +163,7 @@ class ThreadedStatistics(Statistics, self.start() def save(self): - """ Save any pending data to a file.""" + """Save any pending data to a file.""" pending_data = [] try: while not self.work_queue.empty(): @@ -184,7 +184,7 @@ class ThreadedStatistics(Statistics, self.logger.warning("Failed to save pending data") def load(self): - """ Load any pending data to a file.""" + """Load any pending data to a file.""" if not os.path.exists(self.pending_file): return True pending_data = [] @@ -268,7 +268,7 @@ class PullTarget(object): def AcceptPullData(self, specific, new_entry, verbose): """This is the null per-plugin implementation - of bcfg2-admin pull""" + of bcfg2-admin pull.""" raise PluginExecutionError class Decision(object): @@ -385,7 +385,10 @@ class DirectoryBacked(object): event.filename) class XMLFileBacked(FileBacked): - """This object is a coherent cache for an XML file to be used as a part of DirectoryBacked.""" + """ + This object is a coherent cache for an XML file to be used as a + part of DirectoryBacked. + """ __identifier__ = 'name' def __init__(self, filename): @@ -394,7 +397,7 @@ class XMLFileBacked(FileBacked): FileBacked.__init__(self, filename) def Index(self): - """Build local data structures""" + """Build local data structures.""" try: xdata = XML(self.data) except XMLSyntaxError: @@ -407,7 +410,7 @@ class XMLFileBacked(FileBacked): return iter(self.entries) class SingleXMLFileBacked(XMLFileBacked): - """This object is a coherent cache for an independent XML File.""" + """This object is a coherent cache for an independent XML file.""" def __init__(self, filename, fam): XMLFileBacked.__init__(self, filename) fam.AddMonitor(filename, self) @@ -450,7 +453,10 @@ class StructFile(XMLFileBacked): return [] class INode: - """LNodes provide lists of things available at a particular group intersection.""" + """ + LNodes provide lists of things available at a particular + group intersection. + """ raw = {'Client':"lambda x:'%s' == x.hostname and predicate(x)", 'Group':"lambda x:'%s' in x.groups and predicate(x)"} nraw = {'Client':"lambda x:'%s' != x.hostname and predicate(x)", -- cgit v1.2.3-1-g7c22