summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-01-05 16:33:54 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-01-05 16:33:54 +0000
commit264070f0f31b9ee9128b6df4003282a57e03081f (patch)
tree3289dd5d98be83a9d54538f185f73652c92b9d55
parent13ad011c85a6c1b44141006168359c58c320d4a0 (diff)
downloadbcfg2-264070f0f31b9ee9128b6df4003282a57e03081f.tar.gz
bcfg2-264070f0f31b9ee9128b6df4003282a57e03081f.tar.bz2
bcfg2-264070f0f31b9ee9128b6df4003282a57e03081f.zip
Add defaults for rh systems
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2623 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Client/Frame.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py
index e79c4f410..12531f2e6 100644
--- a/src/lib/Client/Frame.py
+++ b/src/lib/Client/Frame.py
@@ -15,6 +15,8 @@ def promptFilter(prompt, entries):
continue
return ret
+toolset_defs = {'rh': {'Service':'chkconfig', 'Package':'rpm'}}
+
class Frame:
'''Frame is the container for all Tool objects and state information'''
def __init__(self, config, setup, times):
@@ -51,6 +53,13 @@ class Frame:
tool.InstallConfigFile(cfile)
# find entries not handled by any tools
problems = [entry for struct in config for entry in struct if entry not in self.handled]
+ if toolset_defs.has_key(config.get('toolset')):
+ tdefs = toolset_defs[config.get('toolset')]
+ for problem in problems[:]:
+ if tdefs.has_key(problem.tag):
+ problem.set('type', tdefs[problem.tag])
+ problems.remove(problem)
+
if problems:
self.logger.error("The following entries are not handled by any tool:")
self.logger.error(["%s:%s:%s" % (entry.tag, entry.get('type'), \