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
Add Region name to quantum client

Looks like multi-region setups need the region name

Fixes LP# 1081037

DocImpact

Change-Id: Id8d5b1e1adef75a93df9a3527fd6da463fed0d09
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>
Move task_log functions to conductor

This moves the use of the following functions in compute/utils to
the conductor:

  task_log_get()
  task_log_begin_task()
  task_log_end_task()

This removes the db import from compute/utils.py

Related to blueprint no-db-compute

Change-Id: I6ed0563969afee78d9f2970308bc7f91e5690159
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
Fixed grammar problems and typos in doc strings

Change-Id: Ia38397f46f12ffdf3024dbaca20956416e6a84d3
Nova Hyper-V driver refactoring

Blueprint: hyper-v-testing-serialization-improvements

This patchset contains a major refactoring of the Hyper-V driver.

The main reason for this refactoring is to provide proper component
abstraction and decoupling, thus replacing almost entirely the remaining
pre-Essex code previously available. This leads to a considerable
semplification of the testing framework, which is now entirely based on
stubs and mocks (mox), without any serialized stub / mock.

From an architectural perspective, the main driver class delegates
operations to "ops" classes (e.g. VMOps, VolumeOps, etc) which contain the
main logic and delegate OS specific actions to "utils" classes (e.g. VMUtils,
LiveMigrationUtils, etc) where the WMI and Win32 API OS specific code resides.

Additional attention has been put also into a better PEP8 code formatting,
including compliance with not mandatory checks like E121 through E128.

Change-Id: I900719c02b7c6b48d44ca68903813a1dcd023f9f
Merge "Add Region name to quantum client"
Merge "Move task_log functions to conductor"
Pass testropts in to setup.py in run_tests.sh

Change-Id: Idba469fbd8c0488a308071de45e16eedcb1d6cc6
Merge "Nova Hyper-V driver refactoring"
Fix SQL Error with fixed ips under devstack/postgresql

Postgresql does not allow sql that mix integer and booleans.
Switch to check if deleted flag is set to 0

Fixes LP# 1109889

Change-Id: Icf03aa9591d398ba7d12f0db91e43df140e0df50