diff --git a/lib/ansible/modules/storage/netapp/na_ontap_gather_facts.py b/lib/ansible/modules/storage/netapp/na_ontap_gather_facts.py index 36ca0a794d9..98ab5ff993c 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_gather_facts.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_gather_facts.py @@ -177,7 +177,7 @@ class NetAppONTAPGatherFacts(object): 'kwargs': { 'call': 'security-login-get-iter', 'attribute': 'security-login-account-info', - 'field': ('user-name', 'application', 'authentication-method'), + 'field': ('vserver', 'user-name', 'application', 'authentication-method'), 'query': {'max-records': '1024'}, }, 'min_version': '0', diff --git a/test/units/modules/storage/netapp/test_na_ontap_gather_facts.py b/test/units/modules/storage/netapp/test_na_ontap_gather_facts.py index 94e722266c4..c5c12d853b5 100644 --- a/test/units/modules/storage/netapp/test_na_ontap_gather_facts.py +++ b/test/units/modules/storage/netapp/test_na_ontap_gather_facts.py @@ -9,7 +9,7 @@ import pytest import sys from units.compat import unittest -from units.compat.mock import patch +from units.compat.mock import patch, Mock from ansible.module_utils import basic from ansible.module_utils._text import to_bytes import ansible.module_utils.netapp as netapp_utils @@ -64,7 +64,6 @@ class MockONTAPConnection(object): def invoke_successfully(self, xml, enable_tunneling): # pylint: disable=unused-argument ''' mock invoke_successfully returning xml data ''' self.xml_in = xml - print(xml.to_string()) if self.type == 'vserver': xml = self.build_vserver_info() elif self.type == 'net_port':