Change in vdsm[ovirt-3.3]: Gluster API verbs will now be callable again

amuller at redhat.com amuller at redhat.com
Tue Jan 7 14:42:39 UTC 2014


Assaf Muller has uploaded a new change for review.

Change subject: Gluster API verbs will now be callable again
......................................................................

Gluster API verbs will now be callable again

Fix regression introduced in #22967.

wrapApiMethod was using the function's class 'updateTimestamp',
but updateTimestamp is defined in BindingXMLRPC and doesn't exist
in the GlusterAPI class. This patch moves 'updateTimestamp' to be
a static method.

Change-Id: I1513a5dca444c3e176fb31a9425da85980401b0f
Signed-off-by: Assaf Muller <amuller at redhat.com>
---
M vdsm/BindingXMLRPC.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/23045/1

diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index c4b4737..9542314 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -88,7 +88,8 @@
                 'lastClient': self.cif.threadLocal.client,
                 'lastClientIface': getIfaceByIP(self.cif.threadLocal.server)}
 
-    def updateTimestamp(self):
+    @staticmethod
+    def updateTimestamp():
         # FIXME: The setup+editNetwork API uses this log file to
         # determine if this host is still accessible.  We use a
         # file (rather than an event) because setup+editNetwork is
@@ -150,7 +151,7 @@
     def _registerFunctions(self):
         def wrapIrsMethod(f):
             def wrapper(*args, **kwargs):
-                self.updateTimestamp()
+                BindingXMLRPC.updateTimestamp()
                 fmt = ""
                 logargs = []
 
@@ -940,7 +941,7 @@
 def wrapApiMethod(f):
     def wrapper(*args, **kwargs):
         try:
-            f.im_self.updateTimestamp()
+            BindingXMLRPC.updateTimestamp()
             logLevel = logging.DEBUG
             if f.__name__ in ('getVMList', 'getAllVmStats', 'getStats',
                               'fenceNode'):


-- 
To view, visit http://gerrit.ovirt.org/23045
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1513a5dca444c3e176fb31a9425da85980401b0f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Assaf Muller <amuller at redhat.com>


More information about the vdsm-patches mailing list