Split and fix availability zone filter unit tests

The availability zone filter unit tests were broken, but the problem
with them was being masked due to aggregate fixtures that were created
in tests that happened to be alphabetically ordered right before them.
This patch splits out these unit tests into their own file and mocks out
the appropriate call to nova.db.aggregate_metadata_get_by_host() instead
of relying on database records.

Change-Id: Ic692d3e7c77047ae6d901b955bc504fdc5e73738
Split and fix the type filters unit tests

The unit test for TypeAffinityFilter was broken -- it was passing in the
instance_type['name'] key, when the filter class actually checks the
'id' key of the instance_type property of the filter_properties dict. :(

This corrects the tests, removes all DB accesses from both the type and
aggregate type affinity filter unit tests, and splits them out into
their own test file.

Change-Id: I5fc27c538cc419b4ed972839751e0e779151fc58
Split out num instances filter unit tests

Break out the unit tests for num instances filters from
test_host_filters.py into its own file. In the process, we mock out the
database calls for getting aggregate information instead of creating
database records.

Change-Id: I71516cee8b1660e8e8f76eae4ae831b34232289e
Split out IO Ops filter unit tests

Break out the unit tests for IO Ops filters from test_host_filters.py
into its own file. In the process, we mock out the database calls for
getting aggregate information instead of creating database records.

Change-Id: I8395ba7c09ca5c85ecd94d2cc670f3cd0880a373
Split out core filter unit tests

Break out the unit tests for core filters from test_host_filters.py
into its own file. In the process, we mock out the database calls for
getting aggregate information instead of creating database records.

Change-Id: I9c602b9832632ad84b4b0941c5254a283d278b69
Split out aggregate disk filter unit tests

The aggregate disk filter unit tests remained in test_host_filters.py,
and this patch moves them to the test_disk_filters.py file. This was the
last occurrence of aggregate database calls from test_host_filters.py.

Change-Id: Ic47c41474dce8bf3936910be5feee081445193de
Update hooks from oslo-incubator copy

Collapse identical methods for pre/post into one method. Copy
over documentation as well. We are getting rid of oslo-incubator's
copy of hooks.py in the following change id, so from now on
nova has the only copy of this module

If55b37ccb20d9bc520909490f4f00de4ed430638

Change-Id: Ie43913fc847ee7ce247862f53c14a2daec433224
Split out compute filters unit tests

It's a terribly-named filter, the ComputeFilter, since it does nothing
other than inspect the service disabled field and the servicegroup API.
Regardless, we move these unit tests out into their own file.

Change-Id: I8655634f947c68b0a26eae40f8357137138a900a
Splits out retry filter unit tests

Breaks out the retry filter unit tests from the test_host_filters.py
file into their own test file.

Change-Id: I2e7e81bd374048d22e19b45d3d43e7762fe82332
Split out metrics filter unit tests

Breaks out the metrics filter unit tests from test_host_filters.py

Change-Id: I6b170c3bdc0b91b8b1d590a404db5cb3f460e6a8
Move group affinity filters tests to own test file

The group affinity filter unit tests remained in the
test_host_filters.py test file. We simply move them to
test_affinity_filters.py in this patch.

Change-Id: Ic10a5ba2875de42f1f83d30e6d9bd982dffc17e4
Make test_host_filters a NoDBTestCase

This is the final patch in the refactoring series. This changes the
test_host_filters.py file to contain just the test of the filter handler
system and cleans up the previously database-creating TestHostFilters
class.

The entire set of host filter unit tests (around 350 of them) now run in
less than 2 seconds, down from over a 45 seconds on my workstation.

Change-Id: I2f2518a08ac3f8c6addcd4055ee4c706c4c92e8e
Merge "Drop python26 support for Kilo nova"
Merge "Use assertRaisesRegexp"
Merge "Use py27 version of assertRaisesRegexp"
Add API validation schema for disk_config

This patch adds API validation schema for disk_config.

This patch also modify TestServersExtensionSchema to load
disk_config extension so that update, rebuild & resize
extension schema loading can be verified.

Partially implements blueprint v2-on-v3-api

Change-Id: Ib687a8e4e8b173c32bcd19e396b23fbf2f3319c6
Merge "Switch Nova to use oslo.concurrency"
Remove admin context which is not needed.

_get_guest_config use admin context to read deleted flavor, it's
not needed because flavor function in db layer didn't require that.

Change-Id: Idbf6a7d712d432da5a5919c28e988870ead0d4b2
Merge "xenapi: upload/download params consistency change"
Merge "DB API: Pass columns_to_join to instance_get_active_by_window_joined"