Fix interprocess locks for run_tests.sh

In recent change of commit 78d62186e5b0388f740d42cb8da5798cd67d7880 tox
test has been switched to use openstack.common.lockutils module for
interprocess locks. However, run_tests.sh is left unchanged, which hit a
regression when running tests with run_tests.sh

This change applies the same change in commit 78d621 for tox.ini to
run_tests.sh, i.e. using openstack.common.lockutils to create temporary
directory for locks and pass it as env variables to all tests.

Closes-Bug: #1264058
Change-Id: I007bd39e4d9aad7539b4b7389eb5189b5d1f10e2
Add unit test for ListOfStrings field in object models

The unit test for ListOfStrings is missing in test_fields.py.

Related to blueprint icehouse-objects.

Change-Id: I731557238f64dd17ab4d7f26300e32bbbec62476
Fix inconsistent "image" value on _get_image()

The type of "image" value is different on showing details of a server,
such as:
1. It's a dict while creating a server from a image
2. It's a empty string while creating a server from a volume

We should modify the type to dict, otherwise someone who call
the api will be confused about the value or can't parse the value
in the same way.

The patch just modifies the v3 api.

Change-Id: I0d7ce59f64adec0933353af58dc5b5170390674b
Closes-Bug: #1262039
Revert change of default FS from ext3 to etx4

Change 2c3bff93269d9d7264e451cb17935313a56a1798  changed the default FS for
ephemeral disks from ext3 to ext4, but this has two problems:

i)  Not all GuestOSs support ext3, so making this change requires a notification period
so that existing images and configurations on running systems can be modified to
still use ext3

ii) Ephemeral backing files use default in their file name as a caching key.  This change
makes  "default"'s meaning is mutable and therefore the naming convention needs to
changed as part of the change to ext4 becoming the default FS.  Without this there will
be inconsistent behaviour between systems depending on whether the backing file
exists or not.

This change reverts the default to ext3 until these issues can be addressed.

Systems that need ext4 can achieve this use the existing configuration options.

Change-Id: I8de225729bbc77b263fcac2fa72b0e9cc6c1b2bf
Compact pre-Icehouse database migrations <= 180.

Compacts the pre-Icehouse database migrations <= 180 into a
single migration (180_havana.py).

Pre-Icehouse users will now need to upgrade to Havana before
running any Icehouse migrations.

Tested on MySQL and PostgreSQL schemas on Fedora 19 to ensure the
new compacted migration generates an identical schema to the
previous migrate scripts in Havana.

Specific changes include:

 1) Add uniq_name_x_deleted, uniq_flavorid_x_deleted constraints.

 2) Add key_pairs_uniq_name_and_user_id constraint.

 3) Add uniq_instance_type_id_x_project_id_x_deleted constraint.

 4) Add uniq_address_x_deleted constraint (floating ips)

 5) Add availability_zone to volume_usage_cache.

 6) Add compute node stats index.

 7) Change cells deleted to int (except for shadow table
   which is handled in 181_fix_179_migration_sync_shadow_table)

Change-Id: I09fdb1a2e509a3d828b83b78d38a484fe405558b
Implements: blueprint compact-havana-db-migrations
VMware: use session.call_method to invoke api's

All api invocations should use session.call_method, which has a
retry mechanism to handle session failures. Few methods in vmops
that are not using this wrapper to invoke api's, fail
intermittently when the session is not authenticated.

This patch fixes those methods. This issue is more pronounced
during VMware CI (Minesweeper), where random tempest tests fail.

The existing tests for vmops and those added for the retrying
session in https://review.openstack.org/#/c/58890/ should cover
this change, as we are re-routing the api invocation.

Closes-Bug: #1260075
Change-Id: I2beb7c92a4c3f53fd2120629e8f72bfd54d13740
xenapi: more info when assert_can_migrate fails

VM.assert_can_migrate can fail for many reasons. This makes it hard to
debug, so lets ensure we report the reason we get back from XenServer in
the exception that gets raised and saved into the instance_fault.

Change-Id: I3deb1169d6fe797ca74cd89061bbcf53d416e8d6
Merge "Revert change of default FS from ext3 to etx4"
Merge "Compact pre-Icehouse database migrations <= 180."
Merge "xenapi: more info when assert_can_migrate fails"
Merge "Fix interprocess locks for run_tests.sh"
Merge "VMware: use session.call_method to invoke api's"
xenapi: add support for vcpu_pin_set

This moves vcpu_pin_set config from the libvirt driver into a place that
can be shared between drivers, nova.virt.cpu

At the same time, the utility function that converts the configuration
value into a list of integers has also been moved into nova.virt.cpu

This new code is then used in the XenAPI driver to apply a CPU mask that
implements the currently configured value for vcpu_pin_set

The main use case for this setting is to ensure all guest VMs are not
using the physical CPUs that Dom0 are configured to use.

DocImpact
Completes blueprint xenapi-vcpu-pin-set
Change-Id: I9d53d93db0c5f2a11ad685d3fc335f0cd6b1f79b
Merge "xenapi: add support for vcpu_pin_set"
Merge "Fix inconsistent "image" value on _get_image()"
Merge "Add unit test for ListOfStrings field in object models"