virsh-network: Create macros for VSH_OT_STRING "network" option

Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
Lin Ma 2018-05-15 19:10:35 +08:00 committed by Michal Privoznik
parent a4bbd30400
commit de97d5600c

View File

@ -43,6 +43,17 @@
.completer_flags = cflags, \ .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 virNetworkPtr
virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd, virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
const char **name, unsigned int flags) const char **name, unsigned int flags)