The macro VIRSH_DOMAIN_OPT_INTERFACE for domain option '--interface',
The macro VIRSH_DOMAIN_OPT_MAC for domain option '--mac'.
Signed-off-by: Lin Ma <lma(a)suse.com>
---
tools/virsh-domain.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/virsh-domain.h b/tools/virsh-domain.h
index 0d59c579d4..ac05f983f9 100644
--- a/tools/virsh-domain.h
+++ b/tools/virsh-domain.h
@@ -39,3 +39,21 @@ typedef enum {
VIR_ENUM_DECL(virshDomainHostnameSource);
extern const vshCmdDef domManagementCmds[];
+
+#define VIRSH_DOMAIN_OPT_INTERFACE(_helpstr, oflags, cflags) \
+ {.name = "interface", \
+ .type = VSH_OT_STRING, \
+ .flags = oflags, \
+ .help = _helpstr, \
+ .completer = virshDomainInterfaceCompleter, \
+ .completer_flags = cflags, \
+ }
+
+#define VIRSH_DOMAIN_OPT_MAC(_helpstr, oflags) \
+ {.name = "mac", \
+ .type = VSH_OT_STRING, \
+ .flags = oflags, \
+ .help = _helpstr, \
+ .completer = virshDomainInterfaceCompleter, \
+ .completer_flags = VIRSH_DOMAIN_INTERFACE_COMPLETER_MAC, \
+ }
--
2.26.0