]> xenbits.xensource.com Git - libvirt.git/commit
virsh: Introduce virshDomainInterfaceCompleter
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 6 Nov 2017 14:48:01 +0000 (15:48 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Jan 2018 17:53:04 +0000 (18:53 +0100)
commit7e7db4bfe0e0ecf179ef54e6db9ae9c5ce2b53a0
treef61f8830854258eff3d9753e71e66b5222082ae5
parentec3403be7e1bc5b80adfe4f2ddcc039168f3c9c8
virsh: Introduce virshDomainInterfaceCompleter

For given domain fetch list of defined interfaces. This can be
used for commands like domif-getlink and others. If available,
the interface name is returned (e.g. "vnet0", usually available
only for running domains), if not the MAC address is returned.
Moreover, the detach-interface command requires only MAC address
and therefore we have new flag that forces the completer to
return just the MAC address.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-completer.c
tools/virsh-completer.h
tools/virsh-domain-monitor.c
tools/virsh-domain.c