[PATCH 07/14] virsh: Use 'virshStoragePoolNameCompleter' for two options

Peter Krempa pkrempa at redhat.com
Thu Sep 16 17:10:38 UTC 2021


'--pool' of the 'pool-event' command and '--inputpool' of
'vol-create-from' use the above mentioned completer.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tools/virsh-pool.c   | 1 +
 tools/virsh-volume.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index 1a2ab8cc53..f1dfe892e1 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -1988,6 +1988,7 @@ static const vshCmdInfo info_pool_event[] = {
 static const vshCmdOptDef opts_pool_event[] = {
     {.name = "pool",
      .type = VSH_OT_STRING,
+     .completer = virshStoragePoolNameCompleter,
      .help = N_("filter by storage pool name or uuid")
     },
     {.name = "event",
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index c51dc023e3..197ed2489c 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -454,6 +454,7 @@ static const vshCmdOptDef opts_vol_create_from[] = {
     VIRSH_COMMON_OPT_VOL_FULL,
     {.name = "inputpool",
      .type = VSH_OT_STRING,
+     .completer = virshStoragePoolNameCompleter,
      .help = N_("pool name or uuid of the input volume's pool")
     },
     {.name = "prealloc-metadata",
-- 
2.31.1




More information about the libvir-list mailing list