On 17.03.2014 16:19, Francesco Romani wrote:

This patch series extend the QEMU capabilities XML to report
if the underlying QEMU binary supports, or not, the live
disk snapshotting.

Without this patch series, the only way to know if QEMU
has this support is to actually request a disk snapshot and
to see what happens.

The change is split in three patches:

* patch #1
actually adds the new element in the QEMU capabilities XML.
formatcaps.html.in wasn't very detailed about the actual XML format,
so I've not updated it.
Anyone feel free to point out what should be added, and I'll comply.

The new element has the form
<disksnapshot default='value' toggle='off'>
because I'd like to convey two informations:
- disk snapshot is supposed to be here, and it is (default='on')
- disk snapshot is supposed to be here, and is NOT (default='off')

Put in a different way, I tried to help the client as much as
possible.
This patch was alread reviewed in the first version of this changeset
and it is unchanged.

* patch #2
Extracts the actual QMEU guest capability inizialitation from the binary 
probe/capabilities
code, in order to isolate the actual initialization from the probing part.
I added a new function for the real initialization and left the interface 
unchanged.
Existing code will still call the old code which do the probing and after that 
calls
the new initialization function.
The main purpose of this patch is to
* allow to write an unit test for this change
* make the unit test more robust (with respect the first version of this change)
   and make it independent from the filesystem layout/qemu availability


* patch #3
add a new unit test, aiming to test not only this new feature
but also the whole output XML capabilities.


Francesco Romani (3):
   qemu: export disk snapshot support in capabilities
   qemu: extract guest capabilities initialization
   qemu: add unit tests for the capabilities xml

  docs/schemas/capability.rng                        |   6 +
  src/qemu/qemu_capabilities.c                       |  50 +++--
  src/qemu/qemu_capabilities.h                       |   7 +
  tests/Makefile.am                                  |  10 +-
  tests/qemucaps2xmldata/all_1.6.0-1.caps            | 142 ++++++++++++++
  tests/qemucaps2xmldata/all_1.6.0-1.xml             |  31 ++++
  tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps | 141 ++++++++++++++
  tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml  |  31 ++++
  tests/qemucaps2xmltest.c                           | 206 +++++++++++++++++++++
  9 files changed, 609 insertions(+), 15 deletions(-)
  create mode 100644 tests/qemucaps2xmldata/all_1.6.0-1.caps
  create mode 100644 tests/qemucaps2xmldata/all_1.6.0-1.xml
  create mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
  create mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
  create mode 100644 tests/qemucaps2xmltest.c


ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to