Merge "Fix [Unity] verification and convert mgmt ipv6" into stable/stein
This commit is contained in:
commit
e7834172a3
|
@ -37,7 +37,12 @@ from manila.share.drivers.dell_emc.plugins.unity import utils as unity_utils
|
|||
from manila.share import utils as share_utils
|
||||
from manila import utils
|
||||
|
||||
VERSION = "6.1.0"
|
||||
VERSION = "6.1.1"
|
||||
"""Version history:
|
||||
6.1.1 - Fix parsing management IPv6 address
|
||||
"""
|
||||
|
||||
VERSION = "6.1.1"
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan')
|
||||
|
@ -96,7 +101,8 @@ class UnityStorageConnection(driver.StorageConnection):
|
|||
def connect(self, emc_share_driver, context):
|
||||
"""Connect to Unity storage."""
|
||||
config = emc_share_driver.configuration
|
||||
storage_ip = config.emc_nas_server
|
||||
storage_ip = enas_utils.convert_ipv6_format_if_needed(
|
||||
config.emc_nas_server)
|
||||
username = config.emc_nas_login
|
||||
password = config.emc_nas_password
|
||||
self.client = client.UnityClient(storage_ip, username, password)
|
||||
|
|
|
@ -190,6 +190,9 @@ unity_base: &unity_base
|
|||
test_connect: &test_connect
|
||||
unity: *unity_base
|
||||
|
||||
test_connect_with_ipv6: &test_connect_with_ipv6
|
||||
unity: *unity_base
|
||||
|
||||
test_connect__invalid_sp_configuration:
|
||||
unity:
|
||||
_methods:
|
||||
|
|
|
@ -96,6 +96,19 @@ class FakeEMCShareDriver(object):
|
|||
self.configuration.local_conf.max_over_subscription_ratio = 20
|
||||
|
||||
|
||||
class FakeEMCShareDriverIPv6(object):
|
||||
def __init__(self, dhss=None):
|
||||
self.configuration = conf.Configuration(None)
|
||||
self.configuration.emc_share_backend = 'unity'
|
||||
self.configuration.emc_nas_server = 'fa27:2a95:e734:0:0:0:0:01'
|
||||
self.configuration.emc_nas_login = 'fake_user'
|
||||
self.configuration.emc_nas_password = 'fake_password'
|
||||
self.configuration.share_backend_name = 'EMC_NAS_Storage'
|
||||
self.configuration.vnx_server_meta_pool = 'nas_server_pool'
|
||||
self.configuration.unity_server_meta_pool = 'nas_server_pool'
|
||||
self.configuration.local_conf.max_over_subscription_ratio = 20
|
||||
|
||||
|
||||
STATS = dict(
|
||||
share_backend_name='Unity',
|
||||
vendor_name='EMC',
|
||||
|
|
|
@ -38,6 +38,11 @@ class TestConnection(test.TestCase):
|
|||
def test_connect(self, connection):
|
||||
connection.connect(res_mock.FakeEMCShareDriver(), None)
|
||||
|
||||
@res_mock.patch_connection_init
|
||||
def test_connect_with_ipv6(self, connection):
|
||||
connection.connect(res_mock.FakeEMCShareDriverIPv6(),
|
||||
None)
|
||||
|
||||
@res_mock.patch_connection
|
||||
def test_connect__invalid_pool_configuration(self, connection):
|
||||
f = connection.client.system.get_pool
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue with the Dell EMC Unity driver to work with
|
||||
a management IP configured in IPv6 format.
|
Loading…
Reference in New Issue