summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Lint
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2011-05-11 14:40:10 -0500
committerNarayan Desai <desai@mcs.anl.gov>2011-05-11 14:40:10 -0500
commit6b4d48c2f95918e36aca674d44144c7c5ae6fe19 (patch)
tree088b411f0abca7d8db9a7a882cf389dd9f2d532c /src/lib/Server/Lint
parent0e75875e9bd9900a6a3c7ab118c448e48829eaef (diff)
parent7a03a93da1701fd14a7c7195b01557ba3e6b24c5 (diff)
downloadbcfg2-6b4d48c2f95918e36aca674d44144c7c5ae6fe19.tar.gz
bcfg2-6b4d48c2f95918e36aca674d44144c7c5ae6fe19.tar.bz2
bcfg2-6b4d48c2f95918e36aca674d44144c7c5ae6fe19.zip
Merge branch 'master' of git.mcs.anl.gov:bcfg2
Diffstat (limited to 'src/lib/Server/Lint')
-rw-r--r--src/lib/Server/Lint/InfoXML.py10
-rw-r--r--src/lib/Server/Lint/Validate.py4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Server/Lint/InfoXML.py b/src/lib/Server/Lint/InfoXML.py
index 7725ad748..c88e54e95 100644
--- a/src/lib/Server/Lint/InfoXML.py
+++ b/src/lib/Server/Lint/InfoXML.py
@@ -13,12 +13,13 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if self.HandlesFile(infoxml_fname):
if (hasattr(entryset, "infoxml") and
entryset.infoxml is not None):
- self.check_infoxml(entryset.infoxml.pnode.data)
+ self.check_infoxml(infoxml_fname,
+ entryset.infoxml.pnode.data)
else:
self.LintError("no-infoxml",
"No info.xml found for %s" % filename)
- def check_infoxml(self, xdata):
+ def check_infoxml(self, fname, xdata):
for info in xdata.getroottree().findall("//Info"):
required = []
if "required_attrs" in self.config:
@@ -28,8 +29,7 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if missing:
self.LintError("required-infoxml-attrs-missing",
"Required attribute(s) %s not found in %s:%s" %
- (",".join(missing), infoxml_fname,
- self.RenderXML(info)))
+ (",".join(missing), fname, self.RenderXML(info)))
if ((Bcfg2.Options.MDATA_PARANOID.value and
info.get("paranoid") is not None and
@@ -39,5 +39,5 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
info.get("paranoid").lower() != "true"))):
self.LintError("paranoid-false",
"Paranoid must be true in %s:%s" %
- (infoxml_fname, self.RenderXML(info)))
+ (fname, self.RenderXML(info)))
diff --git a/src/lib/Server/Lint/Validate.py b/src/lib/Server/Lint/Validate.py
index c87c55ee9..834608378 100644
--- a/src/lib/Server/Lint/Validate.py
+++ b/src/lib/Server/Lint/Validate.py
@@ -24,7 +24,9 @@ class Validate(Bcfg2.Server.Lint.ServerlessPlugin):
"%s/Decisions/*.xml":"%s/decisions.xsd",
"%s/Packages/config.xml":"%s/packages.xsd",
"%s/GroupPatterns/config.xml":"%s/grouppatterns.xsd",
- "%s/NagiosGen/config.xml":"%s/nagiosgen.xsd"}
+ "%s/NagiosGen/config.xml":"%s/nagiosgen.xsd",
+ "%s/FileProbes/config.xml":"%s/fileprobes.xsd",
+ }
self.filelists = {}
self.get_filelists()