Remove unused quota_* calls from conductor

Compute manager's use of quota calls has been converted to using
objects internally and conductor's quota_commit and quota_rollback
methods are no longer used.

Change-Id: I6f43cb7f94775632e97d40e65ca08a3ba5dc195f
Use the list when get information from libvirt

If the libvirt adds new elements to the domain info struct or others,
when use the new libvirt, there will be a valueError (too many values
to unpack). When we get information from libvirt, we should use the
original variable format. This change is for compatibility with upcoming
versions of libvirt which change this signature.

Change-Id: I0271a260a53fe8f5fc17b2934ebe3a3c9ee0c130
Closes-Bug: #1291805
Merge "Use HTTPRequestV3 instead of HTTPRequest in v3 API tests"
Instance groups: cleanup

The patch set does the following:
1. use list comprehension for unsupported policy check
2. removes unused import

This is part of blueprint instance-group-api-extension.

Change-Id: Ia1f4203efd1e2ef5880765abc507bb7f9cdea6d6
Updated from global requirements

Change-Id: I29f162341acdfd8ef960e3921048421d15fbdf2c
Merge "Instance groups: only display valid instances for policy members"
Add a decorator decorator that checks func args

This patch adds a decorator for decorators that allows specifying the
arg names that the function being decorated must accept. If the function
being decorated does not accept the specified args, an exception will be
thrown during 'decoration', meaning import time usually.

If however the function accepts variable number of arguments, the
decorator will be a no-op as it is not possible to guess what will be
passed at runtime. This is however good enough for Nova's compute
manager decorators that inspired this work, as they decorate methods
with well defined and even versioned arguments.

Several decorators used in compute manager are now fortified with this
"compile time" check.

Partial-bug:#1296593
Change-Id: I00ebcc8a092fa0894ba8764699093f59a46b8647
Rename _post_live_migration instance_ref arg

This was causing issues with the wrap_instance_fault decorator, as it
expects the argument to be called 'instance'. Also it is being passed an
instance object now so instance_ref can be misleading.

This patch also moves all the tests for the said method to use instance
objects instead of a dict, as this is what is happening in reality.

Finally we secure the wrap_instance_fault decorator with a recently
introduced expects_func_args decorator so that we make sure this issue
does not go unnoticed in the future.

Closes-bug:#1296593
Change-Id: I140bfec2a52bf659a725a7dbe78ba5c527ed26de
Change HTTPUnprocessableEntity to HTTPBadRequest

Change HTTPUnprocessableEntity to HTTPBadRequest, and use the
parameter 'explanation' in place of'detail' to show the correct
error message.
This patch fixes this bug.

Change-Id: I6dc2cbe29f24634138ba4c5255b0edd7b8ad6b0e
Closes-Bug: #1283876
V2 API: remove unused imports

Remove unused imports in the V2 api

Change-Id: I99bdb8055a84f700be145e7b0fc8df0e7a9f710f
Merge "network_info cache should be cleared before being rescheduled"
Merge "Do not add HPET timer config to non x86 targets"
Revert deprecation warning on Neutron auth.

This reverts the deprecation warning added in commit
e80cf75fc0f25f6279200f59a70fd7c6e4766b0f.

V3 supports domain + project uniqueness, which is much more usable
than ids - massively more so for deployers. The initial patch
deprecates name, when that isn't necessary or appropriate - using name
based auth is as valid as id based auth - we just need to namespace
it in V3.

For V3 operators should be able to create:

* A service domain
* A service/service project
* A service/neutron user

to replace the prior

* service tenant
* neutron user

structure without switching to ids.

Closes-Bug: #1290540
Change-Id: I51837b0dc1bc352c0bf315e383951486b3cac034
Refactors nova.image.glance unit tests for show()

This patches continues a patch series to cleanup and streamline the unit
tests for the nova.image.glance module. Here, we create true unit tests
for the GlanceImageService.show() method, stressing all code paths and
edges but only for that specific method, using mocks and no fake glance
image service.

This patch removes "unit" tests from the TestGlanceImageService that
called glance.GlanceImageService.show(), as those tests used the fake
glance service and the code paths are now more than covered by these new
mock-using tests.

Change-Id: I200a9e9812d6de011fa6faa8fb8dc570075ce902
Related-bug: #1293938
Merge "Instance groups: cleanup"
Merge "Add a decorator decorator that checks func args"
Merge "Rename _post_live_migration instance_ref arg"
Refactors unit tests of image service detail()

We do not need to have "unit" tests that test the things like
pagination work with the glanceclient.images.detail() call. glanceclient
and glance have unit tests for that. What the unit tests for the glance
image service detail() method in Nova need is to test only the code
boundary that exists within the detail() method -- i.e. verify that the
calls to the glanceclient and other helper methods are made with the
right parameters.

This patch pulls the various unit tests out of the
TestGlanceImageService test class and into their own test class that
uses mocks and verifies each code path within the detail() method.

Next up is the create, update and delete methods of the
GlanceImageService class. The final piece is to rework the download unit
tests (which aren't unit tests but more functional tests that take
around a second each to run :(

Change-Id: I94897ff54a36a1af4258ba4a3c88b45c079f4bb5
Related-bug: #1293938
Merge "GlanceImageService static methods to module scope"
Merge "Revert deprecation warning on Neutron auth."