[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [test-API PATCH 2/7] lib: fix streamAPI class

On 03/21/2012 04:45 PM, Guannan Ren wrote:
On 03/21/2012 08:46 PM, Peter Krempa wrote:
The streamAPI class that encapsulates work with libvirt's streams was
fundamentaly broken:
- each call to one of the methods created a new stream and
performed the call
- some methods called virStream methods with different numbers
of arguments
- there was no way to extract the actual libvirt stream object
thanks for the patch.

lib/streamAPI.py | 52
1 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/lib/streamAPI.py b/lib/streamAPI.py
index bc7d217..69e183e 100644
--- a/lib/streamAPI.py
+++ b/lib/streamAPI.py
@@ -38,76 +38,76 @@ append_path(result.group(0))
import exception

- def eventAddCallback(self, flag = 0, cb, opaque):
+ def eventAddCallback(self, cb, opaque):

The API need an argument event to pass in which is virEventHandleType

We could just overdefine it in streamAPI.py which make use of them
easier for
writing testcase.
It's not a good idea to import libvirt.py directly in testcases.

Oh, in this case I'll need to redefine the virConsoleFlags enum in the domainAPI too as I'm importing libvirt.py in my (not yet published ) test that deals with consoles.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]