summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-30 09:05:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-01-17 10:40:18 -0500
commitaece6f8901711fa9e662b63f4f6b12cb90b84503 (patch)
tree26e20af5ec9b076a22fa0a970d303916cf4b0369 /src
parent41cfeba3ec2f4287dc1294a2c421e64f7b1224f8 (diff)
downloadbcfg2-aece6f8901711fa9e662b63f4f6b12cb90b84503.tar.gz
bcfg2-aece6f8901711fa9e662b63f4f6b12cb90b84503.tar.bz2
bcfg2-aece6f8901711fa9e662b63f4f6b12cb90b84503.zip
removed deprecated PostInstall support
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Client/Tools/Action.py19
-rw-r--r--src/lib/Bcfg2/Server/Admin/Compare.py3
2 files changed, 3 insertions, 19 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/Action.py b/src/lib/Bcfg2/Client/Tools/Action.py
index b1a897c81..5aada9c0b 100644
--- a/src/lib/Bcfg2/Client/Tools/Action.py
+++ b/src/lib/Bcfg2/Client/Tools/Action.py
@@ -11,9 +11,8 @@ from Bcfg2.Compat import input # pylint: disable=W0622
class Action(Bcfg2.Client.Tools.Tool):
"""Implement Actions"""
name = 'Action'
- __handles__ = [('PostInstall', None), ('Action', None)]
- __req__ = {'PostInstall': ['name'],
- 'Action': ['name', 'timing', 'when', 'command', 'status']}
+ __handles__ = [('Action', None)]
+ __req__ = {'Action': ['name', 'timing', 'when', 'command', 'status']}
def _action_allowed(self, action):
""" Return true if the given action is allowed to be run by
@@ -66,28 +65,14 @@ class Action(Bcfg2.Client.Tools.Tool):
"""Actions always verify true."""
return True
- def VerifyPostInstall(self, dummy, _):
- """Actions always verify true."""
- return True
-
def InstallAction(self, entry):
"""Run actions as pre-checks for bundle installation."""
if entry.get('timing') != 'post':
return self.RunAction(entry)
return True
- def InstallPostInstall(self, entry):
- """ Install a deprecated PostInstall entry """
- self.logger.warning("Installing deprecated PostInstall entry %s" %
- entry.get("name"))
- return self.InstallAction(entry)
-
def BundleUpdated(self, bundle, states):
"""Run postinstalls when bundles have been updated."""
- for postinst in bundle.findall("PostInstall"):
- if not self._action_allowed(postinst):
- continue
- self.cmd.run(postinst.get('name'))
for action in bundle.findall("Action"):
if action.get('timing') in ['post', 'both']:
if not self._action_allowed(action):
diff --git a/src/lib/Bcfg2/Server/Admin/Compare.py b/src/lib/Bcfg2/Server/Admin/Compare.py
index 820271a2f..8214f9e71 100644
--- a/src/lib/Bcfg2/Server/Admin/Compare.py
+++ b/src/lib/Bcfg2/Server/Admin/Compare.py
@@ -22,8 +22,7 @@ class Compare(Bcfg2.Server.Admin.Mode):
'Service': ['name', 'type', 'status', 'mode',
'target', 'sequence', 'parameters'],
'Action': ['name', 'timing', 'when', 'status',
- 'command'],
- 'PostInstall': ['name']
+ 'command']
}
def compareStructures(self, new, old):