Add boolean convertors for migrate_live API

migrate_live API contains "block_migration" and "disk_over_commit" as
the parameters. They should be boolean.
There are the other boolean parameters such as "on_shared_storage" of
evacuate API, they can be passed with either boolean or string(e.g. "True").
For API consistency, this patch adds boolean convertors to migrate_live
API.

Change-Id: Ic3040811977c834bfd4b0b4527795382e11227ed
Closes-Bug: #1257661
Return client tokens in EC2 DescribeInstances

EC2 instances can be instantiated with a client token, a per-instance
unique token that enforces idempotency for RunInstance calls.
If a client token exists, DescribeInstances will return it wrapped
in <clientToken></clientToken>.

Change-Id: I1deb2c0666d0274ed3c181ecb0e0dc65112605ec
Closes-Bug: #1260853
VMware: clean up unnecessary help message of options

Configuration options were grouped into [vmware]. So we don't need
point out that these options are used only for vmwareapi.VMwareESXDriver
or vmwareapi.VMwareVCDriver. This patch also corrects docstring for
vCenter related classes.

Change-Id: I77d95250ce1351bad60664ec7313d8e18d76332a
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
Adds a PREPARED state after baremetal node power on.

During a baremetal deployment there is a middle step which
is not currently represented. If the baremetal node powers on
but never connects to the deploy-helper, it is impossible to tell
from the database whether the deploy environment was not created
or whether the machine is dead.

Change-Id: I6be3d45fee28970cbb02945c518be34b2bc74689
Closes-Bug: #1184470
Remove unused import

Remove unused import in tools/xenserver/destroy_cached_images.py

Change-Id: I5907c99ff702ebe0fc52e9e95c1b0443e20c5c6f
Closes-Bug: #1265264
Convert nova.compute.manager's _spawn to objects

This means that drivers now receive an instance object for
their spawn call.

Related to blueprint icehouse-objects.
Related to blueprint compute-manager-objects.

Change-Id: If726f19441c33bbc59e8cd116ef983557fae9943
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
Merge "Adds a PREPARED state after baremetal node power on."
Merge "Add boolean convertors for migrate_live API"
Merge "Return client tokens in EC2 DescribeInstances"
Merge "Remove unused import"
Merge "Convert nova.compute.manager's _spawn to objects"
Merge "VMware: clean up unnecessary help message of options"
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"