[rhmessaging-commits] rhmessaging commits: r4064 - mgmt/newdata/cumin/python/cumin/grid.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Jul 2 09:12:54 EDT 2010


Author: eallen
Date: 2010-07-02 09:12:54 -0400 (Fri, 02 Jul 2010)
New Revision: 4064

Modified:
   mgmt/newdata/cumin/python/cumin/grid/negotiator.py
Log:
Fix argument count to do_enter

Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.py	2010-07-01 19:39:08 UTC (rev 4063)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.py	2010-07-02 13:12:54 UTC (rev 4064)
@@ -94,7 +94,7 @@
         # is user
         if "." in data[0] and self.user_task:
             href = "%s" % self.user_task.get_href \
-                (session, (self.negotiator.get(session), data[0]))
+                (session, (self.negotiator.get(session)))
         else:
             href = self.task.get_href(session)
         content = data[2][2] and str(data[1]) or "NOT SET"
@@ -883,7 +883,7 @@
 
         self.form = NegotiatorLimitSetForm(module.app, self.name, self)
 
-    def do_enter(self, session):
+    def do_enter(self, session, osession):
         pass
         #self.form.negotiator.set(session, limit[0])
         #self.form.limit_name.set(session, limit[1])
@@ -895,11 +895,13 @@
         action = SetLimit(self.app)
         result = action.execute(negotiator, name, max)
         if result.error:
-            invoc.exception(invod, result.error)
-        else:
-            action = QmfCall(self.app)
-            action.execute(negotiator, "Reconfig")
+            raise result.error
 
+        invoc.status_code = invoc.status
+
+        action = QmfCall(self.app)
+        action.execute(negotiator, "Reconfig")
+
         invoc.end()
 
 class NegotiatorGroupTask(ObjectTask):
@@ -910,8 +912,13 @@
         # don't call self.qmf_call here since we need to
         # wait for the response before making the next QMF call
         action = QmfCall(self.app)
-        action.execute(negotiator, "SetRawConfig", group, value)
+        result = action.execute(negotiator, "SetRawConfig", group, value)
+        if result.error:
+            raise result.error
 
+        invoc.status_code = invoc.status
+        invoc.end()
+
     def reconfig(self, negotiator):
         action = QmfCall(self.app)
         action.execute(negotiator, "Reconfig")
@@ -962,12 +969,12 @@
         return "Edit static quota"
 
 class NegotiatorUserTask(NegotiatorGroupTask):
-    def do_enter(self, session):
+    def do_enter(self, session, osession):
         #try:
         #    negotiator, group = ng
         #except:
         #    raise Exception("Must supply group for user forms")
-        super(NegotiatorUserTask, self).do_enter(session)
+        super(NegotiatorUserTask, self).do_enter(session, osession)
         #self.form.group.set(session, group)
 
 class NegotiatorUserPrioFactor(NegotiatorUserTask):



More information about the rhmessaging-commits mailing list