Disable oslo.messaging debug logs

oslo.messaging debug logs are too verbose, turn them off. A similar patch
dropped nova-conductor logs in the gate down from 7MB to under 300K.

Cherry-Pick from oslo-incubator since we are in feature freeze:
Ia12c003dae196e2220a5f6ea768758a75f2ede23 and
Icc61964c6a2b002ac1c8566f174e6a5230674c75

Change-Id: I9e6456f1c979d9a57fc7fa93fb290c6a26017373
Fixes HostTestCase failures due to slow test run

Status check in _list_hosts() fails if tests take longer than the
service_down_time.

Stubbing utcnow() guarantees that status check passes for tests.

Change-Id: I188443730ce077a8117812f1089db36ece184e7a
Closes-Bug: 1292643
Fixes HP LeftHand driver with Paramiko 1.13.0

With Paramiko 1.13.0, the method exec_command now returns Unicode.
This causes a problem when the driver tries to build the XML returned
from the LeftHand array. The XML header returned from the array defines
the encoding as encoding=UTF-8. Therefore, we must now ensure the
encoding passed to the parser is utf-8.

Change-Id: I7b504626e2d9a0ee2b62820b11f56eb136e31987
closes-bug: #1298608
Inform about instance_uuid in volume usage notification

Change-Id: I6f43a2ef2401d6369ad0258f61fe2d3a8c168734
Correct metadata ordering issue in tests

Some test including test_volume_get_all_filters
fails randomly because metadata is in a dict and
the items order is undefined.
The test comparison was changed to avoid unexpected
test results.

Change-Id: Ibb24d21cd05aa1eefb45b61c63de067b34fb1013
Closes-Bug: #1293792
Enable flake8 H303,H304 checking

We had two types of wildcard imports in the code. Unneeded ones
in test files that are just removed, and some that we actually
want which are kept using the '#noqa' comment to tell flake8
to skip specific checks (such as H303) for that line.

Change-Id: I7d194a7bbcccdba419a2a49a919e17c047633cf0
Add exception catch if Storwize/SVC driver failed when
retyping

If adding a copy for a volume of Storwize/SVC which is under
migration, Storwize/SVC command will fail because the
number of the copies of the volume exceed the limit which
is 2.

Modifying the volume type when adding a copy for the volume,
Storwize/SVC driver will also fail, should add exception catch.

Also add exception catch when getting the volume from the database.
This change is necessary to enable resolving bug 1305550
(https://bugs.launchpad.net/cinder/+bug/1305550 - Failed retype with
driver raised exception should set volume status to "error" ).

Change-Id: I1cf4b6606b5228c8adcb2bde21f345fa979bc13e
Closes-Bug: #1298201
Use cached db object in volume_mig_status ext

There is no need to rerequest the volume object from the db in
the extension because we already have a cached copy in the request.
This can potentially save hundreds of db queries in list.

Change-Id: I46da8c7b6c2af2435d246ebd8e95d4712065f1e7
Resolves-bug: 1308255
Merge "Inform about instance_uuid in volume usage notification"
Merge "Fixes HP LeftHand driver with Paramiko 1.13.0"
Merge "Disable oslo.messaging debug logs"
Merge "Use cached db object in volume_mig_status ext"
Create volume fail when image id is ""

When call create volume api with image id "", it will create an empty
volume.
But when create volume with snapshot id "" or srv volume "", it will
return an 404 error.
So it should create volume fail when call create volume api with image id
"".

Change-Id: If2c7b061753bbbd172a09d35b343e73e90a1b7b4
Closes-Bug: #1302609
Re-raise exceptions in upload-to-image

This patch catches any exceptions returned from Glance during an
upload-to-image operation and re-raises them so that the user can see
the failure message and make the appropriate adjustments.  More
specifically, this addresses an invalid container format.

For example, the following command:

    $ cinder upload-to-image --container-format foobar ...

Goes from:

    ERROR: The server could not comply with the request since it is
           either malformed or otherwise incorrect. (HTTP 400)
           (Request-ID: req-f19bad2f-c39d-40a2-a3cc-6db9b9fe64cd)

To:

    ERROR: 400 Bad Request
    Invalid container format 'foobar' for image.
        (HTTP 400) (HTTP 400)
        (Request-ID: req-47cb2772-78c4-48b7-87ce-fb124ecfa989)

Closes-Bug: #1308689
Change-Id: If18851e0b9f5c242f84b1eab928b42d809335d80
Adjust sample config for keystoneclient 0.8.0 release

Helps fixing the gate again.

Change-Id: Ic962613fd7ee3e978890c25f911f509e9533ef8a
Merge "Create volume fail when image id is """
Merge "Re-raise exceptions in upload-to-image"
Merge "Correct metadata ordering issue in tests"
Merge "Fixes HostTestCase failures due to slow test run"
Merge "Add exception catch if Storwize/SVC driver failed when retyping"