[PATCH v2 0/8] Dump domain's IP addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's been a while since I tried get this in.  I've reworked the
patches, the exposed API, and start new round of reviews.

Moreover, during work I've come to point, where extending qemu
guest agent seemed wise:

http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg03264.html

Therefore I am introducing 'flags' field, which can contain some
boolean values we don't have yet, e.g. IFF_UP, IFF_PROMISC, etc.

Re: 'dstaddr' field in struct _virDomainInterfaceIPAddress;
It's basically a join of:
union {
    char *dstaddr; /* for IFF_POINTOPOINT interface */
    char *broadaddr; /* for IFF_BROADCAST interface */
}

Since an interface cannot has both flags set (see man 3
getifaddrs) I've joined both into one 'char *dstaddr'. I know it
is not mnemonic as the union, so I left it for discussion. I can
change it if you want to.

diff to v1:
-don't return array of objects, but array of pointer to objects instead

Michal Privoznik (8):
  Introduce virDomainInterfacesAddresses API
  Introduce virDomainInterfaceFree API
  qemu_agent: Implement 'guest-network-get-interfaces' command handling
  qemu: Implement qemuDomainInterfacesAddresses
  virsh: Expose virDomainInterfacesAddresses
  remote: Implement virDomainInterfacesAddresses
  python: Expose virDomainInterfacesAddresses
  python: create example for dumping domain IP addresses

 daemon/remote.c                 | 140 ++++++++++++++++++++++++++++++++
 examples/python/Makefile.am     |   2 +-
 examples/python/README          |   1 +
 examples/python/domipaddrs.py   |  50 ++++++++++++
 include/libvirt/libvirt.h.in    |  51 ++++++++++++
 python/generator.py             |   3 +
 python/libvirt-override-api.xml |   7 ++
 python/libvirt-override.c       | 120 ++++++++++++++++++++++++++++
 src/driver.h                    |   6 ++
 src/libvirt.c                   | 107 +++++++++++++++++++++++++
 src/libvirt_public.syms         |   7 ++
 src/qemu/qemu_agent.c           | 171 ++++++++++++++++++++++++++++++++++++++++
 src/qemu/qemu_agent.h           |   2 +
 src/qemu/qemu_driver.c          |  68 ++++++++++++++++
 src/remote/remote_driver.c      |  94 ++++++++++++++++++++++
 src/remote/remote_protocol.x    |  27 ++++++-
 src/remote_protocol-structs     |  27 +++++++
 tools/virsh-domain.c            | 104 ++++++++++++++++++++++++
 18 files changed, 985 insertions(+), 2 deletions(-)
 create mode 100755 examples/python/domipaddrs.py

-- 
1.8.0.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]