summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Bundler.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-30 16:03:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-04 15:27:10 -0400
commit110861ec9d8cd70dc75ca8ca33b66db8060e761c (patch)
tree66ccabde67373d663da0d0bbfcbe49651fa86c25 /src/lib/Bcfg2/Server/Plugins/Bundler.py
parent0f7b300fe182c48c7e4c36e43a1f439fcde8fb54 (diff)
downloadbcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.tar.gz
bcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.tar.bz2
bcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.zip
XMLFileBacked: Monitor XIncludes whenever a FAM is available
This monitors XIncluded files even if should_monitor=False, since the object monitoring the base file will not monitor XIncludes. This ensures that XIncluded files are properly monitored whenever possible, particularly for Bundler and Properties. This is a partial backport of 5b66845 -- as much of a backport as is possible without a module-level FAM object.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Bundler.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Bundler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Bundler.py b/src/lib/Bcfg2/Server/Plugins/Bundler.py
index eef176cca..fb327f7ef 100644
--- a/src/lib/Bcfg2/Server/Plugins/Bundler.py
+++ b/src/lib/Bcfg2/Server/Plugins/Bundler.py
@@ -38,9 +38,9 @@ if HAS_GENSHI:
Bcfg2.Server.Plugin.StructFile):
""" Representation of a Genshi-templated bundle XML file """
- def __init__(self, name, specific, encoding):
+ def __init__(self, name, specific, encoding, fam=None):
TemplateFile.__init__(self, name, specific, encoding)
- Bcfg2.Server.Plugin.StructFile.__init__(self, name)
+ Bcfg2.Server.Plugin.StructFile.__init__(self, name, fam=fam)
self.logger = logging.getLogger(name)
def get_xml_value(self, metadata):
@@ -106,13 +106,14 @@ class Bundler(Bcfg2.Server.Plugin.Plugin,
nsmap['py'] == 'http://genshi.edgewall.org/')):
if HAS_GENSHI:
spec = Bcfg2.Server.Plugin.Specificity()
- return BundleTemplateFile(name, spec, self.encoding)
+ return BundleTemplateFile(name, spec, self.encoding,
+ fam=self.core.fam)
else:
raise Bcfg2.Server.Plugin.PluginExecutionError("Genshi not "
"available: %s"
% name)
else:
- return BundleFile(name, self.fam)
+ return BundleFile(name, fam=self.fam)
def BuildStructures(self, metadata):
"""Build all structures for client (metadata)."""