aboutsummaryrefslogtreecommitdiffstats
path: root/AUTHORS
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-03-12 20:25:19 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-03-13 10:50:22 +0000
commit4d1351efbd09220c36e889e222c40fe3ae68958a (patch)
treea877d1f6f0d19d16406da667b9d9f4518a386613 /AUTHORS
parent3eb24386719ee06c9e726550065c5427f1021c6f (diff)
downloadsos-4d1351efbd09220c36e889e222c40fe3ae68958a.tar.gz
Match plugins against policies
Fixes Issue #238. When tagging classes are used to enable plugins on multiple platforms it is possible for there to be more than one valid class instance for a given policy. For e.g.: class DebianFooPlugin(Plugin, DebianPlugin): /// class UbuntuFooPlugin(Plugin, UbuntuPlugin): /// Since UbuntuPolicy includes both DebianPlugin and UbuntuPlugin in its valid_subclasses list both classes pass the validity test and both are added to the loaded_plugins list. This causes plugins to run twice: 2014-03-12 19:57:50,974 DEBUG: copying file /var/log/mail.log to /var/log/mail.log 2014-03-12 19:57:50,975 DEBUG: added /var/log/mail.log to FileCacheArchive /tmp/sosreport-u1210-vm1-20140312195750 2014-03-12 19:57:51,293 DEBUG: copying file /var/log/mail.log to /var/log/mail.log 2014-03-12 19:57:51,294 DEBUG: added /var/log/mail.log to FileCacheArchive /tmp/sosreport-u1210-vm1-20140312195750 Fix this by adding a match_plugin() method to the policy base class and prefer plugins that are subclasses of the first entry in the list. This patch also reverses the order of the valid_subclasses list for the UbuntuPolicy to ensure preference is given to native plugins: self.valid_subclasses = [UbuntuPlugin, DebianPlugin] Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions