Fix error message of os-cells sync_instances api

Because parameters of this api are 'updated_since' , 'project_id'
and 'deleted',add 'deleted' to the message "Only 'updated_since'
and 'project_id' are understood."

Change-Id: Ic2b2314861030b029be5df490e123d8976711193
Closes-Bug: #1237836
Add testr concurrency option for run_tests.sh

By exposing this testr concurrency option, run_tests.sh can now specify
how many processes to run the tests. If not specified, default 0 utilize
maximum CPUs available.

Change-Id: I1a518ae67db32d9838e4a3584cfc3af14212be3c
Ensure migration 209 works with NULL fkey values

Modify the sub-query on migration 209's backup to not select NULL
items which cause the NOT IN to always be false and consequently
the backup not to run resulting in a violation of the foreign keys.

To test, add an instance with NULL uuid to check the backups still
work correctly and avoid violating the foreign key constraint.
If there are NULL values in a NOT IN () set the result is always
false. Therefore having this instance inserted causes migration 209
to fail unless the IN set sub-query is modified appropriately.

Change-Id: Id0f8c8cb082df8861e85f925b979ddd934a95bfc
Closes-Bug: 1240325
Fix tests for migration 227 to check sqlite

The _check_227 test skips for sqlite despite modifying that dialect.
It also has a redundant check for an existing row that doesn't work
when snake-walking the migration tests.

Change-Id: I58d9a539868d50e345a6dfa78918e04a4a699a68
Closes-Bug: 1240751
Add obj_make_compatible()

This adds a method to NovaObject that allows it to convert itself to
and older version, within a compatibility window. So, if an object
had a revision that added or changed the formatting of an attribute,
the obj_make_compatible() method can fix up a primitive representation
before it is sent to a client expecting the older version.

This is primarily intended to be done by conductor when object(s)
are returned from classmethods by potentially-older compute nodes
with older object representations.

Related to blueprint icehouse-objects

Change-Id: I95772e8d3290443c43e57955384ea4fc20b9dcce
Fixing ephemeral disk creation.

The patch addresses 2 scenarios, which occur when
CONF.default_ephemeral_format was provided:

1. Creation of ephemeral block devices would fail,
   due to permission issues, during an attempt to format it without sudo,
   in _create_local.
2. The device/image would be formatted twice, while the final
   filesystem will differ from the one provided in
   CONF.default_ephemeral_format.

This patch will format only once, relying on the changed
disk.mkfs command, that takes CONF.default_ephemeral_format
into consideration.
It will also run the command as root only for block devices,
according to the disk_image is_block_dev property.

Closes-Bug: #1204424
Change-Id: I2bf7abc982e20eaaf7bca7cd798b4134b76d10a8
Make security_group_get() more flexible about joins

This makes security_group_get() more flexible about the column
names it takes as join targets. This will let us pre-load things
on the instances that get fetched out.

Related to blueprint compute-manager-objects

Change-Id: Iadbcb7d469eb55add5ada33580c896c7186c98f0
Fix setting backdoor port in service start

Previously if self.manager wasn't defined for a Service object but a
backdoor_port was specified then that particular service would not
start because it would try to set the backdoor port in an object that
didn't exist. This commit fixes setting the backdoor port only if
manager is defined when calling start().

Closes-Bug: #1243260

Change-Id: Ib0e709cfd0e299a3e010450b7eba6e92bc108e4e
Fix getting nwinfo for Instance obj

This fixes the get_nw_info_for_instance() method in nova/compute/utils.

If an instance object has no 'info_cache' (means we lack an entry in the
instance_info_caches table for the instance), don't try to access the
'network_info' attribute.  Just return a network model with empty
networking information like the dict version of an instance would do.

Change-Id: Ib1f49f10cefeefc55a87fea69b6fbc772c978dca
Closes-bug: 1243291
Reply with a meaningful exception, when libvirt connection is broken.

Libvirt driver will respond with a meaningful error on any
command, when the connection to the libvirt service is broken.

Closes-bug: #1240344
Change-Id: I823fefaffcf969ecf9eb853ac99dc18cef92d137
Merge "Add testr concurrency option for run_tests.sh"
Merge "Reply with a meaningful exception, when libvirt connection is broken."
Merge "Fix getting nwinfo for Instance obj"
Merge "Fixing ephemeral disk creation."
Merge "Make security_group_get() more flexible about joins"
Merge "Ensure migration 209 works with NULL fkey values"
Merge "Fix tests for migration 227 to check sqlite"
Merge "Fix setting backdoor port in service start"
Merge "Fix error message of os-cells sync_instances api"
Merge "Add obj_make_compatible()"