�
�Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
d d
l j j Z d d l m Z d d l m Z e j � Z y d d
l Z Wn e k
r� e Z n Xd e f d � � YZ d � Z e d k re � n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bysx
module: na_elementsw_cluster_pair
short_description: NetApp Element Software Manage Cluster Pair
extends_documentation_fragment:
- netapp.solidfire
version_added: '2.7'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Create, delete cluster pair
options:
state:
description:
- Whether the specified cluster pair should exist or not.
choices: ['present', 'absent']
default: present
dest_mvip:
description:
- Destination IP address of the cluster to be paired.
required: true
dest_username:
description:
- Destination username for the cluster to be paired.
- Optional if this is same as source cluster username.
dest_password:
description:
- Destination password for the cluster to be paired.
- Optional if this is same as source cluster password.
s8
- name: Create cluster pair
na_elementsw_cluster_pair:
hostname: "{{ src_hostname }}"
username: "{{ src_username }}"
password: "{{ src_password }}"
state: present
dest_mvip: "{{ dest_hostname }}"
- name: Delete cluster pair
na_elementsw_cluster_pair:
hostname: "{{ src_hostname }}"
username: "{{ src_username }}"
password: "{{ src_password }}"
state: absent
dest_mvip: "{{ dest_hostname }}"
dest_username: "{{ dest_username }}"
dest_password: "{{ dest_password }}"
s
( t
AnsibleModule( t to_nativeN( t NaElementSWModule( t NetAppModulet ElementSWClusterPairc B` sM e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s, class to handle cluster pairing operations c C` s� t j � | _ | j j t d t d t d d d g d d � d t d t d d � d
t d t d d � d t d t d d d t � � � t d
| j d t � | _ t t k r� | j j
d d � n t j d | j � | _ t
| j � | _ t � | _ | j j | j j � | _ | j d | j j d <| j j d
� rY| j d
| j j d <n | j j d � r�| j d | j j d <n t j d | j � | _ t
| j � | _ d S( sG
Setup Ansible parameters and ElementSW connection
t statet requiredt choicest presentt absentt defaultt dest_mvipt typet strt
dest_usernamet
dest_passwordt no_logt
argument_spect supports_check_modet msgs) Unable to import the SolidFire Python SDKt modulet hostnamet usernamet passwordN( t netapp_utilst ontap_sf_host_argument_specR t updatet dictt Falset TrueR R t
HAS_SF_SDKt fail_jsont create_sf_connectiont elemR
t elementsw_helperR t na_helpert set_parameterst paramst
parameterst gett dest_elemt dest_elementsw_helper( t self( ( s\ /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_elementsw_cluster_pair.pyt __init__\ s. c C` s. x'