summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-16 10:53:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-16 10:53:23 -0400
commit38f3cfcfdbf36bca3b048cc87e6d11e0c883673b (patch)
tree6a12ce51ad9078dd843dc41f668da3a77e889979 /src/lib/Bcfg2/Server/Plugin
parent35498c8b849c15632d720656d5736c4c85f76b53 (diff)
downloadbcfg2-38f3cfcfdbf36bca3b048cc87e6d11e0c883673b.tar.gz
bcfg2-38f3cfcfdbf36bca3b048cc87e6d11e0c883673b.tar.bz2
bcfg2-38f3cfcfdbf36bca3b048cc87e6d11e0c883673b.zip
Rewrote arbitrary data cache system
The caching facilities in Bcfg2.Server.Cache provided basically no features. This rewrites that to allow for much more powerful cache expiration, with a particular focus on interoperation between different components and plugins to let caches be expired as necessary. (E.g., the Probes plugin can expire the Metadata cache.) This does not affect any of the file data cached by Bcfg2, only the caches that are populated with arbitrary data (Metadata, Packages, Probes, etc.).
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin')
-rw-r--r--src/lib/Bcfg2/Server/Plugin/helpers.py2
-rw-r--r--src/lib/Bcfg2/Server/Plugin/interfaces.py19
2 files changed, 2 insertions, 19 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py
index cfdb25cd6..38491b05d 100644
--- a/src/lib/Bcfg2/Server/Plugin/helpers.py
+++ b/src/lib/Bcfg2/Server/Plugin/helpers.py
@@ -961,6 +961,8 @@ class PrioDir(Plugin, Generator, XMLDirectoryBacked):
self.Entries = {}
for src in self.entries.values():
for child in src.xdata.iterchildren():
+ if child.tag in ['Group', 'Client']:
+ continue
if child.tag not in self.Entries:
self.Entries[child.tag] = dict()
self.Entries[child.tag][child.get("name")] = self.BindEntry
diff --git a/src/lib/Bcfg2/Server/Plugin/interfaces.py b/src/lib/Bcfg2/Server/Plugin/interfaces.py
index 30275f6ad..619d72afd 100644
--- a/src/lib/Bcfg2/Server/Plugin/interfaces.py
+++ b/src/lib/Bcfg2/Server/Plugin/interfaces.py
@@ -632,22 +632,3 @@ class ClientACLs(object):
:returns: bool
"""
return True
-
-
-class Caching(object):
- """ A plugin that caches more than just the data received from the
- FAM. This presents a unified interface to clear the cache. """
-
- def expire_cache(self, key=None):
- """ Expire the cache associated with the given key.
-
- :param key: The key to expire the cache for. Because cache
- implementations vary tremendously between plugins,
- this could be any number of things, but generally
- a hostname. It also may or may not be possible to
- expire the cache for a single host; this interface
- does not require any guarantee about that.
- :type key: varies
- :returns: None
- """
- raise NotImplementedError