[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/2] snapshot: implement getparent for esx



On 10/02/2011 03:32 AM, Matthias Bolte wrote:
2011/9/29 Eric Blake<eblake redhat com>:
Pretty easy to paste together compared to existing functions.

* src/esx/esx_driver.c (esxDomainSnapshotGetParent): New function.
---

I can only compile-test this; I'm relying on someone with an actual
esx setup to actually test it.  Also, I didn't see anything in
existing code that would efficiently implement
virDomainSnapshotNumChildren; there may an API that I'm not aware of,
but someone else will have to implement that API (Matthias?)

This will have to be done by esxVI_GetNumberOfSnapshotTrees that just
counts the snapshots in the driver. This is one of things where
vSphere API doesn't translate efficiently to libvirt API.

Actually, virDomainSnapshotNumChildren has two modes (well, it will once my API addition series gets reviewed...):

Direct children only, when flags==0 (from looking at esxVI_GetNumberOfSnapshotTrees, this looks like it is just a count of the for loop through snapshotTreeList)

All descendants, when flags==VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS, which is a count of the for loop plus recursion on each child.

Thanks; you pointed me to enough of a hint that I can try and implement it.

Speaking of flags support for various APIs, I'm wondering if http://libvirt.org/hvsupport.html should be improved to list the version at which each hypervisor added support for each flag, since flags are often introduced after the original API, and not all hypervisors support all flags. I'll try and take a look into that.


  src/esx/esx_driver.c |   41 +++++++++++++++++++++++++++++++++++++++++
  1 files changed, 41 insertions(+), 0 deletions(-)


Looks good, tested, works, ACK :)

All right, ESX getParent is now pushed.

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]