Fix up instance types in sys meta for resizes

This adds code to the resize paths to update the system_metadata
with new (or reverted) flavor information so that resized instances
are consistent with normal ones.

It also stashes the new and old instance_type information in system_metadata
during resize, which allows us to avoid database lookups for type
information at finish, confirm, and revert time.

Related to blueprint no-db-compute

Change-Id: I7f74ef8131be7a60e3a844fdf00fdeb3683f1317
Teach resource tracker about stashed instance types

This removes instance_type-related database queries from the
resource_tracker.

Related to blueprint no-db-compute

Change-Id: Ia5dd407181fa733cc81d3ce03edc1c06c2aae762
Make cells_api fetch stashed instance_type info

Related to blueprint no-db-compute

Change-Id: If87bdd6a29d511117ce5d58057e601a155c64959
Remove remaining instance_types query from compute/manager

Related to blueprint no-db-compute

Change-Id: Ib4bf1731e408821f727f70dcc77b9883504ba960
Added Postgres CI opportunistic test case

Added test case and support functions for CI opportunistic testing
using a PostgreSQL database, as part of our postgresql as a first
class citizen effort.

rebased again on top of test migration with data framework

clean up debug, and ensure pg will fail to connect gracefully

fix previous migration test which was inserting a key by id, which
postgresql doesn't like, as it doesn't adjust the autoincrement
counter.

added driver to connection string for mysql

Updated comment to expose how to do this on pg easily

Fixes:
bug 1084567

Change-Id: If0bfe5cf748f6d5724d17082be6d18b6f96f6ee4
Merge "Merge QuantumLinuxBridgeVIFDriver into LibvirtGenericVIFDriver"
Merge "Merge LibvirtOpenVswitchDriver class into LibvirtGenericVIFDriver"
Merge "Adds evacuate method to compute.api"
Merge "Record instance actions and events"
Merge "VMware VC Compute Driver"
Merge "Fix incorrect device name being raised."
Merge "Fix up instance types in sys meta for resizes"
Merge "Teach resource tracker about stashed instance types"
Merge "Make cells_api fetch stashed instance_type info"
Merge "Remove remaining instance_types query from compute/manager"
Make get_dev_name_for_instance() use stashed instance_type info

Related to blueprint no-db-compute

Change-Id: I6a8e357b69e6cfbdfa5be846b74baf6df3b8eae4
Fix check instance host for instance action

When instance has no host, actions such as get_console_output,
start_stop_instance cause HTTP 500 response. Here change to
HTTPConflict when action called before host set.

Fix LP# 1116012

Change-Id: I6153a03f449d9fad8d0d8fb7295bdea4d2b2c2b1
Use oslo database code

Bring in the new database code from oslo.

Uses get_session() from oslo as well as changing NovaBase to derive from
a common class.

Remove test_sqlalchemy.py now that this code is test in oslo.

Implements blueprint db-common.

Change-Id: I090754981c871250dd981cbbe1a08e7181440120
Sync latest db and importutils from oslo

Changes include:

  7c0e25a Use importutils.try_import() for MySQLdb
  33b12d3 Implement importutils.try_import.
  cf705c5 Make project pyflakes clean.

Change-Id: I448f5208919d06ca0af54d2057b8f5e042862cd6
Allow connecting to self-signed quantum endpoints

Introduce a new option 'quantum_api_insecure', matching the existing
'glance_api_insecure'. It skips the SSL validation in quantumclient.

DocImpact

Change-Id: I275517179929710bedcef5086a040b9396c0e932