[libvirt] [PATCH 4/9] virsh-network: Create macros for VSH_OT_STRING "network" option

Lin Ma lma at suse.com
Tue May 15 11:10:35 UTC 2018


Signed-off-by: Lin Ma <lma at suse.com>
---
 tools/virsh-network.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 3f0923bf0e..7a8bcb1beb 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -43,6 +43,17 @@
      .completer_flags = cflags, \
     }
 
+#define VIRSH_COMMON_OPT_NETWORK_OT_STRING(_helpstr, cflags) \
+    {.name = "network", \
+     .type = VSH_OT_STRING, \
+     .help = _helpstr, \
+     .completer = virshNetworkNameCompleter, \
+     .completer_flags = cflags, \
+    }
+
+#define VIRSH_COMMON_OPT_NETWORK_OT_STRING_FULL(cflags) \
+    VIRSH_COMMON_OPT_NETWORK_OT_STRING(N_("network name or uuid"), cflags)
+
 virNetworkPtr
 virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
                          const char **name, unsigned int flags)
-- 
2.16.2




More information about the libvir-list mailing list