Updated openstack/openstack
Project: openstack/nova  501632d54ecea6cb207dc32251e2fcc665105b7c
null
Fix logic in LibvirtConnTestCase._check_xml_and_uri

The _check_xml_and_uri method has two loops making it
iterate over different hypervisor types. By default it
will iterate over qemu, kvm, xen and lxc, but it can be
made to only check xen by setting the 'xen_only' param
or the 'expect_xen_hvm' parameters.

Unfortunately the second loop is only filtered if the
'expect_xen_hvm' parameter is set, not if only the
'xen_only' parameter is set. This flaw hasn't showed
up before, due to a flaw elsewhere in the libvirt
driver code, cancelling it out.

Change-Id: If70faa05975b726067ab6edaa505ca8d0c230a38
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Updated openstack/openstack
Project: openstack/nova  4a13c39aca9188a4c1c7a8a0ad77ba66a489a98d
null
Remove duplicate setting of os_type in libvirt config builder

In the following change

  commit 158d821204d2f79cc06c1443562b3ce9bbe7cb9f
  Author: Christoph Thiel <cthiel@suse.com>
  Date:   Thu Jul 26 00:07:24 2012 +0200

    libvirt driver: set os_type to support xen hvm/pv

The libvirt driver get_guest_config() method was changed to
use the 'vm_mode' property from the instance to set the guest
os_type attribute. If this property was not set, then it used
defaults based on the virt type. Unfortunately it neglected to
remove most of the existing later code which also set os_type
based on virt type. So in many cases we end up setting the
os_type twice. Fortunately this did not have any ill effects,
since only Xen currently needs the ability to override os_type
using 'vm_mode'. This change cleans up the mess to avoid
future confusion & problems.

Change-Id: Ib11cb1196755f993b07e892e9f2adfc36e44a4e2
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>