Fixes 3par driver methods that were double locking

There were many cases where the 3par drivers(FC and iSCSI) were double
locking, e.g. we were locking in the individual driver and in ‘common’.
This patch set removes all the locks in ‘common’ except the one on
‘create_cloned_volume’.

The methods ’_get_volume_state’ and ‘_copy_volume’ are only called in
‘create_cloned_volume’, so those locks were removed as well. All the other
methods in ‘common’ are only called by the driver which provide the lock,
except ‘create_volume’ which is also called by ‘create_cloned_volume’.

Change-Id: I660fbd04824bd2837e06480c8298ea5a709fc82a
Fixes: bug 1175791
Fixes the 3PAR drivers CPG validation

The 3PAR drivers were not checking if the Common Provisioning
Group(CPG) exists in the virtual domain at volume create time when
the default was being overwritten by volume type extra_specs value.
It was also reporting the default CPG in the metadata returning
after creating the volume. Now it reporting the correct CPG and
setting the correct snapshot cpg if different from the default
or not set.

Fixes bug 1186427

Change-Id: Idef7a4f29854c82980789786f2414e5046c8d8fb
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
Remove Flags usage from cinder.volume.driver

cinder.volume.driver was using a mix of FLAGS and the
new conf options for multi-backend.  The result was failure
of multi-backend configrations to set the iscsi_helper
option.

This updates the driver.py file to use the OSLO.cfg and fixes the
check for iscsi_helper check in the initialize_connection call,
which was undefined.

Fixes bug: 1169928

Change-Id: Ia1678893f32a9d08a695f055f59f7296e17d9d78
Use a SSH pool to manage SSH connection

Use a SSH pool to hold all SSH clients.It allows 4 SSH clients
at most to connect to the SSH server at the same time.
This patchset also enables every SSH client connect to the other
controller when they failed to connect to the current controller.
For example,failed to A,then to B,or,failed to B,then to A.

Fixes bug: 1162251
Change-Id: I86f7f684639034be97ddf2031e61ac6bf3a196ad
Add parsing to extra-specs key check

When using the filter scheduler which is now the default,
we can no longer pass in extra-specs like: {minIOPS:500, ....},
because the capabilities filter will reject this because there is
no host reporting minIOPS:500 capabilities.

We now need to scope the keys (ie qos:minIOPS:500....), but
that unfortunately requires a fix to the SolidFire driver.

This change add a check for the ':' in the key, and parses
on it if it's there.

Also fixes backend_name and uses VERSION var instead of
generating string in stats reporting.

Fixes bug: 1167141

Change-Id: Ie7fd7d231af78cb18a13f44a4379b44d3c3385df
Use VERSION var for volume_stats version (Gluster/NFS)

Establish a formal version number to help with maintenance.

Change-Id: Iffe1a6f809ec9385c7407efac25ca39eff0d1329
NetApp: Fix failing NetApp tests

The tests were failing due to an upgrade in the testing framework
(possibly due to upgrade of nose package from 1.2.1 to 1.3.0).
The actual reason was a bug in the suds client. A simple
workaround is utilised here, which sets the logging level of a
suds file to INFO instead of DEBUG.

Some 'FutureWarning' warnings from the test output were also
fixed.

Change-Id: Ia67476c23bffa91264cf79f6a26944b450c4f4fc
Add capabilities reporting to ThinLVM driver

ThinLVM driver was missing the newly required capabilities reporting
and inheritance from the parent LVM driver doesn't work because the
capacity reporting methods between regular LVM and Thin LVM are not
compatible.

This patch add the basic requirements needed in the capabilities reporting
to make it usable by the filter scheduler.

Fixes bug: 1166572

Change-Id: I471dcc31d07516e71bcd2d3ae03e0405e0594697
Add missing space to "volumes already consumed" message

Change-Id: I48728def59ecb2f139fa523cfe429aab076bfa88
Merge "Use a SSH pool to manage SSH connection"
Merge "NetApp: Fix failing NetApp tests"
Merge "Add missing space to "volumes already consumed" message"
Merge "Add capabilities reporting to ThinLVM driver"
cinder volume service keeps retrying even code exception

Make sure that ProcessLauncher does not try to restart the failed
service. And make sure the ProcessLauncher exits, when the number
of the failed services equal the number of total services.

Fixes: bug 1167841
Change-Id: I818c754534c18a62d292e21f0c98086571fe0565
Cinder wasn't filtering the backups returned to backup list API

This has the side effect of return all backups in the system (regardless of
who created them) to the user. You should only see the backups created in your
current active project.

Fixes bug: 1169461

Change-Id: I121e8ed215b28f1b21e24b2104f8294039e09b48
Update to latest copy of OSLO incubator

Specifically I wanted the change be84db3ab24ef94b6ec457bb299d48c51575e8a6
to oslo-incubator to fix my logging issue.

I ignored the changes in common/policy.py as this change breaks
the cinder unit tests.

Fixes bug: 1170038

Change-Id: Id72417d58c8f4bf139aa082131154153a175689d
Merge "Add parsing to extra-specs key check"
Merge "Remove Flags usage from cinder.volume.driver"
Rename duplicate test method

test_get_method_unknown_controller_action was defined twice,
checking however for different things. Rename the 2nd instance
to test_get_method_undefined_controller_action instead, otherwise
it gets overwritten later and not run. Increases test coverage

Change-Id: I64b62560d6db9f6378df8fbc21bd9fada5088b89