summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-12 09:04:58 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-12 09:04:58 -0400
commit97a78bb7e487f2fec0595f585e3295625b2df062 (patch)
tree2dedd73c82820ad58907c58187663ed2442da80d /src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
parente10a759d9bc471e0089ce773ae81440fb9a8d854 (diff)
downloadbcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.tar.gz
bcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.tar.bz2
bcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.zip
converted Packages to use ClientRunHooks instead of abusing GoalValidator
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/__init__.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/__init__.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py b/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
index 5a804a4cd..6d14dc37c 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
@@ -15,7 +15,7 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.StructureValidator,
Bcfg2.Server.Plugin.Generator,
Bcfg2.Server.Plugin.Connector,
- Bcfg2.Server.Plugin.GoalValidator):
+ Bcfg2.Server.Plugin.ClientRunHooks):
name = 'Packages'
conflicts = ['Pkgmgr']
experimental = True
@@ -26,7 +26,7 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.StructureValidator.__init__(self)
Bcfg2.Server.Plugin.Generator.__init__(self)
Bcfg2.Server.Plugin.Connector.__init__(self)
- Bcfg2.Server.Plugin.Probing.__init__(self)
+ Bcfg2.Server.Plugin.ClientRunHooks.__init__(self)
self.sentinels = set()
self.cachepath = os.path.join(self.data, 'cache')
@@ -276,10 +276,8 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
collection = self._get_collection(metadata)
return dict(sources=collection.get_additional_data())
- def validate_goals(self, metadata, _):
- """ we abuse the GoalValidator plugin since validate_goals()
- is the very last thing called during a client config run. so
- we use this to clear the collection cache for this client,
- which must persist only the duration of a client run """
+ def end_client_run(self, metadata):
+ """ clear the collection cache for this client, which must
+ persist only the duration of a client run"""
if metadata.hostname in Collection.clients:
del Collection.clients[metadata.hostname]