summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-21 08:50:06 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-21 08:50:06 -0400
commit6da7d24710fe67c80c4a71f227cd01675eebca88 (patch)
treef8aae1f09b879d58e8fab10db1b896284b44e32d /src/lib/Server
parent57f6972c4ff063a0fdeff832772af8c18f2ea044 (diff)
downloadbcfg2-6da7d24710fe67c80c4a71f227cd01675eebca88.tar.gz
bcfg2-6da7d24710fe67c80c4a71f227cd01675eebca88.tar.bz2
bcfg2-6da7d24710fe67c80c4a71f227cd01675eebca88.zip
Lots of cleanup for bcfg2-repo-validate rewrite:
* Changed all references to bcfg2-repo-validate in the documentation to bcfg2-lint * Wrote man pages for bcfg2-lint and bcfg2-lint.conf * Cleaned up straggling references to bcfg2-repo-validate in Makefiles, spec files, and the POSIX tool * A few minor bug fixes
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Lint/InfoXML.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/Server/Lint/InfoXML.py b/src/lib/Server/Lint/InfoXML.py
index 097c2d6f9..42679109a 100644
--- a/src/lib/Server/Lint/InfoXML.py
+++ b/src/lib/Server/Lint/InfoXML.py
@@ -15,8 +15,8 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
xdata = entryset.infoxml.pnode.data
for info in xdata.getroottree().findall("//Info"):
required = ["owner", "group", "perms"]
- if "required" in self.config:
- required = self.config["required"].split(",")
+ if "required_attrs" in self.config:
+ required = self.config["required_attrs"].split(",")
missing = [attr for attr in required
if info.get(attr) is None]
@@ -27,8 +27,12 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if ("require_paranoid" in self.config and
self.config["require_paranoid"].lower() == "true" and
- not Bcfg2.Options.MDATA_PARANOID.value and
- info.get("paranoid").lower() != "true"):
+ (Bcfg2.Options.MDATA_PARANOID.value and
+ info.get("paranoid") is not None and
+ info.get("paranoid").lower() == "false") or
+ (not Bcfg2.Options.MDATA_PARANOID.value and
+ (info.get("paranoid") is None or
+ info.get("paranoid").lower() != "true"))):
self.LintError("Paranoid must be true in %s:%s" %
(infoxml_fname,
self.RenderXML(info)))