Return actual availability zones

Report on real availability zones, not a hard coded "nova" zone in
the output of ec2 DescribeAvailabilityZones when the output is
verbose. Resolves bug 1032890.

Change-Id: Ie85cfa1c3638fc490f52f48c8238b3162732647d
Adds integration testing for api samples

We have no validation the the samples at api.openstack.org are
actually correct. This creates a framework to validate the request
and response samples through integration tests.

Adds a bit of stubbing in fake_network to return simple network_info
along with instance records and adds a call in image/fake to get
av valid image.

It will create non-templated versions of the samples when
the tests are running if GENERATE_SAMPLES is set in the environment
when running  nova/tests/integrated/test_api_samples.py

Change-Id: Id134af0b23f0d0932c8789697439ce94bbe2834b
Returns hypervisor_hostname in xml of extension

The extended_server_attributes extension returns hypervisor_hostname
in json output, but it was inadvertently omitted from xml. This makes
the output consistent between the two. Tests included.

Fixes bug 1039276

Change-Id: Ib8cd71cd5bfb65785a02085061fea5e515a0568c
Ensure hairpin_mode is set whenever vifs is added to bridge.

Fix the bug that when create a snapshot of an instance, the
instance cann't ping it's floating ip.
fix bug lp:1040537

Change-Id: I25aa1a323fa84e8c72f969cb56ada4dffa509150
Adding indexes to frequently joined database columns.

Fixes bug 1006624

Change-Id: I0f1f6903a29cb8d3573987b88f62cd895a11c100
Clean up network create exception handling

The NetworkManager code will not raise webob exceptions, so there's no
point in explicitly catching those.

Also, the contrib.networks module is unused in nova-manage.

Change-Id: I5f9fe7fa7f4365f44e7a70b3d9536da8f10b8fa7
Simplify network create logic

The logic to determine default values for num_networks and network_size
is currently overly convoluted. Simplify it in order to make the intent
more clear, without actually changing the behaviour.

Change-Id: Iadb83b1a45aaf52822ee34b972b3f004cef65ef3
Check volume status before detaching.

If the volume is already detached previously, check the volume
status before preforming the detach. Otherwise you get a nasty
traceback because the instance_uuid no longer exists.

Change-Id: I0df4240fb6500d5f99a20d63d82fd258fccdc9fc
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Trap iscsiadm error

If the iscsitarget was previously deleted and the user tries
to delete the iscsi target again, then you get a nasty traceback
in the logfiles.

According to the iscsiadm man page, iscsiadm returns an error 21,
ISCSI_ERR_NO_OBJS_FOUND if there is no records/targets/sessions/portals
found to execute the operation on.

LP: #1011166

Change-Id: I3087c1a114fe91bd7361d92688d4f926bc3f8951
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Remove unused and old methods in hyperv and powervm driver.

fix bug lp:1040758

Change-Id: I0376384a2481e62f55a51e4a877d12c596aadaa1
Make pre block migration create correct disk files.

fix bug lp:1039356

Change-Id: Iede2c6d2ec2b1a68c37d1e8f8735fd2e5d273c67
Merge "Return actual availability zones"
Merge "Adding indexes to frequently joined database columns."
Merge "Adds integration testing for api samples"
Merge "Returns hypervisor_hostname in xml of extension"
Merge "Ensure hairpin_mode is set whenever vifs is added to bridge."
Merge "Clean up network create exception handling"
Merge "Simplify network create logic"
Merge "Check volume status before detaching."
Merge "Trap iscsiadm error"