diff --git a/manila/share/drivers/netapp/dataontap/client/client_cmode.py b/manila/share/drivers/netapp/dataontap/client/client_cmode.py index 29d946d33c..006a484fd8 100644 --- a/manila/share/drivers/netapp/dataontap/client/client_cmode.py +++ b/manila/share/drivers/netapp/dataontap/client/client_cmode.py @@ -2046,16 +2046,16 @@ class NetAppCmodeClient(client_base.NetAppBaseClient): '8.3 or later.') raise exception.NetAppException(msg) - lifs = self.list_network_interfaces() - if not lifs: + lifs_info = self.get_network_interfaces(protocols=['NFS', 'CIFS']) + if len(lifs_info) == 0: LOG.debug("There are no LIFs configured for this Vserver. " "Kerberos is disabled.") return False # NOTE(dviroel): All LIFs must have kerberos enabled - for lif in lifs: + for lif in lifs_info: api_args = { - 'interface-name': lif, + 'interface-name': lif.get('interface-name'), 'desired-attributes': { 'kerberos-config-info': { 'is-kerberos-enabled': None, diff --git a/manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py b/manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py index 28b7ccbaf7..e362f8fbe9 100644 --- a/manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py +++ b/manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py @@ -2971,8 +2971,8 @@ class NetAppClientCmodeTestCase(test.TestCase): self.mock_object(self.client, 'send_request', mock.Mock(return_value=api_response)) self.mock_object(self.client, - 'list_network_interfaces', - mock.Mock(return_value=['lif1'])) + 'get_network_interfaces', + mock.Mock(return_value=[{'interface-name': 'lif1'}])) result = self.client.is_kerberos_enabled() @@ -2988,7 +2988,7 @@ class NetAppClientCmodeTestCase(test.TestCase): self.assertTrue(result) self.client.send_request.assert_called_once_with( 'kerberos-config-get', kerberos_config_get_args) - self.client.list_network_interfaces.assert_called_once() + self.client.get_network_interfaces.assert_called_once() def test_get_kerberos_service_principal_name(self): diff --git a/releasenotes/notes/bug-2073766-svm-scope-exclude-management-lif-when-validate-kerberos-config-ef0f1249fcc4445b.yaml b/releasenotes/notes/bug-2073766-svm-scope-exclude-management-lif-when-validate-kerberos-config-ef0f1249fcc4445b.yaml new file mode 100644 index 0000000000..9d083f21b7 --- /dev/null +++ b/releasenotes/notes/bug-2073766-svm-scope-exclude-management-lif-when-validate-kerberos-config-ef0f1249fcc4445b.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + NetApp driver `bug #2073766 + `_: + Kerberos can only be configured for the SVM data network interface. + Therefore, this fix excludes the vserver management network interface + for certain SVM accounts when checking the SVM Kerberos configuration + for network interfaces.