2010/1/19 Iustin Pop <ius...@google.com>: > LGTM except for the following:
I guess only after removing “Luxi” and “Method” from the names? > The CallLuxiMethod/_SendMethodCall rewrite seems to complicate matters > for me. > > Instead of one function before, you have now three functions, one of > which is simply a wrapper over CallLuxiMethod. Which, because it uses > explicitly FormatRequest/ParseResponse, means it can ever be used > (except mocks) via a transport.Call() method (you couldn't use it in > server, for example). > > Why not add CallLuxiMethod directly to the client class and remove the > intermediate _SendMethodCall? (At this point, client.CallMethod is > simply a convenience wrapper over CallLuxiMethod, which makes me think > the rewrite is not good). I introduced CallLuxiMethod in preparation for the protocol change as proposed for Ganeti 2.2 (see design-2.2.rst). It would allow for code reuse by just passing another transport_cb to luxi.CallLuxiMethod. Regards, Michael