Add a driver method to toggle instance booting

Add a driver method to toggle the ability to boot an instance.

The only implementation provided is for the xenapi virt driver.  Other
drivers will log a warning and treat the method as a no-op.

Implements: blueprint cleanup-running-deleted-shutdown

Change-Id: Ie448c681d653b126cb12d3a48d79ab4febde8828
objects: declare some methods as static

A lot of code is composed of static methods, but they are not declared
as is.

Change-Id: I64be630b560e331aed9d1ab9a68152da52eb0d82
Pass Instance object to spice compute rpc api

Update the get_spice_console() method of the compute rpc api to take in
an Instance object instead of a dict.  The object_compat() decorator is
used to maintain backwards compatibility with receiving a dict.

Change-Id: I0bafe18d9c8bffcd0b72629542fbf7aedacdfbb4
Fix testcase config option imports

Fixes some testcases where config options were used before they
were guaranteed to be imported. This was causing intermittent
failures of tests such as test_shelve_offload.

Closes-Bug: 1256210

Change-Id: Id0204d67f35cb098a4ddfb670f5968e76b327705
VMware: enable driver to work with postgres database

The hypervisor version is expected to be an integer and not
a string.

Change-Id: Ifac9ca3480191413e3a02f0dae94e452707ae82f
Closes-Bug: #1195139
Update help for osapi_compute_listen_port

This patch cleans up the configuration help for the
osapi_compute_listen_port option.

Change-Id: Ib253fc542637aee3bcdcc4c5f7330a3be490a5a9
Fix Neutron Authentication for Metadata Service

A recent change to the way Nova creates a Neutron client
51e5f52e4cb60e266ccde71f205c91eb8c97b48b changed the conditions
under which it re-authenticates using the neutron admin credentials
from "if admin" to "if admin or context.is_admin".  However this
meant that any user with admin role in Nova interacted with Neutron
as a different tenant, preventing them from non-admin actions such
as allocating floating IPS.

This was then addressed by 1c1371c78b990447aeaa4377b512f8887e6ff3ce
which only reauthenticated as admin on the explicit use of
"admin=True" parameter to neutonv2.get_client().

However the metadata service does not explicitly create the neutron
client so it has to pass in a context created by
context.get_admin_context() which has is_admin=True but no auth_token.

This change therefore accepts this combination of context values
as a valid reason to re-authenticate as admin, while still allowing
users with the admin role to use their own token.

As a tidy up two tests for getting an admin client are moved from
TestNeutonClient to join the other admin client tests in
TestNeutronClientForAdminScenarios

Change-Id: Ic2a6f383a85f6bb606d8d65feaefa0d23329adb9
Closes-Bug:  1255577
Remove last of AssertEquals

Change-Id: I2f130e10c387bd8828ef35d5dce16fbf87557c3b
Merge "Remove last of AssertEquals"
Merge "VMware: enable driver to work with postgres database"
Merge "Fix testcase config option imports"
Merge "Update help for osapi_compute_listen_port"
Merge "Add a driver method to toggle instance booting"
Merge "Pass Instance object to spice compute rpc api"
Merge "objects: declare some methods as static"