Added extra-spec key scoping to the 3PAR drivers

The Filter scheduler uses the extra-specs data to determine capabilities
and back-end, and it also enforces strict checking. As a result previous
method of setting all the 3PAR settings(cpg, snap_cpg, persona, provisioning)
on the 3PAR volume using extra-specs on a volume type will not work with the
default scheduler. The filter scheduler will look at these keys and fail to
schedule deployment of the volume because no suitable back-end reports those
capabilities.

This fix will allow the custom keys (ie: hp3par:cpg=TEST_CPG,
hp3par:provisioning=full,...) to be scoped, unfortunately this requires
additional checks in the common driver to parse the keys.

I'll update the 3PAR driver section of the OpenStack Block Storage Admin
Guide in a follow-up patch.
DocImpact
Fixes: bug 1194289

Change-Id: Id3fde3b3a185eedf2b8193fd0dc6324d904e8834
Start using Pyflakes

Blacklist those pyflakes warnings that trigger
frequently. Fix the remaining one and start
gating on those that are enabled.

Change-Id: I92f27f8cf36615dfd465cbd903a9605f9cb78443
Fix some unittest cases failed on osx

dd shouldn't actually be called in the unit tests to begin with. Stub these
improper calls out.

Fixes bug: 1188972

Change-Id: I2966382a66eebbf49ce74e091e444a91ab274869
Fix various Sphinx warnings

Change-Id: I68c9ff6fdf9115d1abb0fb756eb806b92af29286
Replace FLAGS with cfg.CONF in other modules, unless tests

Replace all the FLAGS with cfg.CONF in cinder/
Large commit was split into several parts

Change-Id: Iacd645997a0c50aa47079c856e1b4e33e3001243
Fixes: bug #1182037
Replace FLAGS with cfg.CONF in volume

Replace all the FLAGS with cfg.CONF in cinder/volume
Large commit was split into several parts

Change-Id: I435fe91f414fda027531076bdbcb6660a3c635af
Fixes: bug #1182037
Merge "Fix some unittest cases failed on osx"
Imported Translations from Transifex

Change-Id: I0a33030fb608d564eb0717f5107553254c888e78
Merge "Replace FLAGS with cfg.CONF in other modules, unless tests"
Flatten Volume from Snapshot

Implements: blueprint flatten-volume-from-snapshot

Change-Id: I77b0a9bf8cfbe4881a75909d2749d0c3f17561c9
Merge "Fix various Sphinx warnings"
Replace utils.to_bytes() with strutils.to_bytes()

The to_bytes() function have moved to oslo.
Replaced/removed the to_bytes() function with the one in strutils.

Change-Id: I53947b7a333057fec738a02f5643be59e563290d
Merge "Replace FLAGS with cfg.CONF in volume"
Merge "Imported Translations from Transifex"
Merge "Flatten Volume from Snapshot"
Implement capability to extend existing volume.

This patch adds the core components to implement extending
the size of an existing available volume.

Volume status must be available, and the format is:
    extend <vol-id> <new-size>

where new-size must be > current size.

Adding support to drivers will be handled in follow up
patches for each of the existing drivers.

Implements blueprint: volume-resize

Change-Id: I40026083e564ea2074757e11e13cd07cdae3e6cc
Remove usage of locals() for formatting from cinder.api.*

Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables

Fix bug 1171936

Change-Id: Id6a900899db328be067b8139a49c12ce802dd415
Raise an error if iSCSI is not supported

Since the compute nodes may not have iSCSI support, volume drivers
requiring it will raise an error if the connector's initiator attribute
is not set when initializing the connection.

bug #1007084

Related to: I5da472e5013fdc0c733ecb12b919c1068873bdc6

Change-Id: I95d859c11cf81bf57cecf7af8b224cdbb71592d5
Fix up the test framework

When trying to test a bug the cinder test framework was
running all the tests when I just wanted one to run.

Instead of fixing this problem in nose I tried to move cinder to
testr. I copied a fair bit of code from nova to get this to work.
This way at least if some one makes an improvement to the nova
test framework cinder can improve here also.

Note that now all the tests a thread safe. Added a concurrency argument
to run_tests.sh that defaults to 1. You can specify your own level then
and take the risk of intermittent failures. Tell jenkins to use a
concurrency level of 1 to avoid failing gate jobs.

Note One of these tests is broken and I have disabled for now. There
is a bug for this here: https://bugs.launchpad.net/cinder/+bug/1173266

Note: cinder.api.openstack.FaultWrapper is deprecated and is causing
a circular import when I try and import cinder.tests.test_wsgi. This
is fixed by only importing the openstack.FaultWrapper during the
__init__ phase of the wsgi middleware.

Fixes: bug 1183434
Fixes: bug 1177924

Change-Id: I5e10b55c5b236eb81a6a3e0e9ea56af8ca4ef8e1
Imported Translations from Transifex

Change-Id: Ifdb8f90abd6ece7e3cc47e27c0c4e8fd29e89b4d