Deprecate old vif drivers.

As per commit 4c0cecd3 (Change-Id I292c2fd7aa0c32b1c91d737152ed8e54ea2cf6ac)
Deprecate:
* LibvirtBridgeDriver
* LibvirtOpenVswitchDriver
* LibvirtHybridOVSBridgeDriver
* LibvirtOpenVswitchVirtualPortDriver
* QuantumLinuxBridgeVIFDriver

Change-Id: Iad854dfe91aaa18622f78aa92746d3ea2f986960
Encode consoleauth token in utf-8 to make it a str

This is needed for memcached backend, because the key cannot be a
unicode object in any of the exposed functions.

Fixes bug 1164784

Co-authored-by: Stanislaw Pitucha <stanislaw.pitucha@hp.com>

Change-Id: Ieb1429116d96eefe97564fe92631063dc16117cb
Completes the power_state mapping from compute driver and manager

Fixes bug 1166906

Added extra states to constants module together with test
cases checking every state map.

Also added some debug statements under blockdev and operator
to be able to spot obvious issues with images at deploy time.

Change-Id: I77ebb4d417a3875b761f5fb220d9274b79611ff0
Allow listing fixed_ips for a given compute host.

nova.db.fixed_ip_get_all_by_instance_host was removed in commit
bb867ce3948ddc23cf928ca3dda100a1a977896a, but was still used in
nova-manage. This patch works around the removal of the foreign
key that led to this method being removed.

Resolves bug 1163660.

Change-Id: Ieccd37c752e245558827615c098604d11ad3d945
Correct disk's over committed size computing error

There's a error in the disk's over committed size computing for the
instance which using RAW type disk. This issue caused
disk_available_least resource counting increasing.

Fixes bug: 1167695

Change-Id: I4e6cf22a9cf66a757e3641e2a0be0b7699cae69d
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Import and convert to oslo loopingcall.

Import the oslo looping call implementation (which is a copy of
nova's), delete nova's local copy, convert all users to the new
location.

It should be noted that the oslo implementation of
FixedIntervalLoopingCall measures time from the start of the
periodic task, not the end, so periodic tasks will run with a
constant frequency instead of the frequency changing depending on
how long the periodic task takes to run.

Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4
hypervisor tests more accurate db

The hypervisor tests don't accurately model the db because the
sqlalchemy DB API requires admin for the compute_node_get_all
function.

This change makes it so that the fake compute_node_get_all
function in the hypervisor test module requires admin just like the
sqlalchemy DB function.

Change-Id: I5acd45cfbd10ec06d8c5a9425e9c6ed18cff669e
Translate cinder NotFound exception

When we attempt to get information about a snapshot
which doesn't exist we get a cinder NotFound exception.
However, this is not caught and causes a stacktrace in the logs.
This occurs on every tempest run in the test
EC2VolumesTest.test_create_volume_from_snapshot.

The fix is to translate the exception to SnapshotNotFound
which is handled correctly further up the call chain.

Fixes bug 1169777

Part of blueprint no-stacktraces-in-logs

Change-Id: If893b5083b93894e671c978bd23bd89d3d017531
Map internal S3 image state to EC2 API values

Fixes the EC2 API so it maps internal S3 image state values to
ones defined by the EC2 API rather than returning the internally
used values.

Fixes bug #1074904

Change-Id: Iabbda0e5fcbe4d572c76367c6f98d4bece050e73
Translate NoMoreFloatingIps exception

When the pool of floating ips is exhausted the NoMoreFloatingIps exception
is raised but not handled properly in the floating ips extension resulting
in the exception propagating further up and causing a stack trace to be logged.

This change translates the exception explicitly into a HTTPNotFound, preserving the current
REST API behaviour. It fixes a bug where the pool name was not correctly inserted into
the message returned if allocation from a specific pool was requested.

Fixes bug 1169811

Part of blueprint no-stacktraces-in-logs

Change-Id: I8f35d25d065bb1fa709cff6f59841ac8c86658bd
Remove unnecessary full resource audits at the end of resizes

Both confirm_resize and revert_resize ends with full resource audits
which is unnecessary, given that correct calculations can be made
using existing claims.

Resolves bug 1169982.

Change-Id: If0f91651605a95e73fdbf88aa18c279bfaf73b04
Add unit tests for /db/api.py#fixed_ip_*

Implements: some tests for db methods fixed_ip_* for blueprint db-api-tests
Change-Id: I51fe24600b7df2b529350ad70939a01f60bd3c9c
Fix fixed_ip_count_by_project in DB API

Fix "by project" filtering in fixed_ip_count_by_project
method of SQLAlchemy DB API implementation.

Fixes: bug #1171161
Change-Id: Id408aba6db4dd953945feba36d17b056266ca4b7
Make os.services.update work with cells

In the nova.api.openstack.compute.contrib.services:

 * Make update (enable/disable) service work

In nova.compute.api.api.HostAPI:

 Add - service_update - Used by openstack api's services.py

In nova.compute.api.cells_api.HostAPI:

 Add - service_update - Used by openstack api's services.py

In cells:

 * Increase API version from 1.6 to 1.7
 * Add service_update

Fixes bug #1150499

Change-Id: I5651bd5bc328692df82f4d9da27d390a8c95e03f
If rescue fails don't error the instance

If a rescue attempt fails, the VM's state should return to what it was
before the rescue attempt started, and the user should be notified of
the failure.

Fixes bug: 1170328

Change-Id: If5e97d06a3617adad83a4bba2ac6320616bbe83b
Merge "Deprecate old vif drivers."
Merge "hypervisor tests more accurate db"
Merge "Translate cinder NotFound exception"
Add an rpc API common to all services.

This patch adds an rpc API that is exposed by all services.  The methods
in this API exist in their own namespace and are versioned independently
of the main API for the service.

The first method for this API is a simple ping() method.  This method
exists in the conductor rpc API already, and could be more generally
useful.  Other methods will be added in later patches.

The base rpc API will be exposed from all services automatically unless
they override the create_rpc_dispatcher method in the base manager
class.  All services need to pass a service_name into the base manager
constructor.  Some services already did this, but now it's needed for
all of them.

Implements blueprint base-rpc-api.

Change-Id: I02ab1970578bc53ba26461b533d06d1055c2d88e
Deprecate conductor ping method.

Deprecate the ping() method of the conductor API in favor of the one
that comes with the base rpc API.

Part of blueprint base-rpc-api.

Change-Id: Iea46b7f6ce70f4919d0121433af2fd64d6346941