summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-02-02 16:38:01 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-02-02 16:38:01 +0000
commit67ea84767b1c06c9efd0449f435cae103cb03fb0 (patch)
treeb08b4ed7cb02086993034879122f978780fcb71d /src/lib/Server/Plugins
parent527fa203685fc8c93f6094f8cfe61ff4a39f1e2e (diff)
downloadbcfg2-67ea84767b1c06c9efd0449f435cae103cb03fb0.tar.gz
bcfg2-67ea84767b1c06c9efd0449f435cae103cb03fb0.tar.bz2
bcfg2-67ea84767b1c06c9efd0449f435cae103cb03fb0.zip
Split out connector interface to allow for additional data generation based on complete group list
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5055 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Metadata.py6
-rw-r--r--src/lib/Server/Plugins/Probes.py8
-rw-r--r--src/lib/Server/Plugins/Properties.py5
3 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index df7e3ddf2..f63e2d558 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -395,7 +395,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
newcategories, uuid, password,
(groupscopy, clientscopy))
- def merge_additional_metadata(self, imd, source, groups, data):
+ def merge_additional_groups(self, imd, groups):
for group in groups:
if group in self.categories and \
self.categories[group] in imd.categories:
@@ -410,9 +410,11 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
self.categories[g] in imd.categories:
continue
imd.groups.append(g)
+
+ def merge_additional_data(self, imd, source, data):
if not hasattr(imd, source):
setattr(imd, source, data)
- imd.connectors.append(source)
+ imd.connectors.append(source)
def AuthenticateConnection(self, user, password, address):
'''This function checks user and password'''
diff --git a/src/lib/Server/Plugins/Probes.py b/src/lib/Server/Plugins/Probes.py
index 10b729fde..f2973169b 100644
--- a/src/lib/Server/Plugins/Probes.py
+++ b/src/lib/Server/Plugins/Probes.py
@@ -139,6 +139,8 @@ class Probes(Bcfg2.Server.Plugin.Plugin,
except KeyError:
self.probedata[client.hostname] = { data.get('name'):dtext }
- def get_additional_metadata(self, meta):
- return (self.cgroups.get(meta.hostname, list()),
- self.probedata.get(meta.hostname, dict()))
+ def get_additional_groups(self, meta):
+ return self.cgroups.get(meta.hostname, list())
+
+ def get_additional_data(self, meta):
+ return self.probedata.get(meta.hostname, dict())
diff --git a/src/lib/Server/Plugins/Properties.py b/src/lib/Server/Plugins/Properties.py
index 2692c742e..87fcc16d3 100644
--- a/src/lib/Server/Plugins/Properties.py
+++ b/src/lib/Server/Plugins/Properties.py
@@ -20,11 +20,10 @@ class Properties(Bcfg2.Server.Plugin.Plugin,
version = '$Revision: $'
experimental = True
-
def __init__(self, core, datastore):
Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
Bcfg2.Server.Plugin.Connector.__init__(self)
self.store = PropDirectoryBacked(self.data, core.fam)
- def get_additional_metadata(self, _):
- return ((), copy.deepcopy(self.store.entries))
+ def get_additional_data(self, _):
+ return copy.deepcopy(self.store.entries)