提交 b4b5c82c 编写于 作者: C Chen Hanxiao 提交者: Michal Privoznik

virsh: add --source arp to domifaddr

We can use:
  domifaddr f26-cloud --source arp
to get the address.
Acked-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
上级 e24d4c90
......@@ -2190,6 +2190,8 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd)
source = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE;
} else if (STREQ(sourcestr, "agent")) {
source = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT;
} else if (STREQ(sourcestr, "arp")) {
source = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP;
} else {
vshError(ctl, _("Unknown data source '%s'"), sourcestr);
goto cleanup;
......
......@@ -759,7 +759,7 @@ B<Explanation of fields> (fields appear in the following order):
=item B<domifaddr> I<domain> [I<interface>] [I<--full>]
[I<--source lease|agent>]
[I<--source lease|agent|arp>]
Get a list of interfaces of a running domain along with their IP and MAC
addresses, or limited output just for one interface if I<interface> is
......@@ -774,8 +774,9 @@ only the interface name and MAC address is displayed for the first name and
MAC address with "-" for the others using the same name and MAC address.
The I<--source> argument specifies what data source to use for the
addresses, currently one of 'lease' to read DHCP leases, or 'agent' to query
the guest OS via an agent. If unspecified, 'lease' is the default.
addresses, currently 'lease' to read DHCP leases, 'agent' to query
the guest OS via an agent, or 'arp' to get IP from host's arp tables.
If unspecified, 'lease' is the default.
=item B<domifstat> I<domain> I<interface-device>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册