Add missing conversion specifier to ServiceGroupUnavailable

The message in the ServiceGroupUnavailable exception was missing the 's'
conversion specifier.

Fix bug 1183733

Change-Id: I54869431511a72c49ccf61f5e7b1a30607959423
Normalize path for finding api_samples dir

When nova/tests/integrated and doc/api_samples are installed
in different subtrees and are only combined via symlinks,
running test_api_sample fails due to traversing into the
wrong tree. Use path normalization to avoid this problem.

Fixes: LP Bug #1186775

Change-Id: Ibe9e2442dc9bf3ba7bcb429cbac124dcaeea2cef
Refactors scheduler.chance.select_hosts to raise NoValidHost

This change is intended to refactor the method to be consistent
with the filter_scheduler.select_hosts implementation.

This method is called by scheduler.manager and it is exposed
through the scheduler.rpcapi. Thus, both implementations should
behave the same.

This change is needed by others that will move cold migration
to conductor.

Partially implements bp cold-migrations-to-conductor

Change-Id: I0f6fef43324cf829cdb26633874c537572423f77
Handle security group quota exceeded gracefully

Handle the security group quota exceeded more gracefully so a
traceback is not generated in the log files when this error
occurs. This does not change the API as the HTTP status code
returned remains the same.

Fixes bug 1182859

Change-Id: Id3ac513048751759f01b328482b4f02e26ff66ee
Cleanup nova exception message conversion

Fix cases where setting the explanation for an HTTP exception
based on a Nova exception was done using str(ANovaException)
rather than using ANovaException.format_message()

Change-Id: Ia8a361fcb088dcf3c17be0d296aee494b9f063d7
Fix db.models.Service description

DB models definition should be up-to-date with DB schema obtained after applying of
migrations. Currently, there are no tests enforcing this and it's really hard to
analyze what indexes should be added, and what indexes we have at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

There is no indexes and no unique constraints in this table at this moment.

blueprint db-sync-models-with-migrations

Change-Id: I9b31e8976f514e370d6b46076b469fe5e5c8e0f1
Removed code duplication in conductor.api

Used inheritance to avoid logic duplication in conductor.api classes

Fixes: bug #1188577

Change-Id: Id0bedb974354177dc3c6f6562e836924bcaafb08
Enhance group handling in extract_opts

When there's 2 options with the same name, the script gets confused and
doesn't know in which group it goes. This fixes it, and fixes also the
template generation which is broken for various reasons:

- gettext.install was missing
- nova-rootwrap when imported calls exit() because it doesn't find a valid
  configuration file, so let's exclude it entirely anyway
- eventlet/greendns needs to be ignored for this

Change-Id: Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89
Signed-off-by: Julien Danjou <julien@danjou.info>
Add missing tests for s3_image_* methods

There was no tests in test_db_api for s3_image_*
methods.

Add tests to ensure that all works.

blueprint db-api-tests

Change-Id: I906025f4c5178b26c222fb28d5c3b220e00ae79c
Imported Translations from Transifex

Change-Id: Ifdb8136d1b90f5a2e1d37067fd33f75f2042f81f
Fix dangling LUN issue under load with multipath

This fixes an issue where not all of the LUNs are seen
by the kernel at attach time, but later become available.
We now rescan the list of devices seen by multipath at
detach time.

Also added another unit test case.

Fixes Bug: #1175366

Change-Id: Id5b313b17454ec32672373b7b564b9450466b7a2
Merge "Add missing conversion specifier to ServiceGroupUnavailable"
Merge "Enhance group handling in extract_opts"
Merge "Removed code duplication in conductor.api"
DB migration to the new BDM data format

This patch migrates the DB to the new data format. In addition it also
utilizes routines introduced in the change
I9370333059b8c9aaf92010470b8475a913d329b2 in a way that will allow us
to transition into using the new data in Nova logic one step at a time.

This is accomplished in a following manner in the DB/conductor layer,
which is supposed to allow for subsequent changes to be as granular as
possible:

* Read operations - data is always read as is found in the DB - meaning
in the new format, and transformed after every call. This will allow us
to make granular changes in the API/Compute layers.

* Data is converted inside the DB methods that do writes, and an
additional 'legacy' flag is added (set to True by default). It is up to
the calling method to make sure it supplies the DB layer with the format
it is intending to write, to avoid guessing.

An exception to the above is when using conductor due to rpcapi
versioning, so this patch adds a 'legacy' flag to the
block_device_mapping_get_all_by_instance conductor method and bumps the
version of the API.

This patch also fixes some of the block device fixtures in tests, when it was
required to be aware of the new data structure (mostly when mocking DB
methods that return the new data format).

This patch is not supposed to provide any new functionality to Nova.

blueprint: improve-block-device-handling

Change-Id: If30afdb59d4c4268b97d3d10270df2cc729a0c4c
Create an image BDM for every instance

This patch makes every boot create a block device mapping if the
instance was started with an image.

These block devices are not used anywhere at the moment but will be used
in the future as part of a more flexible block device API.

This patch also makes sure they are deleted once the instance is deleted
as well.

Change-Id: Ia89d531be71c460f1f82fcfce34b270639a23061
blueprint: improve-block-device-handling
Merge "Fix dangling LUN issue under load with multipath"
Merge "Fix db.models.Service description"
Merge "Refactors scheduler.chance.select_hosts to raise NoValidHost"
Merge "DB migration to the new BDM data format"