From 58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 17 Mar 2008 18:28:10 +0000 Subject: 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 --- src/lib/Client/Tools/Action.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lib/Client/Tools/Action.py') 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) -- cgit v1.2.3-1-g7c22