<html><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><META name="Author" content="Novell GroupWise WebAccess"><style type="text/css"> 
body p 

        margin: 0px; 
}
</style></head><body style='font-family: Helvetica, Arial, sans-serif; font-size: 13px; '><div id="GroupWiseSection_1423149412000_lma@suse.com_B118D7016C3D0000BC7D000BCD69755F_" class="GroupWiseMessageBody"><div><br></div><span></span><span class="GroupwiseReplyHeader"><span class="GroupwiseReplyHeader">></span>>>> "Daniel P. Berrange" <berrange@redhat.com> 2015-2-4 下午 23:10 >>><br></span><span class="GroupwiseReplyHeader">></span>On Wed, Feb 04, 2015 at 02:21:18AM -0500, Laine Stump wrote:<br><span class="GroupwiseReplyHeader">></span>> On 02/03/2015 11:47 AM, Michal Privoznik wrote:<br><span class="GroupwiseReplyHeader">></span>> > On 02.02.2015 15:08, Lin Ma wrote:<br><span class="GroupwiseReplyHeader">></span>> >> * Get the live state info of a virtual network through netcf in networkGetXMLDesc.<br><span class="GroupwiseReplyHeader">></span>> >> * Add --system flag for net-dumpxml to show the live state info.<br><span class="GroupwiseReplyHeader">></span>> >> * Check the live state info in net-destroy.<br><span class="GroupwiseReplyHeader">></span>> >> * Add --force flag for net-destroy to forcibly destroy the virtual network.<br><span class="GroupwiseReplyHeader">></span>> >> * Check the transient interfaces info in iface-unbridge.<br><span class="GroupwiseReplyHeader">></span>> >><br><span class="GroupwiseReplyHeader">></span>> >> ---<br><span class="GroupwiseReplyHeader">></span>> >> Lin Ma (3):<br><span class="GroupwiseReplyHeader">></span>> >>   bridge_driver: Return the live state info of a given virtual network<br><span class="GroupwiseReplyHeader">></span>> >>   virsh: prevent destroying a in-used network for net-destroy<br><span class="GroupwiseReplyHeader">></span>> >>   virsh: prevent removing a in-used bridge for iface-unbridge<br><span class="GroupwiseReplyHeader">></span>> >><br><span class="GroupwiseReplyHeader">></span>> >>  include/libvirt/libvirt-network.h    |   1 +<br><span class="GroupwiseReplyHeader">></span>> >>  src/Makefile.am                      |   3 +<br><span class="GroupwiseReplyHeader">></span>> >>  src/network/bridge_driver.c          | 141 ++++++++++++++++++++++++++++++++++-<br><span class="GroupwiseReplyHeader">></span>> >>  src/network/bridge_driver_platform.h |   7 ++<br><span class="GroupwiseReplyHeader">></span>> >>  tests/Makefile.am                    |   4 +<br><span class="GroupwiseReplyHeader">></span>> >>  tools/virsh-interface.c              |  25 ++++++-<br><span class="GroupwiseReplyHeader">></span>> >>  tools/virsh-network.c                |  62 ++++++++++++++-<br><span class="GroupwiseReplyHeader">></span>> >>  tools/virsh.pod                      |   8 +-<br><span class="GroupwiseReplyHeader">></span>> >>  8 files changed, 241 insertions(+), 10 deletions(-)<br><span class="GroupwiseReplyHeader">></span>> >><br><span class="GroupwiseReplyHeader">></span>> > So I've spent some time thinking about this. I don't really like the<br><span class="GroupwiseReplyHeader">></span>> > idea of producing completely different XML (it doesn't even have<br><span class="GroupwiseReplyHeader">></span>> > <network> as its root element!). But I see what you're trying to<br></network><network><span class="GroupwiseReplyHeader">></span>> > achieve. How about putting the bridged interfaces into the network<br></network><network><span class="GroupwiseReplyHeader">></span>> > definition (on request signalized by a flag, of course).<br></network><network><span class="GroupwiseReplyHeader">></span>> <br></network><network><span class="GroupwiseReplyHeader">></span>> I think that if we're going to add the list of connected guest devices<br></network><network><span class="GroupwiseReplyHeader">></span>> to a network's status, that it should just always be there - adding a<br></network><network><span class="GroupwiseReplyHeader">></span>> new flag for every little bit of different status sets a bad precedent<br></network><network><span class="GroupwiseReplyHeader">></span>> and sets us up to have an infinitely increasing number of flags.<br></network><network><span class="GroupwiseReplyHeader">></span>> <br></network><network><span class="GroupwiseReplyHeader">></span>> Like I mentioned in my response to one of the patches, I think this<br></network><network><span class="GroupwiseReplyHeader">></span>> information is better gathered and maintained by the bridge driver as<br></network><network><span class="GroupwiseReplyHeader">></span>> guests connect to / disconnect from a network; this avoids the necessity<br></network><network><span class="GroupwiseReplyHeader">></span>> of dragging netcf into the picture and allows much better information -<br></network><network><span class="GroupwiseReplyHeader">></span>> the name of the domain using each interface can be included.<br></network><span class="GroupwiseReplyHeader">></span><br><network><span class="GroupwiseReplyHeader">></span>You know if this checking for guests were done in the virNetworkDestroy<br></network><network><span class="GroupwiseReplyHeader">></span>API implementation in src/network/bridge_driver.c, instead of in<br></network><network><span class="GroupwiseReplyHeader">></span>virsh, then we would not need any of this code for extending the XML<br></network><network><span class="GroupwiseReplyHeader">></span>nor parsing it in virsh. We could simply check the number of connections<br></network><network><span class="GroupwiseReplyHeader">></span>which is something we have directly available internally. So 95% of this<br></network><network><span class="GroupwiseReplyHeader">></span>patch series would go away<br>:-C I'm sad...... :-), Anyway, Because we keep the original behaviour of<br>net-destroy, So we keep iface-unbridge no changes as well, Then droping<br>this patch series makes sense.<br></network></div></body></html>