[libvirt] [python PATCHv2] examples: Add example to make guest agent lifecycle event useful
Michal Privoznik
mprivozn at redhat.com
Mon May 18 10:42:17 UTC 2015
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.
Michal
More information about the libvir-list
mailing list