Nir Soffer has posted comments on this change.

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


Patch Set 2:

(3 comments)

....................................................
File vdsm/BindingXMLRPC.py
Line 140
Line 141
Line 142
Line 143
Line 144
Why self was not correct here?


Line 79:         self.server.server_close()
Line 80:         self._thread.join()
Line 81:         return {'status': doneCode}
Line 82: 
Line 83:     @staticmethod
Why is this not an instance method?

I prefer to module level functions - static method makes caller code uglier. 
For example:

    foo.Foo.soSomething()

Instead of:

    foo.doSomething()

Anyway I'm against a bigger patch if this one liner fixes the issue. Please 
keep patches minimal.
Line 84:     def updateTimestamp():
Line 85:         # FIXME: The setup+editNetwork API uses this log file to
Line 86:         # determine if this host is still accessible.  We use a
Line 87:         # file (rather than an event) because setup+editNetwork is


Line 938: 
Line 939: def wrapApiMethod(f):
Line 940:     def wrapper(*args, **kwargs):
Line 941:         try:
Line 942:             BindingXMLRPC.updateTimestamp()
This is certainly better than f.im_self - happy to see this hack removed.
Line 943:             logLevel = logging.DEBUG
Line 944:             if f.__name__ in ('getVMList', 'getAllVmStats', 
'getStats',
Line 945:                               'fenceNode'):
Line 946:                 logLevel = logging.TRACE


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibab01ef654e7ac469ea0a2594c4744918ae24819
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amul...@redhat.com>
Gerrit-Reviewer: Assaf Muller <amul...@redhat.com>
Gerrit-Reviewer: Bala.FA <barum...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to