Add cinder volume driver support for Nimble Storage.

The set of changes introduces the cinder iSCSI volume driver support for
Nimble Storage. It implements the minimum set of features required by the
icehouse release. Please see the blueprint nimble-iscsi-volume-driver for
more information.

Change-Id: I48781fc890b8fefb33027da3db2b1ff56c5deed4
Implements: blueprint nimble-iscsi-volume-driver
Configure write cache option of tgtd iscsi driver

Cinder LVMiSCSI driver is using default value of write-cache parameter
of tgtd iscsi driver. In this setting, write I/O from guest instance is
cached on dirty cache of a host.(write-back mode)

In this case, data lost may be occurred if the host crashes before
flushing dirty cache. This may cause a lot of instances to lose
their data.

In order to avoid this issue, it is better to turn off the write cache.
(write-through mode)

This patch adds "iscsi_write_cache" parameter to configure a behavior of
write cache. The default value is "iscsi_write_cache=on".(write-back mode)

Closes-Bug: 1336568
DocImpact

Change-Id: I7a495bc6118d4254576bdf1620a04ac537b3078d
Signed-off-by: Mitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Bump oslo.rootwrap to 1.3.0.0a1 for Cinder

Cinder already requires oslo.rootwrap 1.3.0 filters so we need to
bump requirements accordingly.

This will fix a variety of rootwrap warnings that can occur when using
the new cgroups features.

Change-Id: Ia72444d054a35c3dbb34c24dbefe8f05cdebbd33
Closes-bug: #1340877
XIV volume manage/unmanage support

XIV support for managing and unmanaging volumes.

Partially Implements: blueprint add-export-import-volumes

Change-Id: I305d2652709181bacd9f5b21f0201858f91f7a15
Use immutable default values for args

Default mutable values (e.g. arg1=[], arg2={}) could have side effects
in Python. So using None as a default value is safer.

Added hacking checks for default mutable args.

Closes: bug #1327473

Change-Id: I7055e534b91df794550de6c3b243324e582d4430
Add some log info for NoValidHost

Currently when a create call fails due to a
misconfiguration on the backend, or a problem
with satisfying the extra-specs from the filter
scheduler, the only thing you get in the logs is
a "No valid host".

This patch just adds a tiny bit more info to give us
a better idea where we're at.

First the exception shouldn't be setup with "reason=""",
so at least add "reason=no weighed hosts found".

Second, add a warning message prior to getting to that
point when we fail to find a host that satisfies the
{extra/qos}-specs that were requested, and include what
was being requested.

Change-Id: I2ce65b973196f673bac455613a6f8626320339ba
Don't leave snapshots on the floor

The current cloning process in the LVM
driver uses a snapshot to do the data
copy in the background.  Trouble here
is that if the creation or activation
of the new volume fails, we don't
cleanup the snapshot we created.

Just move the create_volume and activate
calls down into the try block so the finally
clause can do the cleanup for us.

Change-Id: If0fbab9d9f39102cdc7d287527be22c4a2b35934
Closes-Bug: #1312718
Fix performance issues with brocade zone driver.

Removed firmware checks from common path as the ssh invoke_shell
was taking 5 seconds to complete for each firmware check.
Refactored to only do cfgsave in non-activate case.
Removed extra calls to switch to get the active zoneset.

Closes-Bug: #1292119

Change-Id: Ie1c2c0c603f6dd68439f2c2db74b21ea2dd0fc11
Merge "XIV volume manage/unmanage support"
Remove hard coded reference from gettextutils.py

The following commit 4fdcbff96790753a4c1a508600e5d78b2c3b7172
introduced a few hard coded references to
'/home/jsbryant/cinder-dev/gettextutilsSync/' in
cinder/openstack/common/gettextutils.py. This patch will
removed those references.

Change-Id: Ib880863d275ac102c1eb723972d1ebd2eb3405a1
Closes-Bug: #1344072
Fix failure of source volume deletion in migrate_volume_completion

In VolumeManager.migrate_volume_completion(), when volume_status is not
'retyping', status_update is not set. However, status_update is always
referenced as dictionary on volume deletion path, so it fails to delete
migration source volume. This patch fixes the issue.

Change-Id: I06889dae326b9557e044f1712d9f3205bb68a953
Closes-Bug: 1344341
Merge "Don't leave snapshots on the floor"
Merge "Add some log info for NoValidHost"
Merge "Fix performance issues with brocade zone driver."
Add additional explicit imports of _ where needed

It appears that I missed some of the needed explicit
imports of _.  I have now run through all the /bin/cinder-*
functions and ensured that they can be properly started.

This patch adds additional imports of _ and also changes
cinder-rtstool to use the 'cinder' domain as was suggested by
Duncan Thomas in the first review cycle.

Change-Id: I6477093cb817b5b9506dd3787f027e073c51f37d
Closes-Bug:  1345789
Switch to use oslo.db

oslo.db first stable release has been cut and we can start using it
instead of openstack/common/db/* code which is now marked obsolete.

Change-Id: Ib350e8d1dcec3be707e3b1679c70202619256269
Merge "Add additional explicit imports of _ where needed"
Merge "Fix failure of source volume deletion in migrate_volume_completion"
Merge "Configure write cache option of tgtd iscsi driver"
Adds storwize_svc_npiv_compatibility_mode flag to Storwize/SVC driver

This configuration option allows the driver to function in an
environment where an attach operation occurs before the virtual FC
ports are logged into the fabric.

Today's behaviour (which is maintained as default behaviour) is to
only build the initiator_target_map for initiator ports that are
logged into the fabric, and error if there are no such ports.

If this new flag is set to True, then if no initiator ports are
found on the fabric, ALL initiator ports are placed into the
initiator_target_map, rather than none, which is the case today.

Closes-Bug: 1346622
Change-Id: Ie722612bc5a9af2816348392c0c39da003b99028