Fixes KeyError: 'sr_uuid' when booting from volume on xenapi

This change fixes the capability for a XenServer/XCP hypervisor
to boot instances from an iscsi volume running on Cinder.

This patch takes into account that Cinder can be configured
with an iscsi back-end, instead of a xensm one, where keys like
sr_uuid are not being specified. It works through the magic of
determining the SR, and the vdi associated with the iscsi target
and lun.

This patch also does a bit of clean-up of code/comments that no
longer apply.

Addresses bug #1087308

Change-Id: Ie7d65eeb965b3468e4407981788725e2b43bff5e
Ensure that sql_dbpool_enable is a boolean value

Fixes bug 1089232

Change-Id: Ida46aaf6b41422590ce1c04a606cd24c70891ed9
Allow xenapi to work with empty image metadata

Also, add a number of tests for unit coverage
of the boot from volume feature.

Fixes bug #1087869

Change-Id: I7160e8c3b3d0ecd55a0ee0a66c512595bc25fb43
Merge "Allow xenapi to work with empty image metadata"
Merge "Fixes KeyError: 'sr_uuid' when booting from volume on xenapi"
Add a developer trap for api samples

This adds a test in test_api_samples to verify that no new extensions
get added to the tree without matching api_samples. Since not all the
extensions currently in the tree have samples, there is an exclusion
list so that this passes now. Extensions should never be added to that
exclusion list, and the list should eventually go away when we get
all of the extensions tested.

Change-Id: I506450d2f3f5a32ff5c653b5940bae6c47790d01
Use testr to run nova unittests.

Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.

run_tests.sh has been updated to run testr instead of nosetests.

Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.

Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.

Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
Retry NBD device allocation.

Mitigates bug 726244.

Change-Id: I2f09f3a69c3eb61ca3af90355d5861373b7ae277
Merge "Use testr to run nova unittests."
Merge "Retry NBD device allocation."
Move security_group operations in VirtAPI to conductor

This patch adds the following methods to conductor's API and
redirects the use of them in nova-compute to conductor:

  security_group_get_by_instance()
  security_group_rule_get_by_security_group()

This involved changing the corresponding VirtAPI methods to
accept actual objects instead of IDs, to avoid introducing
additional DB messaging behavior.

Related to blueprint no-db-compute-manager

Change-Id: I14c2bcd181d0e0a1ec17130917c1a7eb0a091cf2
Move provider_fw_rule_get_all to conductor

This patch moves the compute/manager's use of the
provider_fw_rule_get_all() method to the conductor.

Related to blueprint no-db-compute-manager

Change-Id: I963fc65046d29b6eb92b82d559593a64ff775632
Move agent_build_get_by_triple to conductor

This patch moves the final method in Compute's VirtAPI to using
the conductor.

Related to blueprint no-db-compute-manager

Change-Id: Icaf8990e117c8de7198de2f26f0d77e56c129430
Merge "Ensure that sql_dbpool_enable is a boolean value"