]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: undefine: Rename --delete-snapshots to --delete-storage-volume-snapshots
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Jun 2019 11:06:58 +0000 (13:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 6 Jun 2019 08:26:37 +0000 (10:26 +0200)
The old flag name confused some users into thinking it's the correct way
to undefine a VM with libvirt (not storage volume) snapshots.

The correct flag in that case is way less obvious: --snapshots-metadata.

Rename the flag (by adding an alias) to something which will promote
looking up the actual purpose of the flag.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
ACKed-by: Eric Blake <eblake@redhat.com>
tools/virsh-domain.c
tools/virsh.pod

index a6e4469160ba87f7a2b49d8239115126dde66240..828ae307898b0555fde65c7fa326cb5ef589399c 100644 (file)
@@ -3617,6 +3617,10 @@ static const vshCmdOptDef opts_undefine[] = {
      .help = N_("remove all associated storage volumes (use with caution)")
     },
     {.name = "delete-snapshots",
+     .type = VSH_OT_ALIAS,
+     .help = "delete-storage-volume-snapshots"
+    },
+    {.name = "delete-storage-volume-snapshots",
      .type = VSH_OT_BOOL,
      .help = N_("delete snapshots associated with volume(s), requires "
                 "--remove-all-storage (must be supported by storage driver)")
index 9f5bfd27a08bec7b9b3400b512d9850d06ec7c6a..fd9ba00d1f8e9c8da54fc8d14d88d22c500c3f8b 100644 (file)
@@ -2896,8 +2896,8 @@ is not available the processes will provide an exit code of 1.
 
 =item B<undefine> I<domain> [I<--managed-save>] [I<--snapshots-metadata>]
 [I<--nvram>] [I<--keep-nvram>]
-[ {I<--storage> B<volumes> | I<--remove-all-storage> [I<--delete-snapshots>]}
-I<--wipe-storage>]
+[ {I<--storage> B<volumes> | I<--remove-all-storage>
+[I<--delete-storage-volume-snapshots>]} I<--wipe-storage>]
 
 Undefine a domain. If the domain is running, this converts it to a
 transient domain, without stopping it. If the domain is inactive,
@@ -2932,7 +2932,8 @@ Example: --storage vda,/path/to/storage.img
 The I<--remove-all-storage> flag specifies that all of the domain's storage
 volumes should be deleted.
 
-The I<--delete-snapshots> flag specifies that any snapshots associated with
+The I<--delete-storage-volume-snapshots> (previously I<--delete-snapshots>)
+flag specifies that any snapshots associated with
 the storage volume should be deleted as well. Requires the
 I<--remove-all-storage> flag to be provided. Not all storage drivers
 support this option, presently only rbd.