All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 05/11] virt: Introducing libvirt VM class
Date: Thu, 13 Oct 2011 14:26:31 -0300	[thread overview]
Message-ID: <4E971F47.6010005@redhat.com> (raw)
In-Reply-To: <20111012081447.GC9848@redhat.com>

On 10/12/2011 05:14 AM, Daniel P. Berrange wrote:
> On Tue, Oct 11, 2011 at 06:07:11PM -0300, Lucas Meneghel Rodrigues wrote:
>> This is a first attempt at providing a libvirt VM class,
>> in order to implement the needed methods for virt testing.
>> With this class, we will be able to implement a libvirt
>> test, that behaves similarly to the KVM test.
>>
>> As of implementation details, libvirt_vm uses virsh
>> (a userspace program written on top of libvirt) to
>> do domain start, stop, verification of status and
>> other common operations. The reason why virsh was
>> used is to get more coverage of the userspace stack
>> that libvirt offers, and also to catch issues that
>> virsh users would catch.
>
> Personally I would have recommended that you use the libvirt Python API.
> virsh is a very thin layer over the libvirt API, which mostly avoidse
> adding any logic of its own, so once it has been tested once, there's
> not much value in doing more. By using the Python API directly, you will
> be able todo more intelligent handling of errors, since you'll get the
> full libvirt python exception object instead of a blob of stuff on stderr.
> Not to mention that it is so much more efficient, and robust against
> any future changes in virsh.

Thanks Daniel. We've discussed about that quite a few times during the 
development of the code. The plan is to just add methods that will do 
the same as the API counterpart moving forward, so we can test both the 
think layer that is virsh and the py API. We just wanted to focusing in 
one implementation to get something functional first.

We'll keep you guys posted about progress on py bindings.

Cheers,

Lucas

  reply	other threads:[~2011-10-13 17:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 21:07 [PATCH 00/11] [RFC] Libvirt test v2 Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 02/11] virt: Introducing virt_test.virt_test class Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 03/11] Moving unattended_install test from kvm test to common virt location Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 04/11] Moving get_started code to client.virt.virt_utils Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 05/11] virt: Introducing libvirt VM class Lucas Meneghel Rodrigues
2011-10-12  6:51   ` [Autotest] " Amos Kong
2011-10-12  8:14   ` Daniel P. Berrange
2011-10-13 17:26     ` Lucas Meneghel Rodrigues [this message]
2011-10-11 21:07 ` [PATCH 06/11] virt: Introducing libvirt monitor Lucas Meneghel Rodrigues
2011-10-12  7:48   ` [Autotest] " Amos Kong
2011-10-13 17:12     ` Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 07/11] virt.virt_env_process: Add libvirt vm handling Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 08/11] client.tests: Introducing libvirt test Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 09/11] Virt: builtin HTTP server for unattended installs Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 10/11] Virt: support XEN via libvirt and auto url installer Lucas Meneghel Rodrigues
2011-10-11 21:07 ` [PATCH 11/11] Virt: add support for XEN via libvirt installs and auto url Lucas Meneghel Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E971F47.6010005@redhat.com \
    --to=lmr@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=berrange@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.