libvirt/tools
Luyao Huang 1ba8156cc9 virsh: fix IP address in domdisplay for listen type='network'
https://bugzilla.redhat.com/show_bug.cgi?id=1191016

virsh's domdisplay command looks in /domain/devices/graphics/@listen
of the domain's XML for the listen address, however for listen
type='network' (added in libvirt 0.9.4), the <graphics> element
doesn't have a listen attribute, but has a <listen> subelement,
*still* with no address (this is the inactive XML):

 <graphics type='spice' autoport='yes' keymap='en-us'>
  <listen type='network' network='default'/>
 </graphics>

However, at domain start time the <listen> subelement gets its address
attribute filled in once libvirt figures out the IP address associated
with the named network (this is the status XML):

 <graphics type='spice' port='5901' autoport='yes' keymap='en-us'>
  <listen type='network' address='192.168.122.1' network='default'/>
 </graphics>

So in these cases, we need to look at
/domain/devices/graphics/listen/@address instead.

Even though another patch is being pushed that will backfill
listen/@address into @listen, this patch is still useful, as it fixes
domdisplay for cases of a new virsh (with this patch) connecting to a
libvirtd that is newer than 0.9.4 but doesn't have the followup patch.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Laine Stump <laine@laine.org>
2015-02-11 10:52:22 -05:00
..
wireshark Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.init.in
libvirt-guests.service.in
libvirt-guests.sh.in
libvirt-guests.sysconf
Makefile.am
virsh_win_icon.rc
virsh-console.c Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
virsh-console.h
virsh-domain-monitor.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-domain-monitor.h
virsh-domain.c virsh: fix IP address in domdisplay for listen type='network' 2015-02-11 10:52:22 -05:00
virsh-domain.h virsh: domain: Split out code to lookup domain from string 2014-08-26 22:48:05 +02:00
virsh-edit.c Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
virsh-host.c Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
virsh-host.h
virsh-interface.c virsh: Convert EDIT_NOT_CHANGED macro to do-while block. 2014-11-14 17:13:00 +01:00
virsh-interface.h
virsh-network.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-network.h
virsh-nodedev.c
virsh-nodedev.h
virsh-nwfilter.c virsh: Convert EDIT_NOT_CHANGED macro to do-while block. 2014-11-14 17:13:00 +01:00
virsh-nwfilter.h
virsh-pool.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-pool.h
virsh-secret.c
virsh-secret.h
virsh-snapshot.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-snapshot.h
virsh-volume.c virsh-volume: add support for --reflink 2015-02-03 11:37:30 -05:00
virsh-volume.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh.h
virsh.pod S390: ccw support for virsh attach-disk address parameter 2015-02-09 14:22:23 +01:00
virt-host-validate-common.c
virt-host-validate-common.h
virt-host-validate-lxc.c
virt-host-validate-lxc.h
virt-host-validate-qemu.c
virt-host-validate-qemu.h
virt-host-validate.c
virt-login-shell.c
virt-login-shell.conf
virt-login-shell.pod
virt-pki-validate.in
virt-sanlock-cleanup.in
virt-xml-validate.in