Provide user with more information on quota fail

Provide the user with useful information when a snapshot or volume
create fails because it would cause the user to exceed available quota.
Specifically report the user's current gigabyte usage and quota
allocations.

Closes-Bug: #1235148

Change-Id: Ib4c5dbcbd172c69834c2824791af755380f38e01
use cinder utils.get_root_helper

Replaced all of the manual entries of
the root_helper with the cinder
utils.get_root_helper()

Closes-Bug: #1233907

Change-Id: I4c9b4c27ed4b779595a272436d79ec068e7ee537
VMware: Re-create session for RetrievePropertiesEx

When RetrievePropertiesEx API is called after session timeout, the driver
does not re-create session automatically.

This is a regression caused when moving from RetrieveProperties to
RetrievePropertiesEx API.

Fixes bug: 1235187

Change-Id: I8a1e2452dfb3029365d59eae7850d1a9363b25f0
Imported Translations from Transifex

Change-Id: I8b4e6122ec5dfa64f749a73e6ccf0b777acdd4bc
remove unused methods in driver.Scheduler

cinder.scheduler.host_manager.HostManager doesn't have get_host_list()
and get_service_capabilities(). But we don't catch the AttributeError
by them. Therefore, get_host_list() and get_service_capabilities() in
cinder.scheduler.driver.Scheduler have not been used.

Also, get_host_list() and get_service_capabilities() in
cinder.scheduler.manager.SchedulerManager have not been used.

Change-Id: I402cf068612866649cc8645391eff38fca56f634
Closes-Bug: #1236723
Merge "VMware: Re-create session for RetrievePropertiesEx"
Merge "Imported Translations from Transifex"
Nexenta volume drivers: refactor NexentaJSONProxy

Change constructor arguments of NexentaJSONProxy.

Change-Id: I43d69485e6a98704f4cb02a4b55acccf9c05b683
Merge "remove unused methods in driver.Scheduler"
Utilizes assertIsNone and assertIsNotNone

Using assertEqual/assertNotEqual to test if an element
is or is not None is too python2.4.
Our unit testing framework supports assertIsNone and assertIsNotNone
which were created for these types of tests.

Change-Id: I2e430e87dd0222b194a84f2928ad36aac26aaba6
Clean up comparison assertions

Using assertTrue and the comparison operators to test
if an element is greater, equal, or less is too python2.4.
Our unit testing framework 'testtools' supports
- assertEqual
- and testtools Matcher classes
which were created for these types of tests.

Re-implemented assertGreater and assertGreaterEqual
with compatibility for python < 2.7.

Change-Id: I6f3e3279630393e594c75d30cb4b895c2e2c22ca
VMware: Disallow snapshot of attached volume

The current implementation perform snapshot of attached volume.
This is invalid because when we take snapshot of the backing, the instance
continues pointing to the readonly delta and tries writing to it.
This patch will disallow snapshot creation of attached volume.

We have similar issue with delete of snapshot, when deleted the instance will
point to an invalid disk file, since that will get merged with its parent.
Hence any writes by the instance will fail with disk not found error.
This patch will ignore delete snapshot of attached volume.

Since we disallow snapshot of attached volume, we disallow linked clone of
attached source volume and also upload of attached volume.

Fixes bug: 1236891

Change-Id: I6a91eac8529836d1fe1de73bf6b28ec098aa7c54
Imported Translations from Transifex

Change-Id: I68cbee28565b1b4bd0352a4d769744cab28b71a0
Support Huawei driver upgrade from grizzly to havana

To make the driver upgrade from grizzly to higher versions, the patch
checks the old host name firstly when creating and deleting host in
Huawei storage system.
If the old host name exists:
*get and use it directly when adding host.
*delete it directly when deleting host.

Closes-bug 1237189

Change-Id: I82a9dbc1ef0bb0b91771afea4aadec5afe65eecf
Merge "Provide user with more information on quota fail"
Merge "Utilizes assertIsNone and assertIsNotNone"
Merge "Nexenta volume drivers: refactor NexentaJSONProxy"
Merge "VMware: Disallow snapshot of attached volume"
Merge "Support Huawei driver upgrade from grizzly to havana"
long flashcopy operation may block volume service

Storwize family uses flashcopy for snapshot or volume clone. The
volume delete has to wait until flashcopy finishes or errors out.
The _delete_vdisk() will poll volume FlashCopy status in a loop.
This may block volume serivce heartheat since it is in the same
. The solution is to use openstack FixedIntervalLoopingCall
to run the FlashCopy status poll in a timer thread.

The cinder volume mananger will resume delete operation for those
volumes that are in the deleting state during volume service startup.
Since Storwize volume delete may wait for a long time, this can cause
volume service to have long delay before it becomes available.
A greenpool is used to offload those volume delete operations.

Change-Id: Ie01a441a327e1e318fa8da0040ae130731b7a686
Closes-Bug: #1203152