On Mon, Feb 02, 2015 at 10:08:21PM +0800, Lin Ma wrote:
It constructs a temporary static config of the network, Obtains all
of
attached interfaces information through netcf, Then removes the config.
Signed-off-by: Lin Ma <lma(a)suse.com>
---
include/libvirt/libvirt-network.h | 1 +
src/Makefile.am | 3 +
src/network/bridge_driver.c | 141 ++++++++++++++++++++++++++++++++++-
src/network/bridge_driver_platform.h | 7 ++
tests/Makefile.am | 4 +
5 files changed, 155 insertions(+), 1 deletion(-)
So, IIUC, the point of this change is to display a list of all the TAP
devices attached to a network. I'm not entirely convinced this is the
right approach to take. Also do we want to limit this to reporting of
devices inside bridges. It could be equally useful to see a list of
macvtap devices associated with a physical NIC.
Modifying the XML to include the list of VIFs is certainly one options,
but I'm not sure it is necceessarily the best. As Laine points out this
is a output only attribute - not something you can feed in with the XML
when defining the network.
Perhaps we want to have an actual API for this - a virNetworkListPorts
which returns a list of associated devices (of any type) from guests.
Or perhaps we should be reporting a list of virDomainPtr's that are
attached to the network, or perhaps even both.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|