Fixes error when attaching SMB volumes

The SMB volume driver fails to attach a SMB volume.
This happens due to the fact that the SMB volume is
treated as an ISCSI volume.

Stack trace:
http://paste.openstack.org/show/NkLcJulSdYRUXs2a4Vs2/

Change-Id: Ie7cf70c436391e59152f5b717948e7dc4f8ced6d
Closes-Bug: #1574824
This commit is contained in:
Alin Balutoiu 2016-04-25 21:59:49 +03:00
parent 6ab276c323
commit 62944096f5
1 changed files with 6 additions and 2 deletions

View File

@ -246,10 +246,12 @@ class VolumeOps(object):
@six.add_metaclass(abc.ABCMeta)
class BaseVolumeDriver(object):
_is_block_dev = True
def __init__(self):
self._vmutils = utilsfactory.get_vmutils()
self._diskutils = utilsfactory.get_diskutils()
self._is_block_dev = True
def connect_volume(self, connection_info):
pass
@ -479,11 +481,13 @@ class ISCSIVolumeDriver(BaseVolumeDriver):
class SMBFSVolumeDriver(BaseVolumeDriver):
_is_block_dev = False
def __init__(self):
self._smbutils = utilsfactory.get_smbutils()
self._username_regex = re.compile(r'user(?:name)?=([^, ]+)')
self._password_regex = re.compile(r'pass(?:word)?=([^, ]+)')
self._is_block_dev = False
super(SMBFSVolumeDriver, self).__init__()
def export_path_synchronized(f):