summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-09-11 20:31:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-09-11 20:31:16 +0000
commite6cd763441c17db67152ebc1a3505b06fa14cb29 (patch)
treedd78ada0cd404d6748e5b136b17c554e218ec034 /src
parentd23ad57a34d78861156fc0e9617069f24c95e1c8 (diff)
downloadbcfg2-e6cd763441c17db67152ebc1a3505b06fa14cb29.tar.gz
bcfg2-e6cd763441c17db67152ebc1a3505b06fa14cb29.tar.bz2
bcfg2-e6cd763441c17db67152ebc1a3505b06fa14cb29.zip
Add diagnostic routines
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2241 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Cfg.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index e00c0a380..14ad47184 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -158,6 +158,13 @@ class ConfigFileEntry(object):
else:
logger.error("Unhandled Action %s for file %s" % (action, event.filename))
+ def Diagnose(self, metadata):
+ '''Print diagnostic information for entry'''
+ logger.info("Entries available:")
+ logger.info([bfile.name for bfile in self.fragments])
+ logger.info("Applicable entries:")
+ logger.info([bfile.name for bfile in self.fragments if bfile.applies(metadata) and not bfile.op])
+
def GetConfigFile(self, entry, metadata):
'''Fetch config file from repository'''
name = entry.attrib['name']