Author: eallen
Date: 2010-05-10 13:45:19 -0400 (Mon, 10 May 2010)
New Revision: 3953
Modified:
mgmt/newdata/cumin/python/cumin/objecttask.py
Log:
Moved invoke and do_invoke to base class
Modified: mgmt/newdata/cumin/python/cumin/objecttask.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/objecttask.py 2010-05-10 17:25:54 UTC (rev 3952)
+++ mgmt/newdata/cumin/python/cumin/objecttask.py 2010-05-10 17:45:19 UTC (rev 3953)
@@ -71,6 +71,20 @@
return invoc
+ def invoke(self, session, obj, *args):
+ if obj:
+ assert isinstance(obj, RosemaryObject), obj
+
+ invoc = self.start(session, obj)
+
+ try:
+ self.do_invoke(invoc, obj, *args)
+ except Exception, e:
+ self.exception(invoc, e)
+
+ def do_invoke(self, invoc, obj, *args):
+ pass
+
def qmf_call(self, invoc, obj, meth, *args):
def completion(status_code, output_args):
invoc.status_code = status_code
@@ -119,20 +133,6 @@
def do_enter(self, session):
pass
- def invoke(self, session, obj, *args):
- if obj:
- assert isinstance(obj, RosemaryObject), obj
-
- invoc = self.start(session, obj)
-
- try:
- self.do_invoke(invoc, obj, *args)
- except Exception, e:
- self.exception(invoc, e)
-
- def do_invoke(self, invoc, obj, *args):
- pass
-
class TaskInvocation(object):
PENDING = "pending"
FAILED = "failed"
Show replies by date