Only use iscsi_helper config option if using ISCSIDriver

_get_iscsi_properties checks for iscsi_helper == 'tgtadm', but
this is run for drivers other than ISCSIDriver.  This means that
when using the Nexenta driver, the target_lun is changed when it
shouldn't be.

Only change target_lun based on iscsi_helper if using ISCSIDriver.

Change-Id: I104c1b45f37917ea9f41855c17405f63c4ebcc39
Raise NotImplementedError for NFS snapshot operations

Since NfsDriver inherits snapshot related methods from VolumeDriver,
it will try to run LVM commands for snapshot calls, when it should
just report that these are not supported for NFS.

Fixes LP: #1097266

Change-Id: Ia438c88d3c8c0a43b512bba9b273e1305f6d0dd0
Merge "Only use iscsi_helper config option if using ISCSIDriver" into stable/folsom
Fix inability to delete volumes in error state for NetApp driver

While using NetApp 7-mode storage box to create volumes, if the volume
is not created on the storage box (possibly due to wrong/missing
options in cinder.conf file), the volume goes in error state, and when
one tries to delete the volume, an exception was raised which made
the volume go in error_deleting state, which is unrecoverable. This
commit quiesces that exception, resulting in successful removal of the
volume entry from the volume table.

Fixes bug 1090167

Change-Id: I0a25b71ad03e7f7acf58df3952e074ff164b82ff
Backport paramiko 1.8.0 requirement to Folsom.

Require paramiko >= 1.8.0

There is a well-known bug in the Paramiko SSH library that causes
these Exceptions:
SSHException: Error connecting via ssh: PID check failed. RNG must be
re-initialized after fork(). Hint: Try Random.atfork()

This bug has been fixed in Paramiko, and therefore we should require
the newer version for Cinder drivers that use Paramiko to function
properly.

Change-Id: Ia14b7b72393e2a2482ebde418b5477934779bf13
Fixes: bug 1150720
Enable direct testing with nosetests

This is the minimal backport of
https://review.openstack.org/#/c/21685/
which makes it possible to run the functional
tests without also invoking run_tests.sh. The
extra call to monkey_patch is not causing any
harm when used via run_tests.sh

Change-Id: If0d2cb94f956380a2c35414b6e8df6db76a669c6
Force deletes using tgt to workaround bug 1159948

Tgt has a bug where it can have multiple copies of an initiator
if there has been a reconnect.

See https://bugs.launchpad.net/cinder/+bug/1159948

Change-Id: I9a1b6757eb780efbaa1403016e50de7c0e45d720
(cherry picked from commit b84218633ab5417adf94c568eb54243f4074ab11)
Elevate context for delete volume with no host.

So in the case of a volume that is placed in error state
on create and never actually deployed, the cinder.volume.api delete
call does a short cut call to db.destroy_volume which is fine because
all we have is a DB entry (scheduler never deployed the volume).

Unfortunately, this requires admin context, so just add an elevate
context to the db.destroy_volume call.

Fixes bug: 1084273

Change-Id: I0ef8bf4356047c385bef703b8dce7d5edf537bf6
(cherry picked from commit a2830e5417539980249e3ab12d8bf9538d8956c4)
Merge "Fix inability to delete volumes in error state for NetApp driver" into stable/folsom
NetApp[Backport]: Clean up QTree when deleting volume

Previously, deleting a Cinder volume would leave a QTree on NetApp
storage box. This commit fixes the issue.

Fixes bug 1099414

Change-Id: I95f1d6b802f4abfad421d34f1c000b75fb72c41e
NetApp[backport]: Fix for snapshot not deleted in error state.

This fix enables cleaning of volumes/snapshots
in error state by allowing them to delete.
It will allow the delete call to be
successful if snapshot/volume are in
error state. This also fixes the bug
raised recently with  number 1145409 which seems
to be duplicate of 1143661.

bug 1143661
bug 1145409

Change-Id: I38bc13e676404f96db54b12edfa56680489e893e
Sync rpc changes from oslo stable/folsom

Contains code from the following oslo commits:

9f938720 Update common code to support pep 1.3.
7e36792c kombu's fanout_cast_to_server was calling wrong method
 - Fixes bug 1074113
c3ec615c LOG.exception() should only be used in exception handler
17c5188c Use pep8 v1.3.3
d147d9f2 Fix QPID reconnect issues
 - Fixes bug 1073999

Change-Id: Ia4504cb4d8f2108b743efc4639450254d6e3fb8e
Merge "Enable direct testing with nosetests" into stable/folsom
Merge "Sync rpc changes from oslo stable/folsom" into stable/folsom
Merge "NetApp[backport]: Fix for snapshot not deleted in error state." into stable/folsom