�
�Udac @` s� d Z 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( s%
Element Software Initialize Cluster
i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys0
module: na_elementsw_cluster
short_description: NetApp Element Software Create Cluster
extends_documentation_fragment:
- netapp.solidfire
version_added: '2.7'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Initialize Element Software node ownership to form a cluster.
options:
management_virtual_ip:
description:
- Floating (virtual) IP address for the cluster on the management network.
required: true
storage_virtual_ip:
description:
- Floating (virtual) IP address for the cluster on the storage (iSCSI) network.
required: true
replica_count:
description:
- Number of replicas of each piece of data to store in the cluster.
default: '2'
cluster_admin_username:
description:
- Username for the cluster admin.
- If not provided, default to login username.
cluster_admin_password:
description:
- Initial password for the cluster admin account.
- If not provided, default to login password.
accept_eula:
description:
- Required to indicate your acceptance of the End User License Agreement when creating this cluster.
- To accept the EULA, set this parameter to true.
type: bool
nodes:
description:
- Storage IP (SIP) addresses of the initial set of nodes making up the cluster.
- nodes IP must be in the list.
required: true
attributes:
description:
- List of name-value pairs in JSON object format.
s�
- name: Initialize new cluster
tags:
- elementsw_cluster
na_elementsw_cluster:
hostname: "{{ elementsw_hostname }}"
username: "{{ elementsw_username }}"
password: "{{ elementsw_password }}"
management_virtual_ip: 10.226.108.32
storage_virtual_ip: 10.226.109.68
replica_count: 2
accept_eula: true
nodes:
- 10.226.109.72
- 10.226.109.74
sM
msg:
description: Success message
returned: success
type: str
N( t
AnsibleModule( t to_native( t NaElementSWModulet ElementSWClusterc B` s2 e Z d Z d � Z d � Z d � Z d � Z RS( sO
Element Software Initialize node with ownership for cluster formation
c C` s t j � | _ | j j t d t d t d d � d t d t d d � d t d t d d d d � d t d t d d � d
t d t d d d t � d t d t d d
� d t d t d t � d t d t d d d d � � � t d | j d t � | _
| j
j } | d | _ | d | _
| d | _ | j d � | _ | j d � | _ | d | _ | j d � | _ | j d
� | _ t t k r�| j
j d d � n t j d | j
� | _ t | j � | _ | j d k r�| j j | j j d d � � n | j j d d � | _ d S( Nt management_virtual_ipt requiredt typet strt storage_virtual_ipt
replica_countt defaultt 2t cluster_admin_usernamet cluster_admin_passwordt no_logt accept_eulat boolt nodest
attributest dictt
argument_spect supports_check_modet msgs) Unable to import the SolidFire Python SDKt modulet sourcet na_elementsw_cluster( t netapp_utilst ontap_sf_host_argument_specR t updateR t Truet Falset listt NoneR R t paramsR R R t getR R R R R t
HAS_SF_SDKt fail_jsont create_sf_connectiont sfeR
t elementsw_helpert set_element_attributes( t selft input_params( ( sW /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_elementsw_cluster.pyt __init__r s:
"c C` s� i | j d 6| j d 6| j d 6| j d 6| j d 6| j d 6} | j d k ra | j | d <n | j d k r� | j | d <n y | j j
| � Wn<