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

Re: [libvirt] RFCv2: virDomainSnapshotCreateXML enhancements



On 08/11/2011 02:50 PM, Eric Blake wrote:
On 08/10/2011 04:08 PM, Eric Blake wrote:
Undefining
++++++++++

Meanwhile, I propose changing the default behavior of
virDomainUndefine[Flags] to reject attempts to undefine a domain with
any defined snapshots, and to add a new flag for virDomainUndefineFlags,
virDomainUndefineFlags(,VIR_DOMAIN_UNDEFINE_SNAPSHOTS), to act as
shorthand for calling virDomainSnapshotDelete for all snapshots tied to
the domain. Note that this deletes the metadata, but not the underlying
storage volumes.

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

--
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]