On 06/05/2013 10:51 AM, wlbleaboy@126 wrote: > I build a local sdk base on ovirt-engine-sdk-python, I do that like this: > > First, I created a python file naked wrap.py, in wrap.py I have > a class naked CWrap , CWrap have some interface for get vm's information > and connect to ovirt-enginelike: > login(), getVmName(), getVmId(), getVmPort(), getVmTicket() etc. > > second, I created a C file named engine-sdk.c, in this file I also implement > > some interface like getVmName() etc. but in this file, all the function is > call python module like > PyObject *pyVmId; > char *vmId; > > pyVmId = PyObject_CallMethod(pInstant, "getVmId", "(i)", vmIndex); > > if(pyVmId == NULL) > { > DBG("ERROR:Call py Method getVmDisplayType is failed!\n"); > return NULL; > } > > vmId = PyString_AsString(pyVmId); > > so, the local sdk is used for a client(C/S ) implemented by gtk. > > Every time, when I use my client login and get vms's information, it's about > 10~20 seconds.
i'm confused, are you mixing python with c? so what is CWrap/wrap.py from python? can you post theirs code? > > -----Original Message----- > From: Michael Pasternak [mailto:mpast...@redhat.com] > Sent: Wednesday, June 05, 2013 3:14 PM > To: wlbleaboy@126 > Cc: 'Itamar Heim'; cferg...@redhat.com; engine-devel@ovirt.org > Subject: Re: [Engine-devel] about govirt > > On 06/05/2013 09:43 AM, wlbleaboy@126 wrote: >> Hi, Itamar Heim: >> I used ovirit-engine-sdk-python to connect ovirt-engine and get vms >> It's about 20 seconds, so I felt it's slow. > > 20 seconds? How much VMs did you fetched?, How do you measure the time?, can > i see your code? > >> >> I have build govirt success, but how can I use it, I give >> REST_URI="https://192.168.1.201/api", >> and proxy = ovirt_proxy_new(REST_URI) always return NULL; >> >> -----Original Message----- >> From: Itamar Heim [mailto:ih...@redhat.com] >> Sent: Wednesday, June 05, 2013 5:29 AM >> To: wlbleaboy@126 >> Cc: cferg...@redhat.com; engine-devel@ovirt.org; Michael Pasternak >> Subject: Re: [Engine-devel] about govirt >> >> On 06/04/2013 01:23 PM, wlbleaboy@126 wrote: >>> Hi, cfergeau: >>> >>> Recently, I do something about ovirt-engine-sdk, I just want to >>> >>> console a vm via sdk, but I found the sdk implemented by python is >>> >>> so slowly, so I want to build a simple sdk use C to do that, >> >> Can you please share more info on what do you mean by "slow"? >> >> Thanks, >> Itamar >> >>> >>> before I do it, I found the code govirt you worte, I felt >>> luckly, you >>> >>> had do that. So I got the code, but when I build it on ubuntu, it's > failed >>> >>> I used autogen.sh , but got the error message >>> >>> like: >>> >>> configure: error: Package requirements (rest-0.7 >= 0.7.13) >>> were not met: >>> >>> No package 'rest-0.7' found >>> >>> Because I didn't familiar with autogen and configure, such gnu >>> build tools, >>> >>> >>> >>> _______________________________________________ >>> Engine-devel mailing list >>> Engine-devel@ovirt.org >>> http://lists.ovirt.org/mailman/listinfo/engine-devel >>> >> >> > > -- Michael Pasternak RedHat, ENG-Virtualization R&D _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel