Sync db.models.Security* and db.models.Volume*.

This patch syncs models with migrations.

Change-Id: I2e4a4cf28376d933be47bc496933e6964e19a56e
Clarify flavorid vs instance_type_id in db

And add comment about future direction.

Partially implements bp flavor-instance-type-dedup

Change-Id: Ia6c1bad5c3cc35e772c32803c27a50a7728045e5
Sync 10 DB models and migrations.

This patch syncs models with migrations for:
- BlockDeviceMapping
- IscsiTarget
- FixedIp
- FloatingIp
- KeyPair
- Migration
- Network
- ProviderFirewallRule
- Reservation
- S3Image

Blueprint: db-sync-models-with-migrations

Change-Id: I8e16375fe48744513167272e956cdbfdbfd8af23
Remove project_id from alternate image link path

Removes the project id from the alternate link path
generated for the v3 API os-images extension.

Also fixes issue with os.path.join being used to generate
urls which will break on Windows.

Partially implements blueprint nova-v3-api

Change-Id: Icc34359cc935920e2d4780849d9310c4961c8f74
Missed message -> msg_fmt conversion

We recently changed NovaException's to define `msg_fmt` instead of `message`
on the class. Looks like this exception was missed for some reason.

Fixes bug 1202255

Change-Id: If828bf42fa077665d1d92e08758fbddd342ab626
Fix inconsistency between Nova-Net and Neutron

The neutron client raises NeutronClientException (status_code 404)
that is not unknown for nova, and is translated in 500 computeFault.
Catching this exception in nova/nova/network/neutronv2/api.py and
raising more generic exception as exception.NotFound solves the problem.

Added also an unitary test to test neutronv2 api

bug #1160309
bug #1200175

Change-Id: Ib2f1a0d49a12114b28f0cd5ce0bb7119f864d1a6
Fix DB access when refreshing the network cache.

When calling ComputeManager.attach_interface(), the following happens:

1) self.network_api.allocate_port_for_instance() is called from within
   ComputeManager.attach_interface();
2) refresh_cache() is called, since it decorates allocate_port_for_instance();
3) refresh_cache calls update_instance_cache_with_nw_info(), with
   "conductor_api=None" since 'conductor_api' cannot be found in the kwargs;
4) update_instance_cache_with_nw_info() calls
   api.db.instance_info_cache_update();
5) Since the call to the database should be made through the conductor, a
   DBNotAllowed exception is raised, which prevents the cache from being updated.

This patch fixes the call to allocate_port_for_instance (step 1) so that
'conductor_api' can be found in the kwargs (step 3).

When using ComputeManager.detach_interface, the exact same problem arises (with
deallocate_port_for_instance instead of allocate_port_for_instance).

This is a first step towards fixing bug #1197192.

Change-Id: I647795907b22790759d3be74afcaf70b712cb338
Sync gettextutils from oslo

Bring in some needed extra code for handling Nova translations

Partially implements bp user-locale-api

Change-Id: Id66010eacb24c86e32f5455c5d869f9f037cff23
Add indexes to sqlite

Migration `133_folsom.py` do not create indexes for sqlite.
Added missed indexes with tests.

Fixes bug 1191838

Change-Id: I018e29ba46f2017241c13742169896625944194e
Sync sample config file generator with Oslo

The sample generator tool in Oslo is located in tools/config therefore
this patch moves the files in tools/conf to tools/config. The reason
Oslo chose 'config' is because the generator.py module is located in
the openstack.common.config package and update.py looks for the
corresponding directory in tools when it syncs the 'config' package.

./update.sh --module config --base nova --dest-dir $NOVA_HOME --nodep

Since every thing moved to tools/config, changes had to happen on
the tox.ini file and check_update.sh

Change-Id: Icbd467888cc7f16fa3694ed2b93548d0285461b5
Merge "Fix inconsistency between Nova-Net and Neutron"
Merge "Missed message -> msg_fmt conversion"
Cell Scheduler support for hypervisor versions

Adding the hypervisor version to cell capacities
Creating a filter in cell scheduler to filter cells based on
prominent hypervisor version

Partially Implements blueprint xen-support-for-hypervisor-versions

DocImpact: Adding a filter in cell scheduler to pick cells based on
the hypervisor version required by the image. The image can have
metadata called hypervisor_version_requires which will be matched
against the cell's prominent hypervisor version.
The prominent_hypervisor_version is stored in nova.conf under cell
capabilities.

Change-Id: Ied716a5964fd86a919ffb8bac99100afb770896e
Merge "Add indexes to sqlite"
Merge "Sync gettextutils from oslo"
Merge "Cell Scheduler support for hypervisor versions"
Merge "Remove project_id from alternate image link path"
Remove instance_metadata_get_all* from db api

The following calls are no longer called by nova.compute.api and should
be removed along with their associated tests:

db.api.instance_metadata_get_all
db.api.sqlalchemy.instance_metadata_get_all
db.api.sqlalchemy._instance_metadata_get_all_query

Change-Id: Id02786127ee35124e58425c699e5d3e84f42f527
Merge "Fix DB access when refreshing the network cache."
Merge "Clarify flavorid vs instance_type_id in db"