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.
3.Add quota_classes extension enabled in unitest, so as to do
unitest for quota_classes' update operation.

Closes-bug: #1245360

Change-Id: Ie483db1bdbd4fac875de26abab8ebebd96f4938b
(cherry picked from commit 8b6d51ea04a65d846b0e92a11e191327360d7427)
Fix volume transfer href issue

The volume transfer collection in url defined as "os-volume-tranfer",
but I got another define "tranfers" in href url. They are different.
So it should be modify.

closes-bug: #1242980
Change-Id: I69a43012f2bb70ce5fc7b0331d2759527a261170
(cherry picked from commit b104d1c0c70898b59b6668970e05cebadecd064a)
GlusterFS: Synchronize additional operations

create_cloned_volume() and copy_volume_to_image() should also be
locked against other driver operations to prevent collisions
from concurrent updates of snapshot metadata or volume file data.

Closes-Bug: #1267983

(cherry picked from commit 06999f610afc3a123f7a54895e39d690301a8eba)

Change-Id: Idd6158bfbe4dc049c33fa58b40d3d570fc244d01
GlusterFS: Fix deadlock in volume clone

The create_cloned_volume path could deadlock due to
create_cloned_volume and create/delete_snapshot using the same
lock for synchronization.

Refactor the calls to create/delete snapshot to call the inner
method which does not use a lock.

Introduced by "06999f6 GlusterFS: Synchronize additional op..."

Related-Bug: 1267983
Closes-Bug: 1272092

(cherry picked from commit e9722f09dfd4b58e40afbf285ab9a7738a641dca)

Note: Effectively includes most changes from "8772714 Pylint fixes ..."
to resolve conflicts.
(cherry picked from commit 8772714b4fcb2d05ae7f0bfe5cfd0fa660ab9100)

Conflicts:
        cinder/volume/drivers/glusterfs.py

Change-Id: I84ca34b201c10644faa047f1c9274c14bcdd0359
Delete volume transfer in volume_destroy function

Doing volume force delete operation on volume-A will change volume-A's
status to 'deleted', so all related data about volume-A should be deleted.
Now current version's volume_destroy function doesn't delete related data
of volume transfer. If there is volume transfer about volume-A, first do
force delete operation on volume A, and thus the volume-A's transfer data
would be residual. So remove the related data of volume transfer in
volume_destroy function.

Change-Id: Id80a6e0cc061fccb02af60706244be043abdd72d
Closes-Bug: #1270785
(cherry picked from commit 19d8040d61d453ec3916d74c628189ca0b54ac59)
Raise max header size to accommodate large tokens

The max header is exceeded in the following scenario
- Auth tokens built with a keystone v3 API catalog
- A catalog with approximately 8 or more endpoints defined

An equivalent fix will be required for all projects which use
eventlet.wsgi.

Copied from https://review.openstack.org/#/c/33362/

Closes-Bug: 1190149

Change-Id: I3fcb196b25a7a477b799c8dfa2ff5115977ca06d
(cherry picked from commit aa1ba1f0176af286506e4188628e5acbb8f7f0e6)
Merge "Delete volume transfer in volume_destroy function" into stable/havana
Merge "Raise max header size to accommodate large tokens" into stable/havana
Merge "Add valid check and unit tests on quota class" into stable/havana
Merge "Fix volume transfer href issue" into stable/havana
Merge "GlusterFS: Synchronize additional operations" into stable/havana
Merge "GlusterFS: Fix deadlock in volume clone" into stable/havana
Merge remote-tracking branch 'upstream/stable/havana' into stable/havana