Sync db.models.Instance* with migrations.

This patch syncs models with migrations for:
    - InstanceIdMapping
    - InstanceMetadata
    - InstanceSystemMetadata
    - InstanceTypeExtraSpecs
    - InstanceTypeProjects
    - InstanceTypes
    - InstanceGroupMember
    - InstanceGroupPolicy
    - InstanceGroupMetadata

Blueprint: db-sync-models-with-migrations

Change-Id: Ice28b9d545f60f7df381e3fcf2c86a2b8e7350d3
Add expected_errors for extension deferred_delete v3

Partially implements bp v3-api-extension-versioning

Change-Id: Ia63f6cd947c20a05e84385f2401d6b869ebeb456
Remove locals() from various places.

fixes bug 1171936

Remove usage of locals() for string formatting

Change-Id: Ib05538095086ddefdb486c84da506af662ec5c9b
Add missing tests for console_* methods.

There was no tests in test_db_api for console_* methods.
Add tests to ensure that all works.

blueprint db-api-tests

Change-Id: Ic3d5a3dd60ba50b561126279c00ca07022aaa20e
ec2-api: Disable describing of instances using deleted tags as filter.

Previously, one could describe instances using a deleted tag filter
that was once associated to the instance. The current change disables
describing instances via a deleted tag. Also,minor refactor in the
same function.

fixes bug #1197242

Change-Id: Iac6aa85b69d5a6dc563c00f3497cdab08e178ec1
Send updated aggregate to compute on add/rm host

The XenAPI driver relies on getting an up-to-date version of the
aggregate during add_host_to_aggregate and remove_host_from_aggregate
This change ensures that happens.

Fixes bug 1161619
Change-Id: I764e1fc3b9ff20b6eda8f6ec00849f2164de0a49
Add ability to factor in per-instance overheads

Currently free memory calculations in the compute layer use a single
value to account for all memory overhead needed by a host.  This value
is: CONF.reserved_host_memory_mb

This patch adds the ability to factor in per-instance virtualization
overheads into usage calculations.  Virtualization overhead may differ
based on the flavor or other factors such as number of vcpus on a host.
This feature's goal is to provide the ability to do more accurate
computations of a host's overhead without having to pre-configure a
best guess in advance.

The actual calculation of overhead is left up to each virt driver to
implement.  This patch defaults to zero overhead for compatibility.

Change-Id: I4febfa2c837e0f80cee85ca74553829c960a3efc
Handle instance objects in conductor compute_stop

The compute manager is sending instance objects to
compute_stop in conductor but conductor's compute_stop
RPC proxy wasn't handling objects. This patch fixes that
and also handles compatibility with older installations
using the dict-style format in the conductor compute_stop
RPC proxy.

Fixes bug 1195849

Change-Id: Ib678df424a58a0d7023ce3b2bdd5001998daf398
Ensure dates are dates, not strings

In DB API we have a check which removes tzdata from dates, however
in some cases these dates are strings rather than datetime objects.
This will detect and correct these instances.

Fixes bug 1203069

Change-Id: I8ca955f6eb11e4b955ece9ec0822cda000b38f20
Merge "Send updated aggregate to compute on add/rm host"
Merge "Remove locals() from various places."
Merge "Ensure dates are dates, not strings"
Merge "Handle instance objects in conductor compute_stop"
Merge "Add missing tests for console_* methods."
Correct the action name for admin_actions API v3

Partially implements bp v3-api-extension-versioning

DocImpact

Change-Id: Idf92a043e8451626a62a651aa532c9ba1e614057
Merge "Add ability to factor in per-instance overheads"
Merge "ec2-api: Disable describing of instances using deleted tags as filter."
Merge "Correct the action name for admin_actions API v3"
Merge "Add expected_errors for extension deferred_delete v3"
Merge "Sync db.models.Instance* with migrations."