summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-08-15 18:17:58 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-08-15 18:17:58 +0000
commite522198525002564cc78f8b22e198c7458a81819 (patch)
tree6625862ac1ef912bd629ec6115a10989709bb811 /src/lib
parentafab9c8f706f90731f09922367ec2dc7a2ea7d33 (diff)
downloadbcfg2-e522198525002564cc78f8b22e198c7458a81819.tar.gz
bcfg2-e522198525002564cc78f8b22e198c7458a81819.tar.bz2
bcfg2-e522198525002564cc78f8b22e198c7458a81819.zip
Switch probes to use plugin name for result routing (Resolves Ticket #594)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4879 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Plugins/Metadata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index 813ca99eb..a1879df26 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -32,8 +32,9 @@ class ClientMetadata(object):
return group in self.groups
class ProbeSet(Bcfg2.Server.Plugin.EntrySet):
- def __init__(self, path, fam, encoding):
+ def __init__(self, path, fam, encoding, plugin_name):
fpattern = '[0-9A-Za-z_\-]+'
+ self.plugin_name = plugin_name
Bcfg2.Server.Plugin.EntrySet.__init__(self, fpattern, path, True,
Bcfg2.Server.Plugin.SpecificData,
encoding)
@@ -64,7 +65,7 @@ class ProbeSet(Bcfg2.Server.Plugin.EntrySet):
entry, prio = data
probe = lxml.etree.Element('probe')
probe.set('name', name.split('/')[-1])
- probe.set('source', "Metadata")
+ probe.set('source', self.plugin_name)
probe.text = entry.data
match = self.bangline.match(entry.data.split('\n')[0])
if match:
@@ -114,7 +115,7 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin,
self.pdirty = False
try:
loc = datastore + "/Probes"
- self.probes = ProbeSet(loc, core.fam, core.encoding)
+ self.probes = ProbeSet(loc, core.fam, core.encoding, self.__name__)
except:
self.probes = False
self.probedata = {}