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
Code dedup in test_libvirt_volume

- externed common assertions to methods
- externed common parts to setUp():
  - test disk info
  - test connector
  - test volume name, location, iqn, data, uuid
  - test user
  - test fake connection

bp nova-tests-code-duplication

Change-Id: I83bfd8b597121c9de091283845b841680e150e76
Code dedup in class ImageXMLSerializationTest

Externed common parts to setUp():
- fixture with test image data
- test image
- dictionary with test images
- test serializer
These parts were equal in the most part of the methods.

bp nova-tests-code-duplication

Change-Id: I8394c7ccbd0d71ffcf5f35c64a5c307dbf579364
Fixes wrong action comment 'lock' to 'unlock'

Change-Id: I2f285b405b598d69f80504b040b4a0e32d80020b
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
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
Create vmware section

Implements blueprint vmware-configuration-section

VMware specific parameters will be moved to a new section. The
change is backward compatible and supports existing
configurations.

DocImpact

Change-Id: Ic9b425a3d9ea2b614643ba8d3db50b065947c806
Allow exceptions to propagate through stevedore map

Allow exceptions to propagate up through the stevedore map
function used by the V3 API servers core extension. This allows
for functionality such as extension specific parsing of client
supplied data formerly required to be handled by the core API to
be handled by the extension itself instead.

This functionality requires stevedore 0.10 or later

Partially implements blueprint nova-v3-api

Change-Id: Ib848147225707f1c7eda27b1ba796022161ba20f
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 "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"
Merge "Sync 10 DB models and migrations."
Merge "Sync db.models.Security* and db.models.Volume*."
Add unique constraint to InstanceTypeExtraSpecs.

Added unique constraint
'uniq_instance_type_extra_specs0instance_type_id0key0deleted'
('instance_type_id', 'key', 'deleted')
to InstanceTypeExtraSpecs model and migrate
scripts.

Exception from UC violation used in method
flavor_extra_specs_update_or_create()
for race condition check.
Get-update-create procedure will be restarted
in case race condition.

blueprint db-enforce-unique-keys

Change-Id: Ie91c6fc19ca01526b5f48f85cbb63a6842f9c890
Merge "Allow exceptions to propagate through stevedore map"