[PATCH 3/4] virt-admin: Add some command aliases to provide syntax sugar over ugly commands

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

 



Make use of the new recently introduced alias handling for virt-admin srv-*
commands.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 tools/virt-admin.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 12ec057..5d6beda 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -1265,18 +1265,30 @@ static const vshCmdDef vshAdmCmds[] = {
 
 static const vshCmdDef monitoringCmds[] = {
     {.name = "srv-list",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "server-list"
+    },
+    {.name = "server-list",
      .handler = cmdSrvList,
      .opts = NULL,
      .info = info_srv_list,
      .flags = 0
     },
     {.name = "srv-threadpool-info",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "server-threadpool-info"
+    },
+    {.name = "server-threadpool-info",
      .handler = cmdSrvThreadpoolInfo,
      .opts = opts_srv_threadpool_info,
      .info = info_srv_threadpool_info,
      .flags = 0
     },
     {.name = "srv-clients-list",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "client-list"
+    },
+    {.name = "client-list",
      .handler = cmdSrvClientsList,
      .opts = opts_srv_clients_list,
      .info = info_srv_clients_list,
@@ -1289,6 +1301,10 @@ static const vshCmdDef monitoringCmds[] = {
      .flags = 0
     },
     {.name = "srv-clients-info",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "server-clients-info"
+    },
+    {.name = "server-clients-info",
      .handler = cmdSrvClientsInfo,
      .opts = opts_srv_clients_info,
      .info = info_srv_clients_info,
@@ -1299,6 +1315,10 @@ static const vshCmdDef monitoringCmds[] = {
 
 static const vshCmdDef managementCmds[] = {
     {.name = "srv-threadpool-set",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "server-threadpool-set"
+    },
+    {.name = "server-threadpool-set",
      .handler = cmdSrvThreadpoolSet,
      .opts = opts_srv_threadpool_set,
      .info = info_srv_threadpool_set,
@@ -1311,6 +1331,10 @@ static const vshCmdDef managementCmds[] = {
      .flags = 0
     },
     {.name = "srv-clients-set",
+     .flags = VSH_CMD_FLAG_ALIAS,
+     .alias = "server-clients-set"
+    },
+    {.name = "server-clients-set",
      .handler = cmdSrvClientsSet,
      .opts = opts_srv_clients_set,
      .info = info_srv_clients_set,
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]