From a57d26e10aac0b8d539243f9919a18b2fb929f69 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 30 Oct 2014 03:30:07 +0100 Subject: Lint: fix default value for lint_plugins This is a bit tricky because we need the enabled server plugins for the default value. To have these available before parsing lint_plugins the server plugins needs to be parsed during early parsing mode. Additional there are lint plugins that has no matching server plugin. To identify them, this adds a reference from the lint plutins to the name of the matching server plugins in the member variable __serverplugin__. If this variable is None the plugin is always used. If a lint plugin could not be imported (maybe because of a missing dependency) the plugin is ignored and not considered as a default value. --- src/lib/Bcfg2/Server/Lint/InfoXML.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/Bcfg2/Server/Lint/InfoXML.py') diff --git a/src/lib/Bcfg2/Server/Lint/InfoXML.py b/src/lib/Bcfg2/Server/Lint/InfoXML.py index 4b1513a11..950a86f01 100644 --- a/src/lib/Bcfg2/Server/Lint/InfoXML.py +++ b/src/lib/Bcfg2/Server/Lint/InfoXML.py @@ -15,6 +15,7 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin): * Paranoid mode disabled in an ``info.xml`` file; * Required attributes missing from ``info.xml`` """ + __serverplugin__ = 'Cfg' options = Bcfg2.Server.Lint.ServerPlugin.options + [ Bcfg2.Options.Common.default_paranoid, -- cgit v1.2.3-1-g7c22