get_instance_security_groups() fails if no name on security group

The following patch fixes a bug in get_instance_security_groups() where
it tries to access security_groups['id'] but security_groups is a string.
This patch also removes some stubs that were not needed in a few unit test.

Fixes bug 1182738

Change-Id: Ia64db2e40d4a0e163344b4234112dbde71b1e132
Remove locals() usage from nova.virt.libvirt.utils.

Change-Id: Id5ca94f333de3fb4d8611d08afa75318ce65e3b5
Fix tests for sqlalchemy utils

This fix tests to be able to run it with postgresql and mysql.

Some tests should be run only on sqlite

Method create_shadow_tables raises different exception in different
backends (when we try to create duplicate table):
In postgresql it is ProgrammingError
In sqlite and mysql it is OperationalError
So create new Exception that will be raised in both cases.

bp db-common-migration-and-utils

Change-Id: I11be23106bc01bd3c72dad30edfb31a17177bb34
Change db `deleted` column type utils

Move and refactor methods from 152_migration that allows us to change
type of deleted column to type of id.

There are 2 methods:

utils.change_deleted_column_type_to_id_type() method
This method change type of `deleted` column from Boolean to
type of `id`. This method allows us to do it in generic way
for all backends. It fix problem with sqlite, that doesn't
allow any operation with columns that have CheckConstraints.
And columns with Boolean type have CheckConstraints
(value in (0, 1)). So for sqlite it works through shadow tables.
For others dbs it works though alter table.

utils.change_deleted_column_type_to_boolean_type() methods
This method allows us to revert result of previous method.
Useful for downgrade.

In global these methods could be very useful in olso for other
projects. This is a first step that allows us to create unique
constraints when we are using soft delete.
(Create UC on (column, deleted))

Also it will be useful in nova to remove copy past from 179
migration. Add new migration that will fix also shadow_cells table.
And also there are baremetal tables that should be also migrated.

blueprint db-common-migration-and-utils

Change-Id: Ie14351c52eb50182e6460c97e257395ce2adb8b0
Sync shadow table for 175 and 176 migration

To be able to use db archiving our table and shadow table should
have the same columns.

fixes bug 1176443

Change-Id: I461a6d0e3661e2b60c266dffff38e3317784c113
Remove copy paste from 179 migration

We have utils to change type of deleted column.
So just remove copy paste.

Approach is the same, and code is almost the same, so it
is safe to change old migration.

Change-Id: I5422b484c1270468c5dec0395466a0691acb772f
Sync shadow table for 179 migration

To be able to use db archiving our table and shadow table should
have the same columns.

fixes bug 1179497

Change-Id: I001f31a5efa07c80acd1ad513369456fb8c3cb44
Removed superflous eval usage.

It was being used as a hex string parser, which is not necessary given
that the int builtin can do this.

Change-Id: I710093fc83c175ac08d827bb93ba878703ee817a
Set up 'compute_task' conductor namespace.

This patch sets up a new API to be exposed by the nova-conductor
service.  The existing methods exposed by conductor are all proxy
operations on behalf of compute nodes.

For Havana, we have plans to add methods that go the other direction.
Operations initiated by the API will be processed by the conductor,
which will include telling one or more compute nodes what to do.  By
putting all operations of this form in their own API, it will keep
things a bit more clearly separated.

Change-Id: Ifa3d443b9bd7f406a7a3bd837351bc689bf2b6c8
Merge "Fix tests for sqlalchemy utils"
Merge "Change db `deleted` column type utils"
removes project_id/tenant_id from v3 api urls

Adds a new APIMapper for V3 that doesn't prefix every
url with the project_id/tenant_id.

Partially implements blueprint v3-api-remove-project-id.

Change-Id: I547a94e2db0dd967852b3cb8532dd0adb11e693b
Merge "Sync shadow table for 175 and 176 migration"
Merge "Remove copy paste from 179 migration"
Merge "Sync shadow table for 179 migration"
Merge "Remove locals() usage from nova.virt.libvirt.utils."
Merge "Removed superflous eval usage."
Merge "removes project_id/tenant_id from v3 api urls"
Merge "get_instance_security_groups() fails if no name on security group"
BDM class and transformation functions

This patch adds the utility functions that will help us switch
between versions of block device mapping data.

In order to accomplish this, and to have a more structured approach to
dealing with block device mapping data in the future, this patch
introduces a BlockDeviceDict class which is a thin wrapper around a
standard dict that makes it easier to reason about which fields are
present in the dictionary, and introduces said conversion routines.

blueprint: improve-block-device-handling

Change-Id: I9370333059b8c9aaf92010470b8475a913d329b2