From 9a6c6d665c7d9c9da78ea5488bcd4b8b7f7df211 Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Thu, 22 Nov 2007 15:11:43 +0100 Subject: Change all references from init to prepare. Change all references from purge to clean. Log a warning when abstract functions are not used. --- plugins/sample3Plugin/__init__.py | 2 +- plugins/sample3Plugin/plugin | 8 ++++---- plugins/sample3Plugin/sample3Plugin.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/sample3Plugin') diff --git a/plugins/sample3Plugin/__init__.py b/plugins/sample3Plugin/__init__.py index 5c2e2c5..59de871 100644 --- a/plugins/sample3Plugin/__init__.py +++ b/plugins/sample3Plugin/__init__.py @@ -1,3 +1,3 @@ import sample3Plugin def get_plugin(): - return FirstAidKit.plugins.sample3Plugin.Sample3Plugin() + return sample3Plugin.Sample3Plugin() diff --git a/plugins/sample3Plugin/plugin b/plugins/sample3Plugin/plugin index 9cf7e03..c3099a5 100755 --- a/plugins/sample3Plugin/plugin +++ b/plugins/sample3Plugin/plugin @@ -21,14 +21,14 @@ else fi -if [ $TASK = "init" ]; then - echo init true +if [ $TASK = "prepare" ]; then + echo prepare true fi if [ $TASK = "diagnose" ]; then echo diagnose false fi -if [ $TASK = "purge" ]; then - echo purge true +if [ $TASK = "clean" ]; then + echo clean true fi if [ $TASK = "fix" ]; then echo fix true diff --git a/plugins/sample3Plugin/sample3Plugin.py b/plugins/sample3Plugin/sample3Plugin.py index 415d4ba..7e8a4c2 100644 --- a/plugins/sample3Plugin/sample3Plugin.py +++ b/plugins/sample3Plugin/sample3Plugin.py @@ -24,10 +24,10 @@ class Sample3Plugin(Plugin): def __init__(self): Plugin.__init__(self) - def init(self): + def prepare(self): # Prepare command line. - init = ["/usr/lib/FirstAidKit/plugins/sample3Plugin/plugin", "--task", "init"] - proc = subprocess.Popen(init, stdout=subprocess.PIPE) + prepare = ["/usr/lib/FirstAidKit/plugins/sample3Plugin/plugin", "--task", "prepare"] + proc = subprocess.Popen(prepare, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": @@ -36,9 +36,9 @@ class Sample3Plugin(Plugin): self._result=ReturnValueTrue return self._result - def purge(self): - purge = ["/usr/lib/FirstAidKit/plugins/sample3Plugin/plugin", "--task", "purge"] - proc = subprocess.Popen(purge, stdout=subprocess.PIPE) + def clean(self): + clean = ["/usr/lib/FirstAidKit/plugins/sample3Plugin/plugin", "--task", "clean"] + proc = subprocess.Popen(clean, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() if out[-5:] == "false": -- cgit