components/openstack/cinder/patches/06-no-san-remote.patch
author david.comay@oracle.com
Thu, 30 Apr 2015 09:53:53 -0700
branchs11u2-sru
changeset 4224 d9bd163194bd
permissions -rw-r--r--
20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4224
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     1
This internal-only patch is to prevent Cinder's SanDriver from
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     2
attempting to use the Paramiko-based routines until the latter is
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     3
integrated into Solaris. It also provides a specific error in the case
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     4
where san_is_local=false is defined in the configuration and a driver
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     5
is specified that attempts to use that configuration (which implies,
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     6
again, an attempt to use Paramiko).
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     7
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     8
--- cinder-2014.2.2/cinder/volume/drivers/san/san.py.~1~	2015-02-05 08:03:26.000000000 -0800
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
     9
+++ cinder-2014.2.2/cinder/volume/drivers/san/san.py	2015-04-22 00:54:38.481125902 -0700
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    10
@@ -29,7 +29,6 @@ from cinder.i18n import _
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    11
 from cinder.openstack.common import excutils
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    12
 from cinder.openstack.common import log as logging
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    13
 from cinder.openstack.common import processutils
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    14
-from cinder import ssh_utils
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    15
 from cinder import utils
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    16
 from cinder.volume import driver
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    17
 
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    18
@@ -165,10 +164,8 @@ class SanDriver(driver.VolumeDriver):
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    19
     def check_for_setup_error(self):
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    20
         """Returns an error if prerequisites aren't met."""
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    21
         if not self.run_local:
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    22
-            if not (self.configuration.san_password or
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    23
-                    self.configuration.san_private_key):
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    24
-                raise exception.InvalidInput(
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    25
-                    reason=_('Specify san_password or san_private_key'))
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    26
+            raise exception.InvalidInput(
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    27
+                reason=_("san_is_local=false is not currently supported."))
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    28
 
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    29
         # The san_ip must always be set, because we use it for the target
d9bd163194bd 20884839 san.py (used by ZFSSA driver) needs to account for lack of paramiko
david.comay@oracle.com
parents:
diff changeset
    30
         if not self.configuration.san_ip: