Add support for FlexCache to na_ontap_vserver_peer (#52301)
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* updates
* doc fix
* Revert "Revert "changes to clusteR""
This reverts commit 8e56b999e6
.
* fix wrong fucntion
This commit is contained in:
parent
bf8ada0eb5
commit
725654f9d3
1 changed files with 11 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# (c) 2018, NetApp, Inc
|
||||
# (c) 2018-2019, NetApp, Inc
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
@ -27,9 +27,10 @@ options:
|
|||
description:
|
||||
- Specifies name of the source Vserver in the relationship.
|
||||
applications:
|
||||
choices: ['snapmirror', 'file_copy', 'lun_copy']
|
||||
choices: ['snapmirror', 'file_copy', 'lun_copy', 'flexcache']
|
||||
description:
|
||||
- List of applications which can make use of the peering relationship.
|
||||
- FlexCache supported from ONTAP 9.5 onwards.
|
||||
peer_vserver:
|
||||
description:
|
||||
- Specifies name of the peer Vserver in the relationship.
|
||||
|
@ -54,6 +55,7 @@ version_added: "2.7"
|
|||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
|
||||
- name: Source vserver peer create
|
||||
na_ontap_vserver_peer:
|
||||
state: present
|
||||
|
@ -65,6 +67,7 @@ EXAMPLES = """
|
|||
username: "{{ netapp_username }}"
|
||||
password: "{{ netapp_password }}"
|
||||
dest_hostname: "{{ netapp_dest_hostname }}"
|
||||
|
||||
- name: vserver peer delete
|
||||
na_ontap_vserver_peer:
|
||||
state: absent
|
||||
|
@ -100,7 +103,7 @@ class NetAppONTAPVserverPeer(object):
|
|||
vserver=dict(required=True, type='str'),
|
||||
peer_vserver=dict(required=True, type='str'),
|
||||
peer_cluster=dict(required=False, type='str'),
|
||||
applications=dict(required=False, type='list', choices=['snapmirror', 'file_copy', 'lun_copy']),
|
||||
applications=dict(required=False, type='list', choices=['snapmirror', 'file_copy', 'lun_copy', 'flexcache']),
|
||||
dest_hostname=dict(required=False, type='str'),
|
||||
dest_username=dict(required=False, type='str'),
|
||||
dest_password=dict(required=False, type='str', no_log=True)
|
||||
|
@ -128,6 +131,8 @@ class NetAppONTAPVserverPeer(object):
|
|||
if self.parameters.get('dest_password'):
|
||||
self.module.params['password'] = self.parameters['dest_password']
|
||||
self.dest_server = netapp_utils.setup_na_ontap_zapi(module=self.module)
|
||||
# reset to source host connection for asup logs
|
||||
self.module.params['hostname'] = self.parameters['hostname']
|
||||
|
||||
def vserver_peer_get_iter(self):
|
||||
"""
|
||||
|
@ -240,6 +245,9 @@ class NetAppONTAPVserverPeer(object):
|
|||
"""
|
||||
Apply action to create/delete or accept vserver peer
|
||||
"""
|
||||
results = netapp_utils.get_cserver(self.server)
|
||||
cserver = netapp_utils.setup_na_ontap_zapi(module=self.module, vserver=results)
|
||||
netapp_utils.ems_log_event("na_ontap_vserver_peer", cserver)
|
||||
current = self.vserver_peer_get()
|
||||
cd_action = self.na_helper.get_cd_action(current, self.parameters)
|
||||
if cd_action == 'create':
|
||||
|
|
Loading…
Reference in a new issue