Signed-off-by: Lin Ma <lma(a)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