GlusterFS: Synchronize operations that manipulate qcow2 data

Operations that modify qcow2 chains or the GlusterFS driver's
snapshot info file should use locking so that more than one thread
cannot run these operations at the same time.

Without this it is possible for multiple threads to concurrently
modify snapshot information resulting in an incomplete snapshot
chain.

Closes-Bug: #1251425

Change-Id: I93c6ffecd9aec38560cb19085243390b9120b363
Add valid check and unit tests on quota class

1.Cinder quota class hard_limit’s value should larger than -1 (-1 is a flag
value for unlimited).
2.Add unit tests for quota class.

Closes-bug: #1245360

Change-Id: Ie483db1bdbd4fac875de26abab8ebebd96f4938b
Create snapshot throws 500 Internal Error

The server doesn't check whether the parameter "volume_id" is in request body.
So the 500 error has been thrown.

We should catch the KeyError and transfer the KeyError to 400(HTTPBadRequest)
instead of 500.

Change-Id: I8a1dde1fd6ed820b39995af434efacc2a27c9604
Closes-Bug: #1252179
Subclass vendor specific exceptions.

Up until now drivers have been able to define their
own custom exception classes.  In most cases these are
inherited from either a native python exception class
or at best the base cinder exception class.

The problem with this is that it makes it very difficult
for higher layers (such as volume manager) to do any intelligent
exception handling and the base Cinder.exception class is too broad.

This change takes the first step in cleaning this up.  We create
new exception classes for all drivers to inherit from:
  VolumeDriverException
  VolumeBackendAPIException
  BackupDriverException

This still allows the freedom to create custom exceptions for a
particular driver, however it also gives us a common exception
class to catch and check in higher levels.  Further refinement
and standardization will be helpful going forward but this
should give us a good start.

Change-Id: I8c2ca4eecf7a64a82846d6d24fc0239db086237e
Remove suffixes from LVM brick test vgs output

When fake_execute() is called to retrieve volume group information, the
--nosuffix flag is passed but ignored.  This patch honors the nosuffix
flag and removes the unit suffix from the volume group sizes in the
returned output.

Change-Id: I45f41bc58f4ffb4bd527336c0f760350cff7c355
Merge "Subclass vendor specific exceptions."
Merge "GlusterFS: Synchronize operations that manipulate qcow2 data"
Merge "Create snapshot throws 500 Internal Error"
Merge "Add valid check and unit tests on quota class"
Merge "Remove suffixes from LVM brick test vgs output"