[libvirt] 答复: Re: [PATCH 1/3] bridge_driver: Return the live state info of a given virtual network

Lin Ma lma at suse.com
Thu Feb 5 15:36:42 UTC 2015


>>>> "Daniel P. Berrange" <berrange at redhat.com> 2015-2-4 下午 17:17 >>>
>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 
>> ---
>>  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.
Obtaining a list of macvtap devices associated with a physical NIC,
It's a good idea. I intend to implement this api, also implement a new
virsh subcommand to show these information to user. 
If you agreed with my thought, Then what are the proper api name and
virsh subcommand name you suggest? and what about the output format?

>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.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150205/2e3340df/attachment-0001.htm>


More information about the libvir-list mailing list