[PATCH 8/8] virsh: Add completer functions to domMonitoringCmds

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

 



Add .completer and .completer_flags to domMonitoringCmds.

Provides domain completion for domMonitoringCmds commands.
---
 tools/virsh-domain-monitor.c | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index b29b82a..0f30902 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1876,7 +1876,9 @@ const vshCmdDef domMonitoringCmds[] = {
      .handler = cmdDomBlkError,
      .opts = opts_domblkerror,
      .info = info_domblkerror,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE
     },
     {.name = "domblkinfo",
      .handler = cmdDomblkinfo,
@@ -1888,7 +1890,10 @@ const vshCmdDef domMonitoringCmds[] = {
      .handler = cmdDomblklist,
      .opts = opts_domblklist,
      .info = info_domblklist,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE |
+                        VIR_CONNECT_LIST_DOMAINS_INACTIVE
     },
     {.name = "domblkstat",
      .handler = cmdDomblkstat,
@@ -1900,7 +1905,9 @@ const vshCmdDef domMonitoringCmds[] = {
      .handler = cmdDomControl,
      .opts = opts_domcontrol,
      .info = info_domcontrol,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE
     },
     {.name = "domif-getlink",
      .handler = cmdDomIfGetLink,
@@ -1912,7 +1919,10 @@ const vshCmdDef domMonitoringCmds[] = {
      .handler = cmdDomiflist,
      .opts = opts_domiflist,
      .info = info_domiflist,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE |
+                        VIR_CONNECT_LIST_DOMAINS_INACTIVE
     },
     {.name = "domifstat",
      .handler = cmdDomIfstat,
@@ -1924,19 +1934,27 @@ const vshCmdDef domMonitoringCmds[] = {
      .handler = cmdDominfo,
      .opts = opts_dominfo,
      .info = info_dominfo,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE |
+                        VIR_CONNECT_LIST_DOMAINS_INACTIVE
     },
     {.name = "dommemstat",
      .handler = cmdDomMemStat,
      .opts = opts_dommemstat,
      .info = info_dommemstat,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE
     },
     {.name = "domstate",
      .handler = cmdDomstate,
      .opts = opts_domstate,
      .info = info_domstate,
-     .flags = 0
+     .flags = 0,
+     .completer = vshDomainCompleter,
+     .completer_flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE |
+                        VIR_CONNECT_LIST_DOMAINS_INACTIVE
     },
     {.name = "list",
      .handler = cmdList,
-- 
1.8.3.1

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