Changeset 2225
- Timestamp:
- 09/07/06 21:55:18 (4 years ago)
- Location:
- branches/refactor/client/src/lib/Client
- Files:
-
- 1 added
- 3 modified
-
Frame.py (added)
-
Tools/Bases.py (modified) (1 diff)
-
Tools/POSIX.py (modified) (1 diff)
-
__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/refactor/client/src/lib/Client/Tools/Bases.py
r2224 r2225 67 67 raise toolInstantiationError 68 68 69 def Verify Entry(self, entry, modlist):70 '''Verify Entry dispatches to the proper method per-class\nReturns True/False'''71 return False69 def Verify(self): 70 '''Verify all pertinent entries''' 71 pass 72 72 73 def Install Entry(self, entry):74 '''Install Entry dispatches to the proper install method call\nReturns True/False'''75 return False73 def Install(self, whitelist = []): 74 '''Install all supported entries in sublist, if specified''' 75 pass 76 76 77 def FindExtra(self):78 ''' Find per-type extra entries that are not reflected in the configuration'''79 return []77 def handlesEntry(self, entry): 78 '''return if entry is handled by this Tool''' 79 return (entry.tag, entry.get('type')) in self.__handles__ 80 80 81 def Install(self, subset = []): 82 '''Install all supported entries in sublist, if specified''' 83 return False 81 def buildModlist(self, entry, struct): 82 '''Build a list of potentially modified POSIX paths for this entry''' 83 if entry.tag != 'Package' or struct.tag != 'Bundle': 84 return [] 85 return [sentry.get('name') for sentry in struct if sentry.tag in \ 86 ['ConfigFile', 'SymLink', 'Directory']] -
branches/refactor/client/src/lib/Client/Tools/POSIX.py
r2224 r2225 29 29 ('SymLink', None)] 30 30 31 def Verify Entry(self, entry, modlist):31 def Verify(self, entry): 32 32 '''Dispatch verify calls to underlying methods''' 33 func = getattr(self, "Verify%s" % (entry.tag)) 34 self.states[entry] = func(entry, modlist) 33 for entry in [entry for struct in self.config.getchildren() for entry in struct.getchildren() \ 34 if self.handlesEntry(entry)]: 35 func = getattr(self, "Verify%s" % (entry.tag)) 36 self.states[entry] = func(entry, modlist) 35 37 36 38 def VerifySymLink(self, entry): -
branches/refactor/client/src/lib/Client/__init__.py
r2223 r2225 2 2 __revision__ = '$Revision$' 3 3 4 __all__ = [" Proxy", "Toolset", "Debian", "Solaris", "Redhat", "Gentoo", "XML", "Tools"]4 __all__ = ["Frame", "Proxy", "Tools", 'XML"]