summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/Action.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-03-17 18:28:10 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-03-17 18:28:10 +0000
commit58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee (patch)
tree1233255cfc8bd9467eeec36c7146102d936b20b0 /src/lib/Client/Tools/Action.py
parentb7e58e817e6326a6317387fe06db2a6448aea469 (diff)
downloadbcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.tar.gz
bcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.tar.bz2
bcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.zip
Remove validation states from Tool instances (in preparation for DecisionList stuff)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4423 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/Action.py')
-rw-r--r--src/lib/Client/Tools/Action.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/Client/Tools/Action.py b/src/lib/Client/Tools/Action.py
index a69405764..9ec3418e9 100644
--- a/src/lib/Client/Tools/Action.py
+++ b/src/lib/Client/Tools/Action.py
@@ -41,24 +41,23 @@ class Action(Bcfg2.Client.Tools.Tool):
def InstallAction(self, entry):
'''Run actions as pre-checks for bundle installation'''
if entry.get('timing') != 'post':
- self.states[entry] = self.RunAction(entry)
- return self.states[entry]
+ return self.RunAction(entry)
return True
def InstallPostInstall(self, entry):
return self.InstallAction(self, entry)
- def BundleUpdated(self, bundle):
+ def BundleUpdated(self, bundle, states):
'''Run postinstalls when bundles have been updated'''
for postinst in bundle.findall("PostInstall"):
self.cmd.run(postinst.get('name'))
for action in bundle.findall("Action"):
if action.get('timing') in ['post', 'both']:
- self.states[action] = self.RunAction(action)
+ states[action] = self.RunAction(action)
- def BundleNotUpdated(self, bundle):
+ def BundleNotUpdated(self, bundle, states):
'''Run Actions when bundles have not been updated'''
for action in bundle.findall("Action"):
if action.get('timing') in ['post', 'both'] and \
action.get('when') != 'modified':
- self.states[action] = self.RunAction(action)
+ states[action] = self.RunAction(action)