Re: [libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events

2014-02-20 Thread Daniel P. Berrange
On Fri, Feb 14, 2014 at 05:21:40PM -0700, Eric Blake wrote: Add 'virsh event --list' and 'virsh event [dom] --event=name [--loop] [--timeout]'. Borrows somewhat from event-test.c, but defaults to a one-shot notification, and takes advantage of the event loop integration to allow Ctrl-C to

Re: [libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events

2014-02-20 Thread Eric Blake
On 02/20/2014 10:33 AM, Daniel P. Berrange wrote: On Fri, Feb 14, 2014 at 05:21:40PM -0700, Eric Blake wrote: Add 'virsh event --list' and 'virsh event [dom] --event=name [--loop] [--timeout]'. Borrows somewhat from event-test.c, but defaults to a one-shot notification, and takes advantage

Re: [libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events

2014-02-20 Thread Daniel P. Berrange
On Thu, Feb 20, 2014 at 11:06:55AM -0700, Eric Blake wrote: On 02/20/2014 10:33 AM, Daniel P. Berrange wrote: On Fri, Feb 14, 2014 at 05:21:40PM -0700, Eric Blake wrote: Add 'virsh event --list' and 'virsh event [dom] --event=name [--loop] [--timeout]'. Borrows somewhat from event-test.c,

Re: [libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events

2014-02-20 Thread Eric Blake
On 02/20/2014 11:14 AM, Daniel P. Berrange wrote: +case VIR_DOMAIN_EVENT_DEFINED: +ret = _(Defined); +break; How about using VIR_ENUM ? We avoided it in the event-test.c file since we wanted it to be example code people can compile outside libvirt. Using enums would

[libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events

2014-02-14 Thread Eric Blake
Add 'virsh event --list' and 'virsh event [dom] --event=name [--loop] [--timeout]'. Borrows somewhat from event-test.c, but defaults to a one-shot notification, and takes advantage of the event loop integration to allow Ctrl-C to interrupt the wait for an event. For now, this just does lifecycle