[Libvir] Support non-bridged network configs

The current code for parsing/serializing VIFs only really deals with the default bridged networking config for Xen. So if one uses network-route or network-nat it completely breaks. There is also no support for dealing with IP address in the XML / SEXPR. The attached patch fixes both of these issues, so we should be able to deal with any of the standard Xen networking configs. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Fri, Nov 10, 2006 at 10:54:41PM +0000, Daniel P. Berrange wrote:
The current code for parsing/serializing VIFs only really deals with the default bridged networking config for Xen. So if one uses network-route or network-nat it completely breaks. There is also no support for dealing with IP address in the XML / SEXPR. The attached patch fixes both of these issues, so we should be able to deal with any of the standard Xen networking configs.
Sounds fine to me, it's just a bit surprizing that the order of script and mac are inverted compared tp previous. That should be equivalent though so it's not a big deal.
diff -c -r1.2 sexpr2xml-fv-v2.xml *** tests/sexpr2xmldata/sexpr2xml-fv-v2.xml 9 Oct 2006 14:32:07 -0000 1.2 --- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml 10 Nov 2006 22:24:41 -0000 *************** *** 29,36 **** </disk> <interface type='bridge'> <source bridge='xenbr0'/> - <mac address='00:16:3e:1b:b1:47'/> <script path='vif-bridge'/> </interface> <graphics type='vnc' port='5903'/> </devices> --- 29,36 ---- </disk> <interface type='bridge'> <source bridge='xenbr0'/> <script path='vif-bridge'/> + <mac address='00:16:3e:1b:b1:47'/> </interface> <graphics type='vnc' port='5903'/> </devices>
Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Mon, Nov 13, 2006 at 10:43:39AM -0500, Daniel Veillard wrote:
On Fri, Nov 10, 2006 at 10:54:41PM +0000, Daniel P. Berrange wrote:
The current code for parsing/serializing VIFs only really deals with the default bridged networking config for Xen. So if one uses network-route or network-nat it completely breaks. There is also no support for dealing with IP address in the XML / SEXPR. The attached patch fixes both of these issues, so we should be able to deal with any of the standard Xen networking configs.
Sounds fine to me, it's just a bit surprizing that the order of script and mac are inverted compared tp previous. That should be equivalent though so it's not a big deal.
Yeah, it shouldn't be a big deal since XML doesn't really care about ordering of child elements. That said, it was trivial to re-arrange the code to keep generating elements in the original order, so I made that change before committing to CVS. I also added a bunch more test data files to validate the routed networking configs are working correctly. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard