From ab22ea1a66407c01bd2507ea60f10ba0a4329627 Mon Sep 17 00:00:00 2001 From: Chris Archibald Date: Mon, 4 Mar 2019 08:58:09 -0800 Subject: [PATCH] Wrong Setup function was being used, which could result in failure if new global options were used. (#52862) * Revert "changes to clusteR" This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80. * Revert "changes to clusteR" This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80. * Revert "Revert "changes to clusteR"" This reverts commit f1104a37b42886aebb4d2b2ab27c91c96d97858a. * Revert "Revert "changes to clusteR"" This reverts commit f1104a37b42886aebb4d2b2ab27c91c96d97858a. * Fix setup bug --- lib/ansible/modules/storage/netapp/na_ontap_autosupport.py | 2 +- lib/ansible/modules/storage/netapp/na_ontap_flexcache.py | 3 +-- lib/ansible/modules/storage/netapp/na_ontap_job_schedule.py | 2 +- lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/storage/netapp/na_ontap_autosupport.py b/lib/ansible/modules/storage/netapp/na_ontap_autosupport.py index 2f2a64aa2cf..96affc492de 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_autosupport.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_autosupport.py @@ -147,7 +147,7 @@ class NetAppONTAPasup(object): if HAS_NETAPP_LIB is False: self.module.fail_json(msg="the python NetApp-Lib module is required") else: - self.server = netapp_utils.setup_ontap_zapi(module=self.module) + self.server = netapp_utils.setup_na_ontap_zapi(module=self.module) def set_playbook_zapi_key_map(self): self.na_helper.zapi_string_keys = { diff --git a/lib/ansible/modules/storage/netapp/na_ontap_flexcache.py b/lib/ansible/modules/storage/netapp/na_ontap_flexcache.py index 35323ba29f8..3b72e7d4d2b 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_flexcache.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_flexcache.py @@ -171,8 +171,7 @@ class NetAppONTAPFlexCache(object): if HAS_NETAPP_LIB is False: self.module.fail_json(msg="the python NetApp-Lib module is required") else: - self.server = netapp_utils.setup_ontap_zapi(module=self.module, - vserver=self.parameters['vserver']) + self.server = netapp_utils.setup_na_ontap_zapi(module=self.module, vserver=self.parameters['vserver']) def add_parameter_to_dict(self, adict, name, key=None, tostr=False): ''' add defined parameter (not None) to adict using key ''' diff --git a/lib/ansible/modules/storage/netapp/na_ontap_job_schedule.py b/lib/ansible/modules/storage/netapp/na_ontap_job_schedule.py index 7206bcaddda..c9339cadb4d 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_job_schedule.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_job_schedule.py @@ -261,7 +261,7 @@ class NetAppONTAPJob(object): :return: None """ results = netapp_utils.get_cserver(self.server) - cserver = netapp_utils.setup_ontap_zapi(module=self.module, vserver=results) + cserver = netapp_utils.setup_na_ontap_zapi(module=self.module, vserver=results) netapp_utils.ems_log_event("na_ontap_job_schedule", cserver) def apply(self): diff --git a/lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py b/lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py index 9af82dfe764..5299ee0fe17 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py @@ -269,7 +269,7 @@ class NetAppONTAPSnapmirror(object): if self.parameters.get('source_password'): self.module.params['password'] = self.parameters['source_password'] self.module.params['hostname'] = self.parameters['source_hostname'] - self.source_server = netapp_utils.setup_ontap_zapi(module=self.module) + self.source_server = netapp_utils.setup_na_ontap_zapi(module=self.module) def delete_snapmirror(self): """