Commit 5afa8085 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont 🤔
Browse files

Remove outcomes from the plugins

The 'outcome' database field contains the long description of the
plugin output.
parent 1aa1e28a
...@@ -203,8 +203,7 @@ class Plugins(object): ...@@ -203,8 +203,7 @@ class Plugins(object):
# The 'plugin' object points to the class containing the actual plugin/test # The 'plugin' object points to the class containing the actual plugin/test
if hasattr(module, 'plugin'): if hasattr(module, 'plugin'):
p = getattr(module, 'plugin')(name=plugin, changes=self.changes, \ p = getattr(module, 'plugin')(name=plugin, changes=self.changes, \
changes_file=self.changes_file, tempdir=self.tempdir, \ changes_file=self.changes_file, tempdir=self.tempdir)
outcomes=getattr(module, 'outcomes'))
for item in self.kw: for item in self.kw:
setattr(p, item, self.kw[item]) setattr(p, item, self.kw[item])
......
...@@ -77,8 +77,6 @@ class BasePlugin(object): ...@@ -77,8 +77,6 @@ class BasePlugin(object):
``severity`` ``severity``
Severity of the result. Severity of the result.
""" """
if data is None:
data = self.outcomes.get(outcome)['name']
self.result.append(PluginResult(from_plugin=self.name, outcome=outcome, self.result.append(PluginResult(from_plugin=self.name, outcome=outcome,
data=data, severity=severity)) data=data, severity=severity))
...@@ -96,8 +94,6 @@ class BasePlugin(object): ...@@ -96,8 +94,6 @@ class BasePlugin(object):
Severity of the result. Severity of the result.
""" """
if data is None:
data = self.outcomes.get(outcome)['name']
self.result.append(PluginResult(from_plugin=self.name, outcome=outcome, self.result.append(PluginResult(from_plugin=self.name, outcome=outcome,
data=data, severity=severity)) data=data, severity=severity))
...@@ -111,12 +107,6 @@ class BasePlugin(object): ...@@ -111,12 +107,6 @@ class BasePlugin(object):
``data`` ``data``
Resulting data from the plugin, like more detail about the process. Resulting data from the plugin, like more detail about the process.
""" """
if data is None:
try:
data = self.outcomes.get(outcome)['name']
except TypeError:
data = self.outcomes.get(outcome)
self.result.append(PluginResult(from_plugin=self.name, outcome=outcome, self.result.append(PluginResult(from_plugin=self.name, outcome=outcome,
data=data, severity=constants.PLUGIN_SEVERITY_INFO)) data=data, severity=constants.PLUGIN_SEVERITY_INFO))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment