diff options
| author | Joel Andres Granados <jgranado@redhat.com> | 2008-02-25 15:11:47 +0100 |
|---|---|---|
| committer | Joel Andres Granados <jgranado@redhat.com> | 2008-02-26 14:43:55 +0100 |
| commit | cfe9ad54127a42b79f9057d341ec94099630b884 (patch) | |
| tree | 6901da68ca2008d47a4e8c13e713c1f5d2a0497a /plugins/plugin_examples | |
| parent | d811af9085d1c7a1262141d232666354bb2379b1 (diff) | |
| download | firstaidkit-cfe9ad54127a42b79f9057d341ec94099630b884.tar.gz firstaidkit-cfe9ad54127a42b79f9057d341ec94099630b884.tar.xz firstaidkit-cfe9ad54127a42b79f9057d341ec94099630b884.zip | |
Appeninding Return to the class names help to identify them in the plugin code.
Diffstat (limited to 'plugins/plugin_examples')
| -rw-r--r-- | plugins/plugin_examples/dep1.py | 12 | ||||
| -rw-r--r-- | plugins/plugin_examples/dep2.py | 12 | ||||
| -rw-r--r-- | plugins/plugin_examples/dep3.py | 12 | ||||
| -rw-r--r-- | plugins/plugin_examples/sample1Plugin.py | 12 | ||||
| -rw-r--r-- | plugins/plugin_examples/sample2Plugin.py | 28 | ||||
| -rw-r--r-- | plugins/plugin_examples/sample3Plugin/sample3Plugin.py | 24 |
6 files changed, 50 insertions, 50 deletions
diff --git a/plugins/plugin_examples/dep1.py b/plugins/plugin_examples/dep1.py index 533977d..0556561 100644 --- a/plugins/plugin_examples/dep1.py +++ b/plugins/plugin_examples/dep1.py @@ -31,23 +31,23 @@ class Sample1Plugin(Plugin): return set(["sample_dependency"]).union(Plugin.getDeps()) def prepare(self): - self._result=Favorable + self._result=ReturnFavorable def backup(self): - self._result=Favorable + self._result=ReturnFavorable def restore(self): - self._result=Favorable + self._result=ReturnFavorable def diagnose(self): - self._result=Favorable + self._result=ReturnFavorable self.provide("sample_dependency2") def fix(self): - self._result=Unfavorable + self._result=ReturnUnfavorable def clean(self): - self._result=Favorable + self._result=ReturnFavorable def get_plugin(): return Sample1Plugin diff --git a/plugins/plugin_examples/dep2.py b/plugins/plugin_examples/dep2.py index 8339be8..3c49b40 100644 --- a/plugins/plugin_examples/dep2.py +++ b/plugins/plugin_examples/dep2.py @@ -31,22 +31,22 @@ class Sample1Plugin(Plugin): return set(["sample_dependency", "sample_dependency2"]).union(Plugin.getDeps()) def prepare(self): - self._result=Favorable + self._result=ReturnFavorable def backup(self): - self._result=Favorable + self._result=ReturnFavorable def restore(self): - self._result=Favorable + self._result=ReturnFavorable def diagnose(self): - self._result=Favorable + self._result=ReturnFavorable def fix(self): - self._result=Unfavorable + self._result=ReturnUnfavorable def clean(self): - self._result=Favorable + self._result=ReturnFavorable def get_plugin(): return Sample1Plugin diff --git a/plugins/plugin_examples/dep3.py b/plugins/plugin_examples/dep3.py index 53bcac9..f3a329c 100644 --- a/plugins/plugin_examples/dep3.py +++ b/plugins/plugin_examples/dep3.py @@ -27,23 +27,23 @@ class Sample1Plugin(Plugin): Plugin.__init__(self, *args, **kwargs) def prepare(self): - self._result=Favorable + self._result=ReturnFavorable def backup(self): - self._result=Favorable + self._result=ReturnFavorable def restore(self): - self._result=Favorable + self._result=ReturnFavorable def diagnose(self): - self._result=Favorable + self._result=ReturnFavorable self.provide("sample_dependency") def fix(self): - self._result=Unfavorable + self._result=ReturnUnfavorable def clean(self): - self._result=Favorable + self._result=ReturnFavorable def get_plugin(): return Sample1Plugin diff --git a/plugins/plugin_examples/sample1Plugin.py b/plugins/plugin_examples/sample1Plugin.py index 3c5693d..8218104 100644 --- a/plugins/plugin_examples/sample1Plugin.py +++ b/plugins/plugin_examples/sample1Plugin.py @@ -28,27 +28,27 @@ class Sample1Plugin(Plugin): self.reporting = kwargs.get('reporting') def prepare(self): - self._result=Favorable + self._result=ReturnFavorable self.reporting.info("Sample1Plugin in Prepare task", self) def backup(self): - self._result=Favorable + self._result=ReturnFavorable self.reporting.info("Sample1Plugin in backup task", self) def restore(self): - self._result=Favorable + self._result=ReturnFavorable self.reporting.info("Sample1Plugin in Restore task", self) def diagnose(self): - self._result=Favorable + self._result=ReturnFavorable self.reporting.info("Sample1Plugin in diagnose task", self) def fix(self): - self._result=Unfavorable + self._result=ReturnUnfavorable self.reporting.info("Sample1Plugin in Fix task", self) def clean(self): - self._result=Favorable + self._result=ReturnFavorable self.reporting.info("Sample1Plugin in Clean task", self) def get_plugin(): diff --git a/plugins/plugin_examples/sample2Plugin.py b/plugins/plugin_examples/sample2Plugin.py index e3eaea5..4b4764d 100644 --- a/plugins/plugin_examples/sample2Plugin.py +++ b/plugins/plugin_examples/sample2Plugin.py @@ -26,13 +26,13 @@ class Sample2Plugin(Plugin): flows = Flow.init(Plugin) flows["extra"] = Flow({ Plugin.initial: {ReturnValue: "prepare"}, - "prepare" : {Favorable: "diagnose"}, - "diagnose" : {Favorable: "clean", Unfavorable: "backup"}, - "backup" : {Favorable: "fix", Unfavorable: "clean"}, - "restore" : {Favorable: "clean", Unfavorable: "clean"}, - "fix" : {Favorable: "extraStep", Unfavorable: "restore"}, - "extraStep" : {Favorable: "clean", Unfavorable: "clean"}, - "clean" : {Favorable: Plugin.final} + "prepare" : {ReturnFavorable: "diagnose"}, + "diagnose" : {ReturnFavorable: "clean", ReturnUnfavorable: "backup"}, + "backup" : {ReturnFavorable: "fix", ReturnUnfavorable: "clean"}, + "restore" : {ReturnFavorable: "clean", ReturnUnfavorable: "clean"}, + "fix" : {ReturnFavorable: "extraStep", ReturnUnfavorable: "restore"}, + "extraStep" : {ReturnFavorable: "clean", ReturnUnfavorable: "clean"}, + "clean" : {ReturnFavorable: Plugin.final} }, description="Fixing sequence with one added extraStep") default_flow = "extra" @@ -44,25 +44,25 @@ class Sample2Plugin(Plugin): Plugin.__init__(self, *args, **kwargs) def prepare(self): - self._result=Favorable + self._result=ReturnFavorable def clean(self): - self._result=Favorable + self._result=ReturnFavorable def backup(self): - self._result=Favorable + self._result=ReturnFavorable def restore(self): - self._result=Favorable + self._result=ReturnFavorable def diagnose(self): - self._result=Unfavorable + self._result=ReturnUnfavorable def fix(self): - self._result=Favorable + self._result=ReturnFavorable def extraStep(self): - self._result=Favorable + self._result=ReturnFavorable def get_plugin(): return Sample2Plugin diff --git a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py index b4a8138..5d2e362 100644 --- a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py +++ b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py @@ -36,9 +36,9 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable def clean(self): clean = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "clean"] @@ -46,9 +46,9 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable def backup(self): backup = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "backup"] @@ -56,9 +56,9 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable def restore(self): restore = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "restore"] @@ -66,9 +66,9 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable def diagnose(self): diagnose = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "diagnose"] @@ -76,9 +76,9 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable def fix(self): fix = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "fix"] @@ -86,6 +86,6 @@ class Sample3Plugin(Plugin): (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": - self._result=Unfavorable + self._result=ReturnUnfavorable elif out[-4:] == "true": - self._result=Favorable + self._result=ReturnFavorable |
