�
�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
Z
d d l m Z d d
l
m Z d d l j j Z d d l m Z e j � Z d e f d � � YZ d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys�
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- "Enable or disable HA on a cluster"
extends_documentation_fragment:
- netapp.na_ontap
module: na_ontap_cluster_ha
options:
state:
choices: ['present', 'absent']
description:
- "Whether HA on cluster should be enabled or disabled."
default: present
short_description: NetApp ONTAP Manage HA status for cluster
version_added: "2.6"
s�
- name: "Enable HA status for cluster"
na_ontap_cluster_ha:
state: present
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
t
N( t
AnsibleModule( t to_native( t NetAppModulet NetAppOntapClusterHAc B` s2 e Z d Z d � Z d � Z d � Z d � Z RS( s-
object initialize and class methods
c
C` s� t j � | _ | j j t d t d t d d d g d d � � � t d | j d t � | _ t � | _
| j
j | j j � | _
t t k r� | j j d d
� n t j d | j � | _ d S( Nt statet requiredt choicest presentt absentt defaultt
argument_spect supports_check_modet msgs( the python NetApp-Lib module is requiredt module( t netapp_utilst na_ontap_host_argument_specR t updatet dictt FalseR t TrueR R t na_helpert set_parameterst paramst
parameterst HAS_NETAPP_LIBt fail_jsont setup_na_ontap_zapit server( t self( ( sV /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_cluster_ha.pyt __init__8 s % c C` s� t j j j d i | d 6� } y | j j | d t �WnH t j j k
r� } | j j d d | t
| � f d t j � � n Xd S( sG
Enable or disable HA on cluster
:return: None
s cluster-ha-modifys
ha-configuredt enable_tunnelingR s$ Error modifying cluster HA to %s: %st exceptionN(
R t zapit NaElementt create_node_with_childrenR$ t invoke_successfullyR t
NaApiErrorR R"