summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/GroupPatterns.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-10-30 03:30:07 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2014-10-30 04:09:47 +0100
commita57d26e10aac0b8d539243f9919a18b2fb929f69 (patch)
tree0b335c51ff8965a538d7a2fb37a845e0dd327a2c /src/lib/Bcfg2/Server/Lint/GroupPatterns.py
parente2bdcfa904b7858f369e95cced1a6b2e93fa5a10 (diff)
downloadbcfg2-a57d26e10aac0b8d539243f9919a18b2fb929f69.tar.gz
bcfg2-a57d26e10aac0b8d539243f9919a18b2fb929f69.tar.bz2
bcfg2-a57d26e10aac0b8d539243f9919a18b2fb929f69.zip
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.
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/GroupPatterns.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/GroupPatterns.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/GroupPatterns.py b/src/lib/Bcfg2/Server/Lint/GroupPatterns.py
index d8142cab9..8ddb9e796 100644
--- a/src/lib/Bcfg2/Server/Lint/GroupPatterns.py
+++ b/src/lib/Bcfg2/Server/Lint/GroupPatterns.py
@@ -13,6 +13,7 @@ class GroupPatterns(ServerPlugin):
:class:`Bcfg2.Server.Plugins.GroupPatterns.PatternMap` object for
each pattern, and catching exceptions and presenting them as
``bcfg2-lint`` errors."""
+ __serverplugin__ = 'GroupPatterns'
def Run(self):
cfg = self.core.plugins['GroupPatterns'].config