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
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
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
cinder.backup: Replace 'locals()' with explicit values

Help bring source code into compliance with the Cinder Style Commandments:
https://github.com/openstack/cinder/blob/master/HACKING.rst

This change covers all affected source in the cinder backup module, i.e.
cinder/backup/*.py and subdirectories.

Partially fixes: bug #1190748

Change-Id: I3e0f3806030f1813d055135f15e64b5a719970ed
Use Python 3.x compatible except construct

Use except x as y:, which works with any
Python version >= 2.6

Change-Id: Ibf0f9aa8fb9725c1c9c00558ec217db96301678f
Fix and enable gating on H403

Fix occurrences of
H403 - multi line docstring end on new line

Change-Id: I79a818095e9f64a18ded1686fb152b9d58f3c8b1
Update attach status when instance id invalid.

In cinder.manager do_attach we have a check to make sure the
supplied instance id is a valid UUID which is great, but if it's
not we just raise and dump out, leaving the volume in an attaching
state.

We should update the status to error_attaching in this case and then
raise/return.

Fixes bug: 1192370

Change-Id: Ia759ea7a387544913953ca84e9ed927480c4edfd
Merge "Update attach status when instance id invalid."
Merge "Implement capability to extend existing volume."
Merge "Use Python 3.x compatible except construct"
Don't perform retry_execute in certain cases.

Certain cases like "LVM not found" and "Insufficient space"
in LVM create/delete shouldn't be retried.

Change-Id: I1a0891f769d37dc858c70b07c838f9fc4111a76c
Modify check for volume-type-id to a get w/default

While implementing Fix for a previous bug to enable setting
volume type on a cloned volume and reading it's info we added
a vref['volume_type_id'], problem is that the _do_clone method
is shared for both clone and create from snapshot.

In the create from snapshot case however that key doesn't exist
in the vref (which is a snapshot object).

This change turns this into a key.get with a default return.

Fixes bug: 1192745

Change-Id: I1a6d38de614f54fcaa31ea7cc4250aacc85b0796
fix error class path in logging sample

class path for NullHandler should be
cinder.openstack.common.log.NullHandler.

Fixes bug: 1192765
Change-Id: I552fe25cb89fa911dcbacb733013097b6e3c4ef3
Add missing extend volume test (rpcapi).

Add test that was missing to test the volume rpcapi call for
extend_volume.

Change-Id: Idffc18cad60afe6e8864fd93d36f9ec23a402b73
Add build directory to flake8 ignore dirs.

No need to run flake8 on the build dir, so add it
to ignore list.

Change-Id: I0f6d3d3b889616f12ae2c52bbc65e528f3786996
Add the project name into CinderKeystoneContext.

Fixed Bug 1178576.

Change-Id: I35cbd40c6f4aba45aeb8722ae5e10db8349d4510
Merge "Don't perform retry_execute in certain cases."
Merge "Modify check for volume-type-id to a get w/default"
Merge "Add missing extend volume test (rpcapi)."
Merge "Add build directory to flake8 ignore dirs."