Change in vdsm[master]: add api registeration mechanism

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Mon Jun 25 08:12:13 UTC 2012


Zhou Zheng Sheng has posted comments on this change.

Change subject: add api registeration mechanism
......................................................................


Patch Set 1: (5 inline comments)

....................................................
File tests/apiTests.py
Line 10:     @abstractmethod
In @API.publicAPI, we will tag abstractmethod to all the methods except those starts with "_", right? So the @abstractmethod will be a duplicated tag here. If we tag @abstractmethod here, the func will probably get the tag twice.

Line 45:     
Seems some trailing spaces here.

Line 58:         self.assertRaises(TypeError, API.A)
When will TypeError be raised? As far as I know, implementation class with unimplemented method can pass issubclass test. TypeError is raised when we want to instantiate it. So I think if we are expecting TypeError here, we must first "API.A()" first.

....................................................
File vdsm/API.py
Line 77:                 kargs.update(object.__getattribute__(self, "kargs"))
In functools.partial, kargs will override and extend self.kargs, but here self.kargs overrides and extend kargs.
http://docs.python.org/library/functools.html?highlight=functools#functools.partial

Line 88:     
Seems some trailing spaces here.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8eabbec2526041e548591b62252d754b1f5934b5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xu He Jie <xuhj at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list