xenapi: Make _connect_volume exc handler eventlet safe

`forget_sr` blocks and so clears the exception state causing the
subsequent raise to try to raise `None`, which fails.

Fixes bug 1167515

Change-Id: I18562c7389b152a6490d352c5a8d36934288f47d
Fix bug in os-availability-zone extension.

Fixes bug 1167956.
The call to get the list of availability zones (GET V2/os-availability-zone)
doesn't hide internal availability zone if all services in that zone are
disabled.

Change-Id: I2c49ad68c2ee5ddea0536dfa770f649fbb392b63
Remove orphaned db method instance_test_and_set

Commit 86544fad81f95b74407a76bea8b081f490e2832f removed the only use
of this method together with the sqlalchemy implementation of it but
forgot to remove it from db.api.

Change-Id: I751f99ee64cdeab56f1f3fd9f846157f241804a2
Merge "xenapi: Make _connect_volume exc handler eventlet safe"
Added comments to quantum api client

Added a few comments for bug 1020184

Change-Id: I6bc59b5b8b57685aae461e5b1111d8dbd168123d
removing unused variable from a test

Change-Id: I4b5613ae756bac794f82dec4abfa1361efac4054
Merge "Fix bug in os-availability-zone extension."
Merge "Added comments to quantum api client"
Merge "Remove orphaned db method instance_test_and_set"
Merge "removing unused variable from a test"
Imported Translations from Transifex

Change-Id: Ib960a546f1d7acff887f89410558e49d67b9ae26
Remove unused exception and variable from scheduler.

There are no cost functions, so there is no cache and no Exception to be
raised.

Change-Id: I4a67bd45e3f0c91e5507ed3794dc20b13292596b
Don't swallow PolicyNotAuthorized for resize/reboot actions

Removes 'except Exception' lines in the api which were preventing
PolicyNotAuthorized exceptions from bubbling up and returning 403 to the
caller.  This addresses policy exceptions in confirmResize,
revertResize, and reboot.

The try block calls into the compute api which sends a cast to perform
to bulk of the work, so there is little chance of an exception bubbling
up which is not already being caught.

Removes a unit test for a condition that should not exist.

Bug 1170453

Change-Id: I516a19894ab3d183057c774e84c4faa7053a6463
Imported Translations from Transifex

Change-Id: Ie208685045a154bc4f27706ae0c27d5de155a108
Merge "Don't swallow PolicyNotAuthorized for resize/reboot actions"
Improve EC2 error response code.

Redundant logging code was united in new _ec2_error() helper function and all
EC2 error responses are now uniformly logged on DEBUG log level because they
are just responses to invalid client requests, not nova errors.

Proper EC2 error codes are returned where possible.

Excpetion name is used as EC2 error code instead of cryptic UnknownError in
case of unexpected error.

EC2 API specific exceptions should have EC2 suffix and contain _ (underscores)
instead of . (dots) for automatic translation which is done by new
exception_to_ec2code() function. InvalidInstanceIDMalformed was renamed to
InvalidInstanceID_MalformedEC2 in this manner.

This is a first step towards compliant or at least meaningful EC2 error codes.
Next, EC2APIError must be replaced by proper EC2 or OpenStack exceptions.

Implements blueprint ec2-error-codes

Change-Id: Ic9e845bd6d3d4d400119828ae6b9c8deedaa3dd6