]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh-network: Create macros for VSH_OT_STRING "network" option
authorLin Ma <lma@suse.com>
Tue, 15 May 2018 11:10:35 +0000 (19:10 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 17 May 2018 15:06:11 +0000 (17:06 +0200)
Signed-off-by: Lin Ma <lma@suse.com>
tools/virsh-network.c

index 3f0923bf0ef66358d284eb4ae717c0cc71794a09..7a8bcb1beb606e8cff69dcf5460a279eba159c19 100644 (file)
      .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)