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
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
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
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
Add explicit import of _ to hp_3par_fc and iscsi

Messages using translation were added to the hp_3par_fc and
hp_3par_iscsi files but an explicit import of gettextutils _ was not
included.

This fixes that problem.

Change-Id: I2555860c6525a00295e823ab8c826b2bec6a3098
Closes-Bug: 1347184
Merge "Use immutable default values for args"
Merge "Add explicit import of _ to hp_3par_fc and iscsi"
Merge "Add cinder volume driver support for Nimble Storage."
Fixes Cinder volume upload to image on windows

Due to fact that when uploading a volume to an image the file is
opened in text mode and the different line endings style on
windows glance client won't be able to upload the desired file.
The solutions is to simply open the file in binary mode when
performing this action.

Change-Id: I51b084ce38e1aaad4ded63b75b097137dedc088c
Closes-bug: 1346911
Add hacking test

There is no test for cinder/hacking/check.py, the patch add test
for it.  Also update the location in check.py to reference the
right path to add test cases.

Change-Id: I094e712339e53380ce4ed58b60beda1c4f53d5c1
Implements new 'bootable' option for manage existing volume.

A 'bootable' option (defaults to False) can be passed as part of
the HTTP POST request to manage an existing volume.  This is
passed into the database when the volume is created.

Also changes all drivers to use the more agnostic keys
'source-name' or 'source-id' when specifying
which existing volume to manage.  This change is to support the
cinderclient change in https://review.openstack.org/#/c/76216/
to make it easier for CLI users to manage existing volumes
without having to know the implementation-specifics of the driver.

Change-Id: I58eaa75181fd0b606628584308fd83bdeaa8b64f
Implements: blueprint add-export-import-volumes
Merge "Fixes Cinder volume upload to image on windows"
Merge "Implements new 'bootable' option for manage existing volume."