From e6cd763441c17db67152ebc1a3505b06fa14cb29 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 11 Sep 2006 20:31:16 +0000 Subject: Add diagnostic routines git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2241 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Cfg.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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'] -- cgit v1.2.3-1-g7c22