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
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
Adding host attaching support to Cinder

Changing 'os-attach' API interface to allow client mark a volume as be
attached to a host.

Implement bp: volume-host-attaching
docimpact

Change-Id: Iaf442ad0fb37ce369d838f3a512724f830071763
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Update kombu requirement

The minimum version of kombu in the requirements
list has been updated to ensure that compatible
kombu and msgpack libraries are used across all
projects. This update also requires a bump for
anyjson.

Addresses bug #1134575

Change-Id: Ic33a5bbc8d1cdf1effd41c1c2aebc7ef6988c39e
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
        cinder.[brick,db,image] Replace 'locals()'

        Replace use of '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 soruce in the
        cinder brick, db, and image modules, i.e.
        cinder/brick/*.py and subdirectories
        cinder/db/*.py and subdirectories
        cinder/image/*.py and subdirectories

        Partially fixes: bug #1190758

Change-Id: Ibc111ab5ef53a2316e868c9cba8b94b323ba31c0
Do not raise NEW exceptions

Raising NEW exception is bad practice, because we lose TraceBack.
So all places like:

except SomeException as e:
    raise e

should be replaced by

except SomeException:
    raise

If we are doing some other actions before reraising we should
store information about exception then do all actions and then
reraise it. This is caused by eventlet bug. It lost information
about exception if it switch threads.

fixes bug 1191730
Change-Id: Ic2be96e9f03d2ca46d060caf6f6f7f713a1d6b82
Fix and enable gating on H401

H401  docstring should not start with a space

Change-Id: Iaf63af75b0534cae1bac3c931ef5f51f1644aec9
Register used CONF entries in cinder.api.common.py

After change: I2114d5fc45f5299c3b2011270034a3370e0ec388 we
were no longer registering defaults for cinder.api.common.py settings.

The result is that you're unable to run individual unit tests like
cinder.tests.api.test_volume_metadata.py.

Register the needed CONF options and we're all set again.

Fixes bug: 1194315

Change-Id: I6df6c5ec5687c8156a9f3794cc7f04d8d28065d9
Fix up trivial H103 license check mismatches

Adjust a few trivial typos in the license headers
in the source files.

Change-Id: I907df4ece8e589e930fd788e3f33201537938572
Avoid winning the useless use of cat award

We can use file operations directly, no need
to run cat(1)

Change-Id: Id8a9f615dfb11d1bd7acd4a7d6f40545c246e5cd
Merge "Fix up trivial H103 license check mismatches"
Merge "Avoid winning the useless use of cat award"
Merge "        cinder.[brick,db,image] Replace 'locals()'"
Merge "Do not raise NEW exceptions"
Imported Translations from Transifex

Change-Id: Ib1f73f11952a60695f49cf8c6cd8fbca9946bd6f
Merge "Added extra-spec key scoping to the 3PAR drivers"
Replace glance_metadata check with bootable column.

This patch adds a column to indicate if a volume is bootable or not.

Cinder API V1 was using get.volume_glance_metadata to determine
if a volume was bootable for translate_view.

This is fine until you put a heavy load on the system and things
can fall apart, particularly the backref of the glance meta is no longer
available and the call blows up.  Also this results in a bit of extra
unnecessary data being passed around with every create and get call.
This is especially an issue when creating hundreds or thousands of volumes.
Even better we can now reliably create thousands of volumes.

Fixes bug: 1192390

Change-Id: Idd47a0a8069ee905b81c7aae562b82767ad91930
Merge "Imported Translations from Transifex"
Merge "Replace glance_metadata check with bootable column."
Merge "Register used CONF entries in cinder.api.common.py"