Fix [Unity] verification and convert mgmt ipv6
The IPv6 format need change to [ipv6] Add bug fix release note Change-Id: I21fa6f3e55f45b058df8f25a44b7f939c409329b Closes-bug: #1845135 (cherry picked from commit923edff726
) (cherry picked from commit9da5594fbd
)
This commit is contained in:
parent
8fe6f27890
commit
90a68770e2
|
@ -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.share import utils as share_utils
|
||||||
from manila import 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__)
|
LOG = log.getLogger(__name__)
|
||||||
SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan')
|
SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan')
|
||||||
|
@ -96,7 +101,8 @@ class UnityStorageConnection(driver.StorageConnection):
|
||||||
def connect(self, emc_share_driver, context):
|
def connect(self, emc_share_driver, context):
|
||||||
"""Connect to Unity storage."""
|
"""Connect to Unity storage."""
|
||||||
config = emc_share_driver.configuration
|
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
|
username = config.emc_nas_login
|
||||||
password = config.emc_nas_password
|
password = config.emc_nas_password
|
||||||
self.client = client.UnityClient(storage_ip, username, password)
|
self.client = client.UnityClient(storage_ip, username, password)
|
||||||
|
|
|
@ -190,6 +190,9 @@ unity_base: &unity_base
|
||||||
test_connect: &test_connect
|
test_connect: &test_connect
|
||||||
unity: *unity_base
|
unity: *unity_base
|
||||||
|
|
||||||
|
test_connect_with_ipv6: &test_connect_with_ipv6
|
||||||
|
unity: *unity_base
|
||||||
|
|
||||||
test_connect__invalid_sp_configuration:
|
test_connect__invalid_sp_configuration:
|
||||||
unity:
|
unity:
|
||||||
_methods:
|
_methods:
|
||||||
|
|
|
@ -96,6 +96,19 @@ class FakeEMCShareDriver(object):
|
||||||
self.configuration.local_conf.max_over_subscription_ratio = 20
|
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(
|
STATS = dict(
|
||||||
share_backend_name='Unity',
|
share_backend_name='Unity',
|
||||||
vendor_name='EMC',
|
vendor_name='EMC',
|
||||||
|
|
|
@ -38,6 +38,11 @@ class TestConnection(test.TestCase):
|
||||||
def test_connect(self, connection):
|
def test_connect(self, connection):
|
||||||
connection.connect(res_mock.FakeEMCShareDriver(), None)
|
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
|
@res_mock.patch_connection
|
||||||
def test_connect__invalid_pool_configuration(self, connection):
|
def test_connect__invalid_pool_configuration(self, connection):
|
||||||
f = connection.client.system.get_pool
|
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