use file instead of tap for non-blockdevice images on Xen

In nova/virt/libvirt/utils.py the method pick_disk_driver_name() returns
"tap" for non-blockdevices on Xen. This leads to an exception on the
xend service. The returned driver name should be "file" instead of
"tap".

fixes bug 1084618

Change-Id: Ib87f18f56afb3c5f34c30e9aea605dad24a36cdf
Add generic customization hooks via decorator.

Hooks add the ability to insert custom code around operations that
declare a named hook:

e.g.

@hooks.add_hooks('create_instance')
def create_instance(....):
   ....

The above hook allows Hook objects to be run 'pre' and 'post' the
execution of create_instance()

Hook objects are discovered via the setuptools entry point group
'nova.hooks'.

Change-Id: I3961df12ef415085de7459438967edacc34500c2
remove session param from certificate_get

remove unused session param from certificate_get()

blueprint db-session-cleanup

Change-Id: I9bcf8c73507cd3d8beb60a262d47368206652e74
update mailmap to add my perferred mail.

Change-Id: I5b0a92683b73e0bd4219f8faa9849ea71b8a3c8a
Make update_service_capabilities() accept a list of capabilities

This makes it possible to send multiple capabilites by single RPC.

Change-Id: I7c1b75eada17181c4fe08c55992b34d66276f498
Volume backed live migration w/o shared storage

This patch allows live migration of volume backed instances without
the need for shared storage (For Libvirt only).

Fixes LP Bug #1074054
DocImpact

Change-Id: If7abd63a610a44720cec2d4021cc4ee737ea301d
Fix minidns delete_entry to work for hostname with mixed case chars

Fix commonly used methods like parse_line and qualify to return
lower case strings. Review incoming method arguments to make sure
we are using comparisons where both strings are in lower case.
Fix a few spots where the input parameters were not in lower case
Added a test case for a specific problem that showed up in
the devstack gate job.

Change-Id: Ia204bde26cee5a1b22e8240a5310c5d45ffafb32
Fix positional arg swallow decorator

The update() method in the hosts extension is decorated with @check_host
but the function returned by decorator takes a kwarg which shadows the
'body' positional arg of the update() method.

i.e. if you call:

  controller.update(req, id, body)

then the body arg gets passed to the wrapper as its service kwarg and
never passed through to update(). We can see how the tests are all
passing body as a kwarg to avoid this.

Remove the service arg from check_host() but also from _list_hosts()
since the only place it is used is in the tests.

Change-Id: I12aab582c15c25fd35ecda005341291450c7efdc
Fix handling of unimplemented host actions

Fixes bug #1060884

Host actions like enable/disable, maintenance mode and power management
are not implemented in most virt drivers.

In the case of set_host_enabled() in the libvirt driver, we have a no-op
implementation. In other cases we have an implementation which raises
NotImplementedError. Since the default implementation is to do this, we
should just remove the redundant methods from the drivers which don't
actually implement these actions. This ensures NotImplementedError is
consistently raised.

On the API side, rather than looking at the return value of these
methods to determine whether they're implemented, we should just catch
NotImplementedError and return a sensible error message.

In order to do this, we need to ensure the NotImplementedError is
properly deserialized from the RemoteError which will encapsualte
it. The fix for bug #1086798 ensures this happens.

Finally, add some tests to make sure we properly respond with 501
when the virt driver doesn't implement these actions.

Change-Id: I2d4fc51a4b16d5230e61bde75915142ea450557d
Avoid vm instance shutdown when power state is NOSTATE

Occasionally when nova uses libvirt lib to query hypervisor
xen the instance state of vm_power_state may end up
with a NOSTATE value. Existing code shuts down the instance
when we hit this state. Remove the check for NOSTATE
to avoid shutting down the instance.

Fixes LP #1085771.

Change-Id: I0025f6800b6ca9cd3d7c7e6119b9a819571bd13c
Update tools/flakes to work with pydoc

Change-Id: Ib141553017aa88d6edb65b5d51c06740699a2480
Merge "remove session param from certificate_get"
Merge "Fix minidns delete_entry to work for hostname with mixed case chars"
Fix bugs in test_migrations.py

This fixes two related issues in nova/tests/test_migrations.py.

First, the snake_walk flag was only set to True for the first test run
out of TestMigrations. setUp() always set snake_walk to False initially
then would only update the value if TEST_DATABASES was empty.
TEST_DATABASES was only empty during the setUp() of the first test.
Fix this by resetting test_databases before each test.

Second, because snake_walk was always False when test_walk_versions
performing the snake walk version of the database migrations was never
tested and broken. When downgrading from version X to version X -1 of a
database version X must be passed to the migration tool as version X
contains the downgrade path for that particular version. Set the correct
versions when snake walking the DB migrations.

Part of blueprint grizzly-testtools

Change-Id: I8d4d9ee8efe46b4690dd6cbe95879e88aaeb0b5a
Sync RPC logging-related bits from oslo

These are the RPC common changes for squelching exception
logging, oslo change I4e7b19dc730342091fd70a717065741d56da4555

Change-Id: I8b5040d0ec2e70b8cc1e784151df60ac2bf3f457
Order instance faults by created_at and id.

It is possible that instance faults have the same created_at values so
ordering on that field alone is not deterministic. Add an additional
order by clause to order descending on id as well.

I am not sure if the order by exists to make tests pass; however,
without the additional "id" the tests do occasionally fail. See
http://logs.openstack.org/15078/18/check/gate-nova-python26/10709/console.html
for an example failure. If order does not actually matter we may want to
make the test smarter instead.

Part of blueprint grizzly-testtools

Change-Id: I1c7a07669846c832270631c1734dae509dba7586
Simplify how ephemeral disks are created and named.

Resolves bug 1087028.

Change-Id: Ife7ec43cf76cf04a98f1db2135f9149a2eefb55d
Merge "Sync RPC logging-related bits from oslo"
Merge "Simplify how ephemeral disks are created and named."
Reset node to source in finish_revert_resize()

bug 1087760

Change-Id: I8c50543de1efc48b9dde0dc045fcd52bc89b727b