Add API schema for aggregates set_metadata API

This patch adds API schema for aggregates set_metadata API.

Partially implements blueprint v2-on-v3-api

Change-Id: I2d1e454f87870554cdeff50cc2de522c34fe81d4
Remove deprecated affinity filters

Remove affinity filters that were previously deprecated. Filters
originally deprecated in 2bca0c9011d9868aff3e80f4f6f432d29f07adf6

Change-Id: I5f642988dbd35e02e13dd13c69c6625cf9b07237
Use opportunistic approach for migration testing

Refactored migration tests to use OpportunisticTestCase, removed
unused code, BaseMigrationTestCase class and ``test_migrations.conf`` file.

The main feature of this approach is to create a new database with
random name for each migration test. This will avoid migration tests of
race conditions and reduce tests intersection. After this change,
``openstack_citest`` user credentials will be used only for initial connection
to the database.  TestMigrationUtils class was refactored also, because
BaseMigrationTestCase was removed.

Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>

Change-Id: I5c9aaa56e5041b919b1e96a19e0395c5e03b727a
Updated from global requirements

Change-Id: Iafc853662d0ab6642f5468bd2cdba1eb86f808a5
Convert hardware.VirtCPUTopology to nova object

All objects that have data that may eventually be serialized across the
wire in RPC comms, stored in a database, or potentially change their
schema, should be nova.objects. This patch changes the staticmethods on
the nova.virt.hardware.VirtCPUTopology class to a collection of private
(and one public) regular functions in nova.virt.hardware that consume and
produce nova.objects.virt_cpu_topology.VirtCPUTopology objects.

Change-Id: I2244aa7125b11568bc04d35e5de3eb2ee8c15167
Make notify_usage_exists() take an Instance object

This makes the notify_usage_exists() method for conductor take an
Instance object instead of a dict primitive.

Related to blueprint kilo-objects

Change-Id: I932c46e20f1d203f9587a39381563d58a10a3485
objects: remove VirtPageSize from hardware.py

In part of the objectification of hardward.py, this change
remove VirtPageSize which only handle an integer.

Change-Id: I4a02da4741759623b73d98402bf22d28e9c943d3
Make Instance.save() update numa_topology

This is needed so that we can actually update the given topology with
the updated data after a successful claim.

Deleting it will also be needed when we actually make the resize work
properly for instances with NUMA topology, so we add it here as well.

We do not expose the new InstanceNUMATopology methods as @remotable to
avoid having to bump the object version thus making this an easier
backport target. This is OK since they are only called from
Instance.save() which is @remotable, and can be trivially made remotable
should this be needed later (causing a version bump that need not be
backported).

Change-Id: I64ff2d00ca20bd065bb17ebaa9c40b64b8cbb817
Partial-bug: #1386236
Instances with NUMA will be packed onto hosts

This patch makes the NUMATopologyFilter and instance claims on the
compute host use instance fitting logic to allow for actually packing
instances onto NUMA capable hosts.

This also means that the NUMA placement that is calculated during a
successfull claim will need to be updated in the database to reflect the
host NUMA cell ids the instance cells will be pinned to.

Using fit_instance_to_host() to decide weather an instance can land
on a host makes the NUMATopologyFilter code cleaner as it now fully
re-uses all the logic in VirtNUMAHostTopology and
VirtNUMATopologyCellUsage classes.

Change-Id: Ieabafea73b4d566f4194ca60be38b6415d8a8f3d
Closes-bug: #1386236
Remove VirtNUMAHostTopology.claim_test() method

Previous patches in this series remove the need for this method, so this
patch removes it.

We also remove the can_fit_instances() method which is now part of the
get_fitting_for_instance().

Change-Id: Ieb285bd7e06ea5c5bfc429ccad856272e147f885
Switch to oslo.config fixture

The fixture from oslo-incubator has moved to oslo.config,
we need to use this from now on. The copy of the fixture
in nova/openstack/common/* will be removed in a subsequent
review in this series.

Change-Id: I2d91db8c1535ca60f59f9d55c9d19de3e84dc40b
Add obj_set_defaults() to NovaObject

This provides a way to set the default values on fields that have them.
Previously, defaults were only set on nullable fields when set to None,
which wasn't universally-useful.

Related to blueprint kilo-objects

Change-Id: Ie646c0363d4af22ec8a588a6a1567c30bab99ebb
Merge "Updated from global requirements"
Merge "Use opportunistic approach for migration testing"
Merge "Make notify_usage_exists() take an Instance object"
Merge "Convert hardware.VirtCPUTopology to nova object"
Merge "Add obj_set_defaults() to NovaObject"
Merge "Switch to oslo.config fixture"
Merge "Add API schema for aggregates set_metadata API"
Merge "Remove deprecated affinity filters"