summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/InfoXML.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-04-20 11:59:53 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-04-20 12:00:19 -0400
commit07096c454d3a75a868f86ba8ce2f3678af934808 (patch)
tree902599e4e084f48569c96f120f8d48b6a7640470 /src/lib/Bcfg2/Server/Lint/InfoXML.py
parent74fe7cebd6f5024dbf336fd37f06644a4011dabe (diff)
downloadbcfg2-07096c454d3a75a868f86ba8ce2f3678af934808.tar.gz
bcfg2-07096c454d3a75a868f86ba8ce2f3678af934808.tar.bz2
bcfg2-07096c454d3a75a868f86ba8ce2f3678af934808.zip
changed the way bcfg2-lint errors are loaded to make it easier to write and use custom plugins
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/InfoXML.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/InfoXML.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/InfoXML.py b/src/lib/Bcfg2/Server/Lint/InfoXML.py
index 2054e23bf..20c218e6f 100644
--- a/src/lib/Bcfg2/Server/Lint/InfoXML.py
+++ b/src/lib/Bcfg2/Server/Lint/InfoXML.py
@@ -4,7 +4,6 @@ import Bcfg2.Server.Lint
class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
""" ensure that all config files have an info.xml file"""
-
def Run(self):
if 'Cfg' in self.core.plugins:
for filename, entryset in self.core.plugins['Cfg'].entries.items():
@@ -18,6 +17,12 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
self.LintError("no-infoxml",
"No info.xml found for %s" % filename)
+ def Errors(self):
+ return {"no-infoxml":"warning",
+ "paranoid-false":"warning",
+ "broken-xinclude-chain":"warning",
+ "required-infoxml-attrs-missing":"error"}
+
def check_infoxml(self, fname, xdata):
for info in xdata.getroottree().findall("//Info"):
required = []