summaryrefslogtreecommitdiffstats
path: root/plugins/sample3Plugin
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2007-11-22 15:11:43 +0100
committerJoel Andres Granados <jgranado@redhat.com>2007-11-22 15:11:43 +0100
commit9a6c6d665c7d9c9da78ea5488bcd4b8b7f7df211 (patch)
tree8ca389e60ff2d894bad023454430268ce259c376 /plugins/sample3Plugin
parent83d9690c02e9189ec8ceddc92b2c400f0b1521cb (diff)
downloadfirstaidkit-9a6c6d665c7d9c9da78ea5488bcd4b8b7f7df211.tar.gz
firstaidkit-9a6c6d665c7d9c9da78ea5488bcd4b8b7f7df211.tar.xz
firstaidkit-9a6c6d665c7d9c9da78ea5488bcd4b8b7f7df211.zip
Change all references from init to prepare.
Change all references from purge to clean. Log a warning when abstract functions are not used.
Diffstat (limited to 'plugins/sample3Plugin')
-rw-r--r--plugins/sample3Plugin/__init__.py2
-rwxr-xr-xplugins/sample3Plugin/plugin8
-rw-r--r--plugins/sample3Plugin/sample3Plugin.py12
3 files changed, 11 insertions, 11 deletions
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":