Merge "Port remotefs driver to Python 3"
This commit is contained in:
commit
dad3cf7a77
@ -25,6 +25,7 @@ import time
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import units
|
||||
import six
|
||||
|
||||
from cinder import compute
|
||||
from cinder import db
|
||||
@ -471,7 +472,9 @@ class RemoteFSDriver(driver.LocalVD, driver.TransferVD, driver.BaseVD):
|
||||
# results in share_info =
|
||||
# [ 'address:/vol', '-o options=123,rw --other' ]
|
||||
|
||||
share_address = share_info[0].strip().decode('unicode_escape')
|
||||
share_address = share_info[0].strip()
|
||||
# Replace \040 with a space, to support paths with spaces
|
||||
share_address = share_address.replace("\\040", " ")
|
||||
share_opts = None
|
||||
if len(share_info) > 1:
|
||||
share_opts = share_info[1].strip()
|
||||
@ -769,6 +772,8 @@ class RemoteFSSnapDriver(RemoteFSDriver, driver.SnapshotVD):
|
||||
|
||||
Returns string in a hex format.
|
||||
"""
|
||||
if isinstance(base_str, six.text_type):
|
||||
base_str = base_str.encode('utf-8')
|
||||
return hashlib.md5(base_str).hexdigest()
|
||||
|
||||
def _get_mount_point_for_share(self, share):
|
||||
|
1
tox.ini
1
tox.ini
@ -59,6 +59,7 @@ commands =
|
||||
cinder.tests.unit.test_eqlx \
|
||||
cinder.tests.unit.test_evaluator \
|
||||
cinder.tests.unit.test_exception \
|
||||
cinder.tests.unit.test_glusterfs \
|
||||
cinder.tests.unit.test_gpfs \
|
||||
cinder.tests.unit.test_hitachi_hbsd_horcm_fc \
|
||||
cinder.tests.unit.test_hitachi_hbsd_snm2_fc \
|
||||
|
Loading…
x
Reference in New Issue
Block a user