[libvirt] [python PATCHv2] examples: Add example to make guest agent lifecycle event useful

Peter Krempa pkrempa at redhat.com
Tue May 19 15:34:26 UTC 2015


On Mon, May 18, 2015 at 12:42:17 +0200, Michal Privoznik wrote:
> On 11.05.2015 10:46, Peter Krempa wrote:
> > This example allows to use the guest agent event and metadata to track
> > vCPU count set via the guest agent (agent-based onlining/offlining) and
> > keep it persistent accross domain restarts.
> > 
> > The daemon listens for the agent lifecycle event, and if it's received
> > it looks into doman's metadata to see whether a desired count was set
> > and issues the guest agent command.
> > ---
> >  MANIFEST.in                               |   2 +
> >  examples/README                           |   2 +
> >  examples/guest-vcpus/guest-vcpu-daemon.py | 160 ++++++++++++++++++++++++++++++
> >  examples/guest-vcpus/guest-vcpu.py        |  74 ++++++++++++++
> >  4 files changed, 238 insertions(+)
> >  create mode 100755 examples/guest-vcpus/guest-vcpu-daemon.py
> >  create mode 100755 examples/guest-vcpus/guest-vcpu.py
> 
> I'm no pythonist, but the code works and it's just an example anyway, so
> ACK.

Pushed now. Thanks.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150519/7431e5bd/attachment-0001.sig>


More information about the libvir-list mailing list