On 08/12/2011 08:33 AM, Eric Blake wrote:
On 08/11/2011 08:36 PM, Eric Blake wrote:
> In implementing this in virsh, I found that for backwards compatibility
> reasons, it would be easier to two flags instead of one, since both use
> cases seem plausible (do the bare minimum to remove my domain, but
> wihtout losing snapshot data, vs. nuke everything including my snapshot
> data that was associated with the domain). Hence I'm modifying this
> slightly to be:
>
> VIR_DOMAIN_UNDEFINE_SNAPSHOTS_FULL -> maps to
> virDomainSnapshotDelete(,0), can be emulated on older servers
> VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA -> maps to
> virDomainSnapshotDelete(,VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY),
> cannot be simulated with server older than 0.9.5
And to make it easier to detect whether a domain has libvirt snapshot
metadata, I need to add:
virDomainSnapshotNum(,VIR_DOMAIN_SNAPSHOT_NUM_METADATA)
For consistency, I'm actually going to name this
VIR_DOMAIN_SNAPSHOT_LIST_METADATA, and let it apply to both
virDomainSnapshotNum and virDomainSnapshotList (list those snapshots
that have metadata).
I also want to add VIR_DOMAIN_SNAPSHOT_LIST_ROOTS, which lists only
snapshots that have no parents (unlike my other proposal for
LIST_CHILDREN and LIST_DESCENDANTS, this one is uncontroversial on
application to the domain, rather than starting from a single snapshot
and figuring out whether to shoehorn in that single snapshot in existing
api or create new api).
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org