diff --git a/manila/tests/share/drivers/dell_emc/plugins/unity/mocked_unity.yaml b/manila/tests/share/drivers/dell_emc/plugins/unity/mocked_unity.yaml index 854afdc156..6185ba9ae9 100644 --- a/manila/tests/share/drivers/dell_emc/plugins/unity/mocked_unity.yaml +++ b/manila/tests/share/drivers/dell_emc/plugins/unity/mocked_unity.yaml @@ -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_dhss_false_connect: &test_dhss_false_connect unity: *unity_base diff --git a/manila/tests/share/drivers/dell_emc/plugins/unity/res_mock.py b/manila/tests/share/drivers/dell_emc/plugins/unity/res_mock.py index edda02c540..6604bc7696 100644 --- a/manila/tests/share/drivers/dell_emc/plugins/unity/res_mock.py +++ b/manila/tests/share/drivers/dell_emc/plugins/unity/res_mock.py @@ -100,6 +100,21 @@ class FakeEMCShareDriver(object): self.configuration.local_conf.max_over_subscription_ratio = 20 +class FakeEMCShareDriverIPv6(object): + def __init__(self, dhss=None): + if dhss in (True, False): + CONF.set_default('driver_handles_share_servers', dhss) + 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', diff --git a/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py b/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py index 516f9e884b..4c055596b3 100644 --- a/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py +++ b/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py @@ -38,6 +38,11 @@ class TestConnection(test.TestCase): def test_connect(self, connection): connection.connect(res_mock.FakeEMCShareDriver(dhss=True), None) + @res_mock.patch_connection_init + def test_connect_with_ipv6(self, connection): + connection.connect(res_mock.FakeEMCShareDriverIPv6( + dhss=True), None) + @res_mock.patch_connection def test_connect__invalid_pool_configuration(self, connection): f = connection.client.system.get_pool diff --git a/releasenotes/notes/bug-1845135-fix-Unity-cannot-use-mgmt-ipv6-9407710a3fc7f4aa.yaml b/releasenotes/notes/bug-1845135-fix-Unity-cannot-use-mgmt-ipv6-9407710a3fc7f4aa.yaml new file mode 100644 index 0000000000..97dd45a62f --- /dev/null +++ b/releasenotes/notes/bug-1845135-fix-Unity-cannot-use-mgmt-ipv6-9407710a3fc7f4aa.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed an issue with the Dell EMC Unity driver to work with + a management IP configured in IPv6 format. \ No newline at end of file