Deprecate old vif drivers.

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

Change-Id: Iad854dfe91aaa18622f78aa92746d3ea2f986960
Raise correct exception for duplicate networks

When using Quantum, if duplicate network ids are passed in on a
nova boot, nova-api raises a NetworkNotFound exception, which is
not correct.  This change causes it to raise a NetworkDuplicated
exception instead.

Fixes bug 1165088

Change-Id: I4f1f9aa5e1fa0e740b78e67760d924e2dd1d4d98
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
baremetal: Change input for sfdisk

To prevent sfdisk stopping with "bad input", use a empty string
instead of "-" (and doing so requires using "," as a separator).

Fixes bug 1166112

Change-Id: I5e4cffaa326fbafd1583d55744f921a40b3ae76f
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>
Sync rpc from oslo-incubator.

This includes rpc api namespace support, some minor configuration
related fixes, and the redis based matchmaker for use with impl_zmq.

Change-Id: I9fc826a498461417afe8b2a923edac8d68c2c18f
baremetal: VirtualPowerDriver uses mac addresses in bm_interfaces

After the change I6653829364b0a641442d45e766493180d6f2a880,
bm_nodes.prov_mac_address is no longer set. However VPD still
uses it. This patch changes VPD to use bm_interfaces.address
instead of bm_nodes.prov_mac_address.

Fixes bug 1168574.

Change-Id: I2bab869b282958ee9fd0e4776928e56351018324
Cleanup and test volume usage on volume detach

* Refactor _poll_volume_usage to be more readable

* Test that detaching a volume updates the totals on the volume usage
  cache correctly. This works but adding test to make sure that it always
  works.

Change-Id: I82da44137bc65d5f04bca0820eb327438d6e1f35
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
Delete extra space to api/volumes message

Change-Id: I04efa9c8ddb5790f99d66c302198bf92000f6e66
Signed-off-by: You Ji <jiyou09@gmail.com>
Update the log module from oslo-incubator

Contains fix to stop the logger system from logging events twice.

Also includes PID in default logging_context_format_string

Fixes bug: 1170049

Change-Id: I007786604138c41fbcf1127c01339132c56a6aab
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
Remove unused exception and variable from scheduler.

There are no cost functions, so there is no cache and no Exception to be
raised.

Change-Id: I4a67bd45e3f0c91e5507ed3794dc20b13292596b
Don't swallow PolicyNotAuthorized for resize/reboot actions

Removes 'except Exception' lines in the api which were preventing
PolicyNotAuthorized exceptions from bubbling up and returning 403 to the
caller.  This addresses policy exceptions in confirmResize,
revertResize, and reboot.

The try block calls into the compute api which sends a cast to perform
to bulk of the work, so there is little chance of an exception bubbling
up which is not already being caught.

Removes a unit test for a condition that should not exist.

Bug 1170453

Change-Id: I516a19894ab3d183057c774e84c4faa7053a6463
Imported Translations from Transifex

Change-Id: Ie208685045a154bc4f27706ae0c27d5de155a108
Merge "Don't swallow PolicyNotAuthorized for resize/reboot actions"
Fix hyperv copy file error logged incorrect

This patch just fix hyperv copy file error message
incorrect, missing src and dest value.

Fixes bug #1170580

Change-Id: I309fd67b3f491c9be872ff9cdd58f6364a26a96b
Stop vm_state reset on reboot of rescued vm

When a VM is in rescue mode, giving it a reboot will reset its state in
the DB back to ACTIVE.

This patch stops that happening.

Work towards bug: 1170237
Change-Id: Ie442bcc85ed7ad5d897b88ffd0dbcf6eeee7b990
Imported Translations from Transifex

Change-Id: Ib7dd5ace2eaf2060ea0a65ff9100a1fdbc10ccdf