summaryrefslogtreecommitdiffstats
path: root/tasker/plugins.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-01-02 12:42:47 +0100
committerMartin Sivak <msivak@redhat.com>2008-01-02 12:42:47 +0100
commitd2b141ccdc210dd1f69e4585e9f21c2b0cc1b33a (patch)
tree20c38bb1d7299002cbd0e34391dca1da6dd1a259 /tasker/plugins.py
parentcb8ce9563d58ea6619fe5c5b7a0baf4e4abeb611 (diff)
downloadfirstaidkit-d2b141ccdc210dd1f69e4585e9f21c2b0cc1b33a.tar.gz
firstaidkit-d2b141ccdc210dd1f69e4585e9f21c2b0cc1b33a.tar.xz
firstaidkit-d2b141ccdc210dd1f69e4585e9f21c2b0cc1b33a.zip
Sample plugins with dependencies and some dependency system improvements and bugfixes (one typo..)
Diffstat (limited to 'tasker/plugins.py')
-rw-r--r--tasker/plugins.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/tasker/plugins.py b/tasker/plugins.py
index 53d8c79..8d892c8 100644
--- a/tasker/plugins.py
+++ b/tasker/plugins.py
@@ -89,6 +89,10 @@ class Plugin(object):
The flow is defined in the __init__ so we don't have to worry about changing it.
"""
self._reporting = reporting
+ self._dependencies = dependencies
+
+ self.provide = dependencies.provide
+ self.require = dependencies.require
#
# state we are in.
@@ -138,11 +142,6 @@ class Plugin(object):
raise InvalidFlowNameException(flow)
@classmethod
- def getDeps(cls):
- """Return list of conditions required to be set before automated run can be done"""
- return set()
-
- @classmethod
def getFlows(cls):
"""Return a set with the names of all possible flows."""
fatherf = Plugin._defflows.keys()
@@ -157,6 +156,16 @@ class Plugin(object):
else:
return Plugin._defflows[name]
+ #dependency stuff
+ @classmethod
+ def getDeps(cls):
+ """Return list of conditions required to be set before automated run can be done"""
+ return set()
+
+ #methods available only for instance, see interpreter.py and dependency stuff there
+ #def require(self, id)
+ #def provide(self, id)
+
#list of all actions provided
def actions(self):
"""Returns list of available actions"""