Re: [Engine-devel] about govirt

2013-06-05 Thread wlbleaboy@126
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.

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



___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-05 Thread Itamar Heim

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.


and just to compare, how much time does a curl/wget takes you?



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






___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-05 Thread wlbleaboy@126
En, yes, and choice a better one.

-Original Message-
From: Itamar Heim [mailto:ih...@redhat.com] 
Sent: Wednesday, June 05, 2013 2:58 PM
To: wlbleaboy@126
Cc: cferg...@redhat.com; engine-devel@ovirt.org; 'Michael Pasternak'
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.

and just to compare, how much time does a curl/wget takes you?


   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





___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-05 Thread Michael Pasternak
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 RD
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-05 Thread wlbleaboy@126
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.

-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 RD


___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-05 Thread Michael Pasternak
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 RD
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-04 Thread David Jaša
wlbleaboy@126 píše v Út 04. 06. 2013 v 18:23 +0800:
 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,
 
  
 
  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:

IMO you should install librest-dev package on the development machine.

David

 
  
 
 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

-- 

David Jaša, RHCE

SPICE QE based in Brno
GPG Key: 22C33E24 
Fingerprint: 513A 060B D1B4 2A72 7F0D 0278 B125 CD00 22C3 3E24




smime.p7s
Description: S/MIME cryptographic signature
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-04 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 12:42:07PM +0200, David Jaša wrote:
 wlbleaboy@126 píše v Út 04. 06. 2013 v 18:23 +0800:
  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,
  
   
  
   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:
 
 IMO you should install librest-dev package on the development machine.

Yes, that should do it. Keep in mind that 0.7.13 is a fairly recent
version, so if this still does not work, double-check what was installed.

Christophe


pgpiLztxktxGf.pgp
Description: PGP signature
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] about govirt

2013-06-04 Thread Itamar Heim

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



___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel