From d1e7147a2a306537a4c437f22f3a5c43c613be15 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 23 Jul 2009 03:23:37 +0000 Subject: Client: relax verification modlist to include all entries in all bundles git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5381 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py index 502efe04f..9089260b0 100644 --- a/src/lib/Client/Tools/__init__.py +++ b/src/lib/Client/Tools/__init__.py @@ -117,13 +117,12 @@ class Tool: '''Dispatch verify calls to underlying methods''' if not structures: structures = self.config.getchildren() + mods = self.buildModlist() for (struct, entry) in [(struct, entry) for struct in structures \ for entry in struct.getchildren() \ if self.canVerify(entry)]: try: func = getattr(self, "Verify%s" % (entry.tag)) - mods = self.buildModlist(entry, struct) - mods += [c.get('name') for c in entry.findall("Ignore")] states[entry] = func(entry, mods) except: self.logger.error( @@ -157,12 +156,12 @@ class Tool: '''return if entry is handled by this Tool''' return (entry.tag, entry.get('type')) in self.__handles__ - def buildModlist(self, entry, struct): + def buildModlist(self): '''Build a list of potentially modified POSIX paths for this entry''' - if struct.tag != 'Bundle': - return [] - return [sentry.get('name') for sentry in struct if sentry.tag in \ - ['ConfigFile', 'SymLink', 'Directory', 'Permissions']] + return [entry.get('name') for struct in self.config.getchildren() \ + for entry in struct.getchildren() \ + if entry.tag in ['ConfigFile', 'SymLink', 'Directory', + 'Permissions', 'Ignore', 'Path']] def gatherCurrentData(self, entry): '''Default implementation of the information gathering routines''' -- cgit v1.2.3-1-g7c22