[libvirt] [PATCH 6/6] Snapshot virsh implementation.
Chris Lalancette
clalance at redhat.com
Tue Apr 6 19:13:02 UTC 2010
On 04/06/2010 03:00 PM, Paul Jenner wrote:
> On Fri, 2010-04-02 at 21:46 -0400, Chris Lalancette wrote:
> <snip>
>> @@ -8288,6 +8731,14 @@ static const vshCmdDef commands[] = {
>> {"vcpupin", cmdVcpupin, opts_vcpupin, info_vcpupin},
>> {"version", cmdVersion, NULL, info_version},
>> {"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay},
>> +
>> + {"snapshot-create", cmdSnapshotCreate, opts_snapshot_create, info_snapshot_create},
>> + {"snapshot-current", cmdSnapshotCurrent, opts_snapshot_current, info_snapshot_current},
>> + {"snapshot-delete", cmdSnapshotDelete, opts_snapshot_delete, info_snapshot_delete},
>> + {"snapshot-dumpxml", cmdSnapshotDumpXML, opts_snapshot_dumpxml, info_snapshot_dumpxml},
>> + {"snapshot-list", cmdSnapshotList, opts_snapshot_list, info_snapshot_list},
>> + {"revert-to-snapshot", cmdDomainRevertToSnapshot, opts_revert_to_snapshot, info_revert_to_snapshot},
>> +
>> {NULL, NULL, NULL, NULL}
>> };
>
> All the new virsh commands for snapshot management follow the convention
> of snapshot- prefix (like similar pool-, vol-, net- command prefixes)
> except for revert-to-snapshot. From a virsh usability perspective, would
> it make sense to rename this command snapshot-revert? I appreciate that
> does not capture what the command does as well as revert-to-snapshot but
> I think this may be a reasonable trade-off for usability and users
> finding the command easily.
Yeah, I know exactly where you are coming from. I struggled with this
for the whole API, since I really liked that fact that everything was
prefixed by virDomainSnaphot... The one advantage to "revert-to-snapshot"
is that it's a little clearer that this is a command that operates on
a domain instead of on a snapshot, but it's pretty minor.
I'm happy to go either way; I guess if we want, we can actually
have both :).
--
Chris Lalancette
More information about the libvir-list
mailing list