libvirt: use tap for non-blockdevice images on Xen

This patch reverts 35c4962c0b97bae5b8751d316d5822fe22c1ab6a: 'use
file instead of tap for non-blockdevice images on Xen', which breaks
qcow2 disk working on Xen. If the method pick_disk_driver_name()
returns 'file' for qcow2 format, we would get the following disk XML
snippet:

    <disk type="file" device="disk">
      <driver name="file" type="qcow2" cache="none"/>
      <source file="/data/instances/instance-00000081/disk"/>
      <target bus="xen" dev="hda"/>
    </disk>

which produces configuration in the xen tools like:

    "file:/data/instances/instance-00000081/disk,hda,w"

Guest would not boot successfully, as Xen doesn't think of disk format
as qcow2. Instead, 'tap' works with both raw and qcow2 disk.

For LP#1084618, I think it is related with libvirt verion. In my
deployment(libvirt-1.0.1), 'tap' dirver could produce correct
configuration for both raw and qcow2 disk format.

Change-Id: I636b2fed366474e2ae8c3b52403e3085724b24f0
Add rootwrap filters for password injection with localfs

Allow to 'sudo cat' to read passwd and shadow.

bug 1098077

Change-Id: Ic734bd33223df879b5e1f144bb4c85702eb88dfa
Fix rendering of FixedIpNotFoundForNetworkHost

Fixes bug 1104000

With https://review.openstack.org/18319 a small bug was introduced. The
exception FixedIpNotFoundForNetworkHost is expecting network_id
parameter, and the change modified that parameter to network_uuid. This
patch fixes this problem at the raise point.

Change-Id: Idc0fa7fcba9ad37b73183f8811376c6c8adada68
Add debug log when call out to glance

Calling out to another service may take a while, so lets log this

Change-Id: I223105ee578ae82230cbc3936c096e148b07e8f1
Don't warn up front about libvirt loading issues in NWFilterFirewall

Use the same technique as in libvirt/driver.py to delay import of
libvirt module

Change-Id: I500ddde4651f0f747c54533a1a308eee5a87f717
Use install_venv_common.py from oslo.

This syncs install_venv_common.py from oslo and reworks the
tools/install_venv.py script to use the new library.

Change-Id: I020eae1ec9e3a6aae0ecc7825c0ef723ab247f39
Fix missing wrap_db_error for Session.execute() method

We should add wrap_db_error for Session.execute() method, because
Query.update() method will call Session.execute() and it is not inside
Session.flush(), so exceptions from Query.update() wouldn't be wrapped.

Add test for Session.flush() wrapper
Add test for Session.execute() wrapper

Fixes bug 1107890

Change-Id: I96894e502f9f279999b61a1e66469e34a07a022d
Fix boot with image not active

When boot with image which is not active, nova API response
with http status code 500. We should catch the exception and
raise HTTPBadRequest with more precise information.

Fix LP# 1108645

Change-Id: Ibd78f4b96bfdb925b03d7809d4e28afcc7e1ddcf
Pass parameter 'filter' back to model layer

This allows the API to pass back additional arguments to filter search
results by.  This will be useful for resource tagging or other filters.

DocImpact: Adds 'Filter' parameter to DescribeInstance (see
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html)

Fixes: bug #922835

Change-Id: I58cc12df650829ed7eb685184a22186d8a5406f4
Signed-off-by: Stephen Gran <stephen.gran@guardian.co.uk>
Refactor libvirt volume driver classes to reduce duplication

Most of the libvirt volume driver class repeat the same setup
of the vconfig.LibvirtConfigGuestDisk() instance. Create a
more suitable base class to hold this common setup and simplify
all the other subclasses accordingly

Change-Id: I9a5a70ccf88a1e55cdb120c8c6d29e6847774691
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
xenapi: Add support for different image upload drivers

This change refactors image upload code for xenapi and adds the
xenapi_image_upload_handler config option.

Preparation for bp nova-direct-image-upload
DocImpact

Change-Id: Icd4e7ef135beddca9ddcc4a880c09e5a1702a93c
Fix eventlet/mysql db pooling code

Eventlet versions >= 0.10 return a tuple from
db_pool.ConnectionPool().create(), not a scalar.

Also, set the FOUND_ROWS client flag, which sqlalchemy
appears to require to sanity check the number of rows
touch.

bug 1097992

Change-Id: I64e798660c506fcd13947a232cb7832db0318360
Merge "Fix eventlet/mysql db pooling code"
Merge "xenapi: Add support for different image upload drivers"
Added sample tests to FlavorExtraSpecs API

Partially implements blueprint nova-api-samples
Fixes bug 1097131

Change-Id: I38a51e656cc9474e331d8f568d9e7fb6ba62ef42
Remove unnecessary deserializer test

Fixes bug 1109166

Change-Id: Icb2d7a613103e130e83e054864bfdbc599747537
Merge "Add debug log when call out to glance"
Merge "Fix rendering of FixedIpNotFoundForNetworkHost"
Merge "libvirt: use tap for non-blockdevice images on Xen"
Merge "Don't warn up front about libvirt loading issues in NWFilterFirewall"