summaryrefslogtreecommitdiffstats
path: root/plugins/plugin_examples/sample2Plugin.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-02-28 16:08:09 +0100
committerMartin Sivak <msivak@redhat.com>2008-02-28 16:08:09 +0100
commitb2c3417bb9704b8afab1a0053f100c252a4c8ed5 (patch)
treed62f0b964d488ac081e435f026ffce37ebd404fd /plugins/plugin_examples/sample2Plugin.py
parent70efb5c67c477c8b9a801686878f158b0cbdb262 (diff)
downloadfirstaidkit-b2c3417bb9704b8afab1a0053f100c252a4c8ed5.tar.gz
firstaidkit-b2c3417bb9704b8afab1a0053f100c252a4c8ed5.tar.xz
firstaidkit-b2c3417bb9704b8afab1a0053f100c252a4c8ed5.zip
Modify the plugins, tasker and cli launcher to provide means to split the flows into diagnostics and fixes.
So when the user launches ./firstaidkit -a it runs only diagnostics. For fixing use ./firstaidkit -a fix
Diffstat (limited to 'plugins/plugin_examples/sample2Plugin.py')
-rw-r--r--plugins/plugin_examples/sample2Plugin.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/plugin_examples/sample2Plugin.py b/plugins/plugin_examples/sample2Plugin.py
index 5b471e0..e48389a 100644
--- a/plugins/plugin_examples/sample2Plugin.py
+++ b/plugins/plugin_examples/sample2Plugin.py
@@ -19,12 +19,12 @@ from pyfirstaidkit.plugins import Plugin,Flow
from pyfirstaidkit.returns import *
class Sample2Plugin(Plugin):
- """This plugin will defin one more function and use it in a newly defined flow."""
+ """This plugin will defin one more function and use it in a newly defined fix flow."""
#
# Additional flow defprepareion.
#
flows = Flow.init(Plugin)
- flows["extra"] = Flow({
+ flows["fix"] = Flow({
Plugin.initial: {Return: "prepare"},
"prepare" : {ReturnSuccess: "diagnose"},
"diagnose" : {ReturnSuccess: "clean", ReturnFailure: "backup"},
@@ -34,7 +34,6 @@ class Sample2Plugin(Plugin):
"extraStep" : {ReturnSuccess: "clean", ReturnFailure: "clean"},
"clean" : {ReturnSuccess: Plugin.final}
}, description="Fixing sequence with one added extraStep")
- default_flow = "extra"
name = "Sample2Plugin"
version = "0.0.1"