LVM: Activate Thin Pool LV upon initialization

If the LVM thin pool is not active, space calculation fails,
as data_percent is not known.  Activate the pool upon initialization,
since we intend to use it anyway.

Slightly refactors _get_thin_pool_free_space so that it is clear
which missing/unexpected value is breaking things if a similar error
occurs for some other reason.

Closes-Bug: #1260773

Change-Id: I7cb187746c1ac297b82254c6efa37ba1c5fbb3e1
(cherry picked from commit 6ccc654a0509c4e308713f9e6fd95266cd112c9d)
Add default quota class into DB during migration

For some time now use_default_quota_class has been the
default setting for Cinder.  Cinder, however, has not been putting
any defaults for the default quota class into the database.  This
resulted in any command that queried for the default quotas to cause
the message "Deprecated: Default quota for resource: <resource> is set
by the default quota flag: <quota flag>, it is now deprecated.  Please use
the default quota class for default quota."

This commit resolves this issue by setting the default value for volumes,
snapshots and gigabytes in the quota_class table at migration time if there
is not already a class_name of 'default' in the quota_classes table.

Unit tests are included with this commit.

Closes-bug 1233763
Change-Id: I457ed8a9b78492eda22e31dfc198b2ee051d3ece
(cherry picked from commit 7d2641688454d9064b691e4aab4b5d8b14d75305)
Fixes HP LeftHand driver with Paramiko 1.13.0

With Paramiko 1.13.0, the method exec_command now returns Unicode.
This causes a problem when the driver tries to build the XML returned
from the LeftHand array. The XML header returned from the array defines
the encoding as encoding=UTF-8. Therefore, we must now ensure the
encoding passed to the parser is utf-8.

closes-bug: #1298608
(cherry picked from commit 57e8cdb9dd8e24919bc2243438a6bded53491b3e)

Conflicts:

	cinder/tests/test_hplefthand.py
	cinder/volume/drivers/san/hp_lefthand.py

Change-Id: I7b504626e2d9a0ee2b62820b11f56eb136e31987
Set python hash seed to 0 in tox.ini

New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but cinder unittests don't currently pass
with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Redundant setenvs for specific test envs are removed to prevent them
from overriding the PYTHONHASHSEED value.

Note this change will need to be backported to the stable branches to
keep unittests there working with new tox as well.

Conflicts:
	tox.ini

Change-Id: Ia55031528d082a1b11da6890447c5584e9e27551
(cherry picked from commit 03293715b1e950cf406018058e4c8a514c0f977f)
Merge "Set python hash seed to 0 in tox.ini" into stable/havana
Merge "LVM: Activate Thin Pool LV upon initialization" into stable/havana
Merge "Fixes HP LeftHand driver with Paramiko 1.13.0" into stable/havana
Merge "Add default quota class into DB during migration" into stable/havana
Fix solidfire accept_transfer

Previous fix has a mistake which makes the situation worse.  This change
fix volume['project_id'] and volume['user_id'] and adds unit test for
accept_transfer.

Closes-bug: # 1349475

Conflicts:
	cinder/tests/test_solidfire.py

Change-Id: I7b2bcefa4c8d173689cc63ee5aa9e00397c7f8ca
(cherry picked from commit 5dbdb11e8d8659a6b823c9552052b443050886ca)
Merge "Fix solidfire accept_transfer" into stable/havana