From ce13de0044f44c5bf808d226ec362e8d2f41dde3 Mon Sep 17 00:00:00 2001 From: Helena Dantas Date: Thu, 15 Jun 2023 13:33:18 +0000 Subject: [PATCH] [NetApp] Fix ipspace naming is confusing This patch resolves the NetApp ipspace naming to use neutron_net_id rather than neutron_subnet_id manila driver. Closes-Bug: #2007560 Change-Id: Id5f2d35dac755aa9ae47a4e42af5d6c3fc5e6f2e --- .../drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py | 2 +- .../netapp/dataontap/cluster_mode/test_lib_multi_svm.py | 2 +- ...-2007560-fix-netapp-ipspace-naming-7c097743e187b920.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-2007560-fix-netapp-ipspace-naming-7c097743e187b920.yaml diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py index cc6266adea..98e3aa7cd9 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py @@ -427,7 +427,7 @@ class NetAppCmodeMultiSVMFileStorageLibrary( # NOTE(cknight): Neutron needs cDOT IP spaces because it can provide # overlapping IP address ranges for different subnets. That is not # believed to be an issue for any of Manila's other network plugins. - ipspace_id = network_info.get('neutron_subnet_id') + ipspace_id = network_info.get('neutron_net_id') if not ipspace_id: return client_cmode.DEFAULT_IPSPACE diff --git a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_multi_svm.py b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_multi_svm.py index 6868007952..331055c1f5 100644 --- a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_multi_svm.py +++ b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_multi_svm.py @@ -929,7 +929,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): result = self.library._create_ipspace(fake.NETWORK_INFO) expected = self.library._get_valid_ipspace_name( - fake.NETWORK_INFO['neutron_subnet_id']) + fake.NETWORK_INFO['neutron_net_id']) self.assertEqual(expected, result) self.library._client.create_ipspace.assert_called_once_with(expected) diff --git a/releasenotes/notes/bug-2007560-fix-netapp-ipspace-naming-7c097743e187b920.yaml b/releasenotes/notes/bug-2007560-fix-netapp-ipspace-naming-7c097743e187b920.yaml new file mode 100644 index 0000000000..a308b4626d --- /dev/null +++ b/releasenotes/notes/bug-2007560-fix-netapp-ipspace-naming-7c097743e187b920.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + NetApp driver: Fixed NetApp ipspace naming to follow the neutron network id, + instead of the neutron subnet id as before. For more details please refer to + `launchpad bug #2007560 `.