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
Sync latest openstack.common.rpc

Changes since last sync:

 202f568 Use json instead of jsonutils in rpc.impl_fake.
 6d102bc Provide i18n to those messages without _()
 8695285 Qpid H/A cluster support
 faeafe1 Fixes import order
 cf705c5 Make project pyflakes clean.
 05f8ec7 Fix common rpc to use common logging instead of python logging
 b6d24bb updating sphinx documentation
 33fbd87 Added initialize_service_hook for rpc.Service.
 cf849e0 Clean up dictionary use in RPC drivers

Change-Id: I4fbade51390e159bd9cccd2afc918a4f07740993
powervm: Refactored run_command for better naming

This change refactors two methods of blockdev.py in the
interest of better naming. run_command() and run_command_as_root()
have been refactored as run_vios_command() and
run_vios_command_as_root() respectively to better indicate that these
run commands on a remote system, the VIOS.

bp powervm-compute-enhancements

Change-Id: If65b4ff08e058443c7d10fcdf98e13c7aa207c56
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
Fix pep8 exclude logic for 1.3.3

* With pep8 1.3.3 the exclude logic monkey patch broke causing
  tools/hacking to run on openstack/common code
* Also add .git to exclude list

Fix bug 1086410

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

Change-Id: Ib141553017aa88d6edb65b5d51c06740699a2480
Add new cliutils code from oslo-incubator.

Change-Id: I03d93c5024965d4252a18d8cb564a7512b728994
Merge "Sync latest openstack.common.rpc"
Merge "powervm: Refactored run_command for better naming"
Improve nova-manage usability

Prevent nova-manage from stack tracing when the wrong number of
arguments are passed in.

Fixes bug 1083315

Change-Id: I7b9a237a82b4255d88c01c6a56ad0ccd4a6ee984
Merge "Add new cliutils code from oslo-incubator."
Merge "Improve nova-manage usability"
Fix regression allowing quotas to be applied to projects.

Change-Id: I9c7dfa7664badcafb800c02ee608699e56b344ab
Fixes: bug #1084261
Merge "Fix pep8 exclude logic for 1.3.3"