diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-06-12 09:04:58 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-06-12 09:04:58 -0400 |
commit | 97a78bb7e487f2fec0595f585e3295625b2df062 (patch) | |
tree | 2dedd73c82820ad58907c58187663ed2442da80d /src/lib | |
parent | e10a759d9bc471e0089ce773ae81440fb9a8d854 (diff) | |
download | bcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.tar.gz bcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.tar.bz2 bcfg2-97a78bb7e487f2fec0595f585e3295625b2df062.zip |
converted Packages to use ClientRunHooks instead of abusing GoalValidator
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/__init__.py | 12 |
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] |