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

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

 



Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 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

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

  Powered by Linux