[libvirt-users] Ruby-libvirt and openAuth

Hello, It looks like the Ruby bindings do not support virConnectOpenAuth. Is this true? If so, is there any reason why? or plans to? Thanks, Jon

On 09/30/10 - 09:51:10AM, Jonathan Kelley wrote:
Hello,
It looks like the Ruby bindings do not support virConnectOpenAuth. Is this true? If so, is there any reason why? or plans to?
I've recently implemented them; if you check in the upstream git repository (http://libvirt.org/git/?p=ruby-libvirt.git;a=summary), you'll see it. I hope to do a release pretty soon with this (and some more APIs) implemented. -- Chris Lalancette

I tried to use Libvirt::VIR_CRED_AUTHNAME in my ruby script but it fails. Is this not implemented? -Jon On Fri, Oct 1, 2010 at 12:48 PM, Chris Lalancette <clalance@redhat.com>wrote:
Hello,
It looks like the Ruby bindings do not support virConnectOpenAuth. Is
On 09/30/10 - 09:51:10AM, Jonathan Kelley wrote: this
true? If so, is there any reason why? or plans to?
I've recently implemented them; if you check in the upstream git repository (http://libvirt.org/git/?p=ruby-libvirt.git;a=summary), you'll see it. I hope to do a release pretty soon with this (and some more APIs) implemented.
-- Chris Lalancette

On 10/03/10 - 07:45:29PM, Jonathan Kelley wrote:
I tried to use Libvirt::VIR_CRED_AUTHNAME in my ruby script but it fails.
Is this not implemented?
It's just called "Libvirt::CRED_AUTHNAME"; I figured the VIR_ was redundant, so all of the constants don't have it. -- Chris Lalancette

Where from the git repository can I browse the ruby library? Thanks. -Jon On Mon, Oct 4, 2010 at 8:37 AM, Chris Lalancette <clalance@redhat.com>wrote:
On 10/03/10 - 07:45:29PM, Jonathan Kelley wrote:
I tried to use Libvirt::VIR_CRED_AUTHNAME in my ruby script but it fails.
Is this not implemented?
It's just called "Libvirt::CRED_AUTHNAME"; I figured the VIR_ was redundant, so all of the constants don't have it.
-- Chris Lalancette

On 10/05/2010 06:19 AM, Jonathan Kelley wrote:
Where from the git repository can I browse the ruby library?
Hi Jon, Is this what you're looking for? http://libvirt.org/git/?p=ruby-libvirt.git;a=summary Regards and best wishes, Justin Clift
Thanks. -Jon

On 10/04/10 - 03:19:05PM, Jonathan Kelley wrote:
Where from the git repository can I browse the ruby library?
I'm not quite sure I understand the question. Are you looking for the rdocs for the new APIs? If so, I have not built them yet, and unfortunately there is a bug in rdoc that prevents them from being properly built given the setup that ruby-libvirt uses. I found a patch to fix the problem, but it is not upstream. If you want, I can generate a private copy of the docs for you and make them available. If you were not asking about the rdocs, what were you asking about? -- Chris Lalancette

I am newer to Ruby so maybe I am expecting to see something I shouldn't. With the Python bindings I can browse the source of the python binding. In other words I am looking to see the implementation of these bindings. The Rdoc would be helpful so if you want to generate it and send me a copy that would be great. Thanks, Jon On Mon, Oct 4, 2010 at 11:29 PM, Chris Lalancette <clalance@redhat.com>wrote:
On 10/04/10 - 03:19:05PM, Jonathan Kelley wrote:
Where from the git repository can I browse the ruby library?
I'm not quite sure I understand the question. Are you looking for the rdocs for the new APIs? If so, I have not built them yet, and unfortunately there is a bug in rdoc that prevents them from being properly built given the setup that ruby-libvirt uses. I found a patch to fix the problem, but it is not upstream. If you want, I can generate a private copy of the docs for you and make them available.
If you were not asking about the rdocs, what were you asking about?
-- Chris Lalancette

On 10/06/2010 12:28 AM, Jonathan Kelley wrote:
I am newer to Ruby so maybe I am expecting to see something I shouldn't. With the Python bindings I can browse the source of the python binding. In other words I am looking to see the implementation of these bindings.
Ahhhh. This link is for the online, browsable ruby bindings source code for libvirt: http://libvirt.org/git/?p=ruby-libvirt.git;a=tree It's a little bit different from the one I sent before, and I *think* this is what you want. Does this help? Regards and best wishes, Justin Clift
The Rdoc would be helpful so if you want to generate it and send me a copy that would be great.
Thanks, Jon

I guess I was expecting to find a ruby library making calls into the C library like the Python libvirt.py that is generated. I saw these files and thought I was missing something but I understand now the difference between the Ruby and Python bindings. Thanks, Jon On Tue, Oct 5, 2010 at 9:36 AM, Justin Clift <jclift@redhat.com> wrote:
On 10/06/2010 12:28 AM, Jonathan Kelley wrote:
I am newer to Ruby so maybe I am expecting to see something I shouldn't. With the Python bindings I can browse the source of the python binding. In other words I am looking to see the implementation of these bindings.
Ahhhh. This link is for the online, browsable ruby bindings source code for libvirt:
http://libvirt.org/git/?p=ruby-libvirt.git;a=tree
It's a little bit different from the one I sent before, and I *think* this is what you want.
Does this help?
Regards and best wishes,
Justin Clift
The Rdoc would be helpful so if you want to generate it and send me a copy
that would be great.
Thanks, Jon

On 10/05/10 - 09:58:25AM, Jonathan Kelley wrote:
I guess I was expecting to find a ruby library making calls into the C library like the Python libvirt.py that is generated.
I saw these files and thought I was missing something but I understand now the difference between the Ruby and Python bindings.
Ah, no. The way that this particular binding works is that it is all C code that bridges between the libvirt C api and the various rb_* routines to hook it into ruby. There are other approaches possible, including something called FFI, but I haven't really looked at them. I've sent you the RDoc documentation for what is in git in a private email. Once I do the next release I will post this updated documentation to the website. -- Chris Lalancette

Anyone have any luck using libvirt library inside a ruby cgi script? I am getting load errors (Internal Server Error) on failing to find _libvirt. The same script works fine run from the cmd shell. My webserver is lighttpd. Thanks, Jon On Tue, Oct 5, 2010 at 10:08 AM, Chris Lalancette <clalance@redhat.com>wrote:
On 10/05/10 - 09:58:25AM, Jonathan Kelley wrote:
I guess I was expecting to find a ruby library making calls into the C library like the Python libvirt.py that is generated.
I saw these files and thought I was missing something but I understand now the difference between the Ruby and Python bindings.
Ah, no. The way that this particular binding works is that it is all C code that bridges between the libvirt C api and the various rb_* routines to hook it into ruby. There are other approaches possible, including something called FFI, but I haven't really looked at them.
I've sent you the RDoc documentation for what is in git in a private email. Once I do the next release I will post this updated documentation to the website.
-- Chris Lalancette

Ignore my last post. I copied what the debian package does for the bindings. All works fine now! On Wed, Oct 6, 2010 at 1:44 PM, Jonathan Kelley <jkelley@vm-labs.com> wrote:
Anyone have any luck using libvirt library inside a ruby cgi script?
I am getting load errors (Internal Server Error) on failing to find _libvirt. The same script works fine run from the cmd shell.
My webserver is lighttpd.
Thanks, Jon
On Tue, Oct 5, 2010 at 10:08 AM, Chris Lalancette <clalance@redhat.com>wrote:
On 10/05/10 - 09:58:25AM, Jonathan Kelley wrote:
I guess I was expecting to find a ruby library making calls into the C library like the Python libvirt.py that is generated.
I saw these files and thought I was missing something but I understand now the difference between the Ruby and Python bindings.
Ah, no. The way that this particular binding works is that it is all C code that bridges between the libvirt C api and the various rb_* routines to hook it into ruby. There are other approaches possible, including something called FFI, but I haven't really looked at them.
I've sent you the RDoc documentation for what is in git in a private email. Once I do the next release I will post this updated documentation to the website.
-- Chris Lalancette
participants (3)
-
Chris Lalancette
-
Jonathan Kelley
-
Justin Clift