[Libvir] [PATCH] Show Xen vif<domid>.<n> device name in domain XML

This patch changes the Xen domain XML so that it shows the target device (ie. vif<domid>.<n>), which you can then use to collect interface stats. For example: # virsh dumpxml fc6_1 ... <interface type='bridge'> <source bridge='xenbr0'/> <target dev='vif2.0'/> <mac address='00:16:3e:1a:2f:8c'/> <script path='vif-bridge'/> </interface> Note that this patch only adds to the XML, it doesn't change any XML that was being returned before. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Mon, Aug 20, 2007 at 05:26:35PM +0100, Richard W.M. Jones wrote:
This patch changes the Xen domain XML so that it shows the target device (ie. vif<domid>.<n>), which you can then use to collect interface stats.
For example:
# virsh dumpxml fc6_1 ... <interface type='bridge'> <source bridge='xenbr0'/> <target dev='vif2.0'/> <mac address='00:16:3e:1a:2f:8c'/> <script path='vif-bridge'/> </interface>
Note that this patch only adds to the XML, it doesn't change any XML that was being returned before.
Looks fine to me. We'll also need to fix the QEMU driver too IIRC, to give back the name of the auto-created TAP device 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 Mon, Aug 20, 2007 at 10:46:45PM +0100, Daniel P. Berrange wrote:
On Mon, Aug 20, 2007 at 05:26:35PM +0100, Richard W.M. Jones wrote:
This patch changes the Xen domain XML so that it shows the target device (ie. vif<domid>.<n>), which you can then use to collect interface stats.
For example:
# virsh dumpxml fc6_1 ... <interface type='bridge'> <source bridge='xenbr0'/> <target dev='vif2.0'/> <mac address='00:16:3e:1a:2f:8c'/> <script path='vif-bridge'/> </interface>
Note that this patch only adds to the XML, it doesn't change any XML that was being returned before.
Looks fine to me. We'll also need to fix the QEMU driver too IIRC, to give back the name of the auto-created TAP device
+1, I assume this doesn't change any of the regression test data, right ? 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/

Daniel Veillard wrote:
On Mon, Aug 20, 2007 at 10:46:45PM +0100, Daniel P. Berrange wrote:
On Mon, Aug 20, 2007 at 05:26:35PM +0100, Richard W.M. Jones wrote:
This patch changes the Xen domain XML so that it shows the target device (ie. vif<domid>.<n>), which you can then use to collect interface stats.
For example:
# virsh dumpxml fc6_1 ... <interface type='bridge'> <source bridge='xenbr0'/> <target dev='vif2.0'/> <mac address='00:16:3e:1a:2f:8c'/> <script path='vif-bridge'/> </interface>
Note that this patch only adds to the XML, it doesn't change any XML that was being returned before. Looks fine to me. We'll also need to fix the QEMU driver too IIRC, to give back the name of the auto-created TAP device
+1, I assume this doesn't change any of the regression test data, right ?
Ahem yes. Tests fixed and the change committed. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones