Signed-off-by: Lin Ma
---
src/libvirt-domain.c | 2 ++
src/qemu/qemu_driver.c | 4
tools/virsh.pod| 2 ++
3 files changed, 8 insertions(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 2d86e48979..e317ca00d0 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -11310,6 +11310,8 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* "net.count" - number of network interfaces on this domain
* as unsigned int.
* "net..name" - name of the interface as string.
+ * "net..type" - type of the interface as string.
+ * "net..source" - source of the interface as string.
* "net..rx.bytes" - bytes received as unsigned long long.
* "net..rx.pkts" - packets received as unsigned long long.
* "net..rx.errs" - receive errors as unsigned long long.
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 83fc191085..7a9a2bcf97 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -19823,6 +19823,10 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr driver
ATTRIBUTE_UNUSED,
QEMU_ADD_NAME_PARAM(record, maxparams,
"net", "name", i, net->ifname);
+QEMU_ADD_NAME_PARAM(record, maxparams,
+"net", "type", i,
virDomainNetTypeToString(net->type));
+QEMU_ADD_NAME_PARAM(record, maxparams,
+"net", "source", i, net->data.bridge.brname);
if (actualType == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
if (virNetDevOpenvswitchInterfaceStats(net->ifname, ) < 0) {
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 929958a953..7ec57c0b4b 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -974,6 +974,8 @@ I<--interface> returns:
"net.count" - number of network interfaces on this domain
"net..name" - name of the interface
+ "net..type" - type of the interface
+ "net..source" - source of the interface
"net..rx.bytes" - number of bytes received
"net..rx.pkts" - number of packets received
"net..rx.errs" - number of receive errors
--
2.15.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list