]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Use consistent naming for blkdeviotune options
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 25 Jan 2017 08:38:09 +0000 (09:38 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Sun, 29 Jan 2017 18:57:12 +0000 (19:57 +0100)
All options started with underscores, but we switched them to dashes
later on, making the style consistent.  The latest addition, however,
did not respect that, so let's change that as well.  It is tempting to
just change the name instead of adding alias, especially since nobody
ever used it, which we know thanks to the fact that it didn't work.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tools/virsh-domain.c
tools/virsh.pod

index 4360306989d873229c69e98dbb3d1c0436f45fc5..023ec8a8b3dff95638f76284ebfebb421c9290d5 100644 (file)
@@ -1264,6 +1264,10 @@ static const vshCmdOptDef opts_blkdeviotune[] = {
      .help = N_("I/O size in bytes")
     },
     {.name = "group_name",
+     .type = VSH_OT_ALIAS,
+     .help = "group-name"
+    },
+    {.name = "group-name",
      .type = VSH_OT_STRING,
      .help = N_("group name to share I/O quota between multiple drives")
     },
@@ -1398,8 +1402,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
     VSH_ADD_IOTUNE(write-iops-sec-max-length, WRITE_IOPS_SEC_MAX_LENGTH);
 #undef VSH_ADD_IOTUNE
 
-    if (vshCommandOptStringReq(ctl, cmd, "group_name", &group_name) < 0) {
-        vshError(ctl, "%s", _("Unable to parse group parameter"));
+    if (vshCommandOptStringReq(ctl, cmd, "group-name", &group_name) < 0) {
+        vshError(ctl, "%s", _("Unable to parse group-name parameter"));
         goto cleanup;
     }
 
index 18f16b51bd3bb512111ec6de90b5e22ead5fa909..a47040984b0bd0acbddcf87d574f1278cf36ddd0 100644 (file)
@@ -1139,7 +1139,7 @@ command.
 [I<read-bytes-sec-max-length>] [I<write-bytes-sec-max-length>]]
 [[I<total-iops-sec-max-length>] |
 [I<read-iops-sec-max-length>] [I<write-iops-sec-max-length>]]
-[I<size-iops-sec>] [I<group_name>]
+[I<size-iops-sec>] [I<group-name>]
 
 Set or query the block disk io parameters for a block device of I<domain>.
 I<device> specifies a unique target name (<target dev='name'/>) or source
@@ -1179,7 +1179,7 @@ read I/O operations limit.
 I<--write-iops-sec-max-length> specifies duration in seconds to allow maximum
 write I/O operations limit.
 I<--size-iops-sec> specifies size I/O operations limit per second.
-I<--group_name> specifies group name to share I/O quota between multiple drives.
+I<--group-name> specifies group name to share I/O quota between multiple drives.
 For a qemu domain, if no name is provided, then the default is to have a single
 group for each I<device>.