diff options
author | Martin Sivak <msivak@redhat.com> | 2008-02-28 16:08:09 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-02-28 16:08:09 +0100 |
commit | b2c3417bb9704b8afab1a0053f100c252a4c8ed5 (patch) | |
tree | d62f0b964d488ac081e435f026ffce37ebd404fd /plugins/plugin_examples/sample2Plugin.py | |
parent | 70efb5c67c477c8b9a801686878f158b0cbdb262 (diff) | |
download | firstaidkit-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.py | 5 |
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" |