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
Don't set signing_dir by default.

Allow the auth_token middleware to setup its own signing_dir
if required.

Fixes LP Bug #1185098.

Change-Id: Id8766efb34d37ca382b865167ec2465d0a1ce8dc
Migrate to Oslo DB code

 - engine and session handling code is reused
 - integrity errors caused by duplicating entries
   are handled properly
 - the base class for models is mostly reused
   (the only exception is SoftDeleteMixin, which
    requires changes to existing DB schema; this
    will be implemented in BP db-unique-keys)
 - use common exceptions handling code

Blueprint: db-session-cleanup

Change-Id: I7f5eb53daddc57066af9c73caa633b37a2afd9c2
Update 3PAR driver session management

The 3PAR REST API server has a limited number of active sessions.
This change to the driver removes the ability of keeping the
REST API session alive for the life of the driver.  Now on every
driver entry point, which is synchronized, we login to the 3PAR
and when the work is complete, we log out of the 3PAR.  This has
the side affect of more overhead to the 3PAR but helps eliminate
failed commands due to maximum sessions reached to the 3PAR.

This patch also changes the locking to be the same lock for all
driver entry points and adds locking around the volume stats.
This patch also migrates all of the client code access to the common
class, which simplifies the drivers.

Change-Id: Ibcec4cf1781262521ccbdf99c4ba4167634a09c4
rbd: simplify configuration and use librbd and librados

Add an rbd_ceph_conf options to mirror glance configuration, and use
the existing rbd_user option to choose how to connect to the cluster
instead of relying on an environment variable.  Use these settings
when running command line programs and when connecting via librados.

Use absolute imports so that importing the python librbd bindings
via 'import rbd' does not try to import cinder.drivers.rbd again.

Create some convenience wrappers to simplify librbd and librados
error handling and cleanup. Using these everywhere also simplifies
testing. Mock out all the librados and librbd calls in the tests
so these libraries don't need to be installed.

Remove the local_path() method since it's never used. It was
left over from nova-volume.

There are only three things still relying on the command line:
- importing an image
- exporting to an image
- getting monitor addresses

Importing and exporting on the command line include zero-detection
that would be little benefit to replicate here. librados and librbd
don't have a simple interface to obtain the monitor addresses, so
leave that to a command line tool as well.

Fixes: bug 1083540
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>

Change-Id: I32d059c5e460c2dd8423119b3dbe4a9921f5e907
Add error reporting to generate_sample.sh on import failure.

Currently tools/conf/generate_sample.sh collect options from project
modules by importing each module and looking at it's global variables
for instances of classes derived from cfg.Opt (or lists of such
instances). Sometimes this import can fail due to various reasons,
cfg.DuplicateOptError for example. And if import fails no options
from imported module written to sample config file. Error reporting
will at least warn user that some of options didn't get into sample
config.

Change-Id: I831464b1c1575c106d866a936a50ec74b2d44e59
Fixes: bug #1182611
Imported Translations from Transifex

Change-Id: Ic2b5d57ad16da67e9b152853338a2ef488eaeee7
Merge "Migrate to Oslo DB code"
Merge "Imported Translations from Transifex"
HDS Cinder Driver. Rev #1

blueprint hds-hus-iscsi-cinder-driver
This is the first rev of Hitachi Data Systems Cinder iSCSI driver.
This driver works with HUS (df850) array.
This driver contains all the base-line features specified for Havana release.
Amended into this submission are changes from code-reviews.

Docimpact: Bug #1180648

Change-Id: Ia27d076443b10da2c653456f9292dd192362b853
Handle IPv6 specifid glance servers gracefully

IPv6 netlocs can for valid reasons contain ':', so
splitting by ':' is dangerous. Instead of splitting
by host and port in order to only reassemble it into
a netloc again later, simply always pass netloc, which
avoids the bug.

Add extra textcases to verify the new behavior.
Fix Flake8 warnings.

Fixes LP Bug #1182830

Change-Id: I130528ae946e8888d35c25e468b4ea6ac29db0cf
Fixed method db.api.reservation_expire

There was missing relation in Reservation model.

Change-Id: I6efe558278297aea6d2348b347152c244b3323d6
Fixes: bug 1185325
Fix path for pylint Gate

Change-Id: Ibd36a2a0a7ebe572a4dd660a3e35378ae02b8187
Fix AttributeError typo

Fixes Bug LP #1186566

Change-Id: I8211d365c4d3532cd6ffc3b3041661ff6b9e637f
python3: Introduce py33 to tox.ini

Introduce py33 to tox.ini to make testing
easier with python3.

Change-Id: I351fa475deffd75201e20e3629af6ed018b9ac7c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "HDS Cinder Driver. Rev #1"
Merge "Update 3PAR driver session management"
Merge "Add error reporting to generate_sample.sh on import failure."
Merge "Fix AttributeError typo"