Fix testContextClaimWithException

It was using Exception as a test exception, which unfortunately hid
a TypeError exception being generated by incorrect arguments to
self.tracker.resource_claim().

This is a good example of why Exception shouldn't be used as a testing
exception.

Change-Id: I6c70f15ebe79c467f035725ca17b270c36273ab3
Fix live migration when volumes are attached

There was some safety code in live-migration to make sure volumes
were exported before trying to live-migrate volumes. This code is
broken with cinder as it doesn't expose a way to do this. Since the
code was basically just a safety measure, this just deletes it so
live migration works again.

Fixes bug 1050421

Change-Id: I3ecd58dc2c37eab30ebfa04140475a9198aede67
Fixes to the SolarisISCSI Driver

Even when the san_is_local config option was set to false, the
SolarisISCSIDriver's _execute method was accidentally set to
util.execute by the VolumeDriver's __init__ method.

Fix bug 1053041

Change-Id: Ifd8436874759d75633da3dbbfa01bd99f979ddea
Add lun number (0) to model_update in HpSanDriver

The HpSanDriver was not setting the lun number in model_update
and as a result default value of 1 was being used.  Trouble is the
Lun number used by LeftHand is 0, so the connect info would be
wrong and fail when trying to attach the volume.

Fixes bug #1053717

Change-Id: I2391db062dff35365030e33c3eb0569fdd397949
Imported Translations from Transifex

Change-Id: Ib9c73197069b55d53df762d3b70918d8477f1dbb
Cleanup exception handling

Make sure stack traces are not cut short. Make sure there's only one
exception handler per function (otherwise new exception covers the old one).
Fixes bug 1053421

Change-Id: Id1ff84a5ba3eaeef6385b311773bde784672e1f9
Ensure hybrid driver creates veth pair only once.

Fixes bug 1053312

This commit fixes a bug that an instance can't obtain IP address by DHCP
when using LibvirtHybridOVSBridgeDriver. When nova-compute launches an
instance on KVM, vif driver plug() may be called twice and this causes
a behavior that a port of OVS cannot seen as a bridge port. So this patch
make sure create_veth_pair() is not called if a port already exists.

Change-Id: I76792df9f0dd28224d7d57989bf1e8ecadb92606
Merge "Add lun number (0) to model_update in HpSanDriver"
Update volume detach smoke test to check status.

Updates test_007_me_can_detach_volume so that it waits for
the volume status to become active for up to 10 seconds
after initiating the command to detach the volume.

Previously it just waited for 5 seconds without checking the
status which can be problematic in that it causes the
subsequent test to delete the volume to fail intermittently
(because only active or error volumes can be deleted).

I noticed this in SmokeStack because 2 days ago this commit landed:

b46f224f7555e3065b0daacd101b65d86117f0c1

and it is now causing a fair amount of intermittent volume
tests to fail for Nova and Cinder. Apparently now that we
have ordered the commands to remove an iscsi target properly
it takes a bit longer...

Change-Id: Ibfd25af93f9cb063a76a04138b8d23d28a01b89a
Merge "Fixes to the SolarisISCSI Driver"
Set volume status to error if scheduling fails.

Fix bug 1053931.

When scheduling volume creation fails, the volume was left with a status
of 'creating'.  This patch changes the scheduler manager to set the
status to 'error' if scheduling fails.  This matches the behavior of the
cinder scheduler manager in this case.

This particular issue was addressed in Cinder as a part of commit
f758bde47439be52a743b2b4181d4900f2c1bc8a.

Change-Id: Ieb453ab05b3b84de53f72323c536a9567555df1e
Merge "Update volume detach smoke test to check status."
Merge "Fix live migration when volumes are attached"
Merge "Ensure hybrid driver creates veth pair only once."
Merge "Cleanup exception handling"
Merge "Fix testContextClaimWithException"
Merge "Set volume status to error if scheduling fails."
Imported Translations from Transifex

Change-Id: I8aadce453d14aee0c8eb4d2bee47f68e39b1d8c1
Move fakeldap.py from auth dir to tests.

Also removes the auth  dir from nova.
fix bug lp:1054848

Change-Id: I9c2710c9789ff8413bc80044eba94f3a851d8544
Fixes snapshotting of instances booted from volume

When an instance was booted from a volume, the block device mapping
entry has volume_id set. If it was booted from a snapshot it has
volume_id and snapshot_id set. When we snapshot the instance, it
should be snapshotting the volume in both cases.

This patch fixes the faulty logic that was causing snapshotting to
only happen in the case the instance was booted from a snapshot.

It also includes a (formerly failing) test to verify that the volume
commands are actually called and the new snapshot is set properly.

Fixes bug 1055076

Change-Id: Icdd2ab7f3e2d43a0564aea132fe707a592fe4e75