Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/storage/netapp/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddljjZej�Zdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiont
deprecatedtstatust	communitytsupported_bys�

module: sf_check_connections
deprecated:
  removed_in: "2.11"
  why: This Module has been replaced
  alternative: please use M(na_elementsw_check_connections)
short_description: Check connectivity to MVIP and SVIP.
extends_documentation_fragment:
    - netapp.solidfire
version_added: '2.3'
author: Sumit Kumar (@timuster) <[email protected]>
description:
- Used to test the management connection to the cluster.
- The test pings the MVIP and SVIP, and executes a simple API method to verify connectivity.

options:

  skip:
    description:
    - Skip checking connection to SVIP or MVIP.
    choices: ['svip', 'mvip']

  mvip:
    description:
    - Optionally, use to test connection of a different MVIP.
    - This is not needed to test the connection to the target cluster.

  svip:
    description:
    - Optionally, use to test connection of a different SVIP.
    - This is not needed to test the connection to the target cluster.

s�
   - name: Check connections to MVIP and SVIP
     sf_check_connections:
       hostname: "{{ solidfire_hostname }}"
       username: "{{ solidfire_username }}"
       password: "{{ solidfire_password }}"
s

N(t
AnsibleModule(t	to_nativetSolidFireConnectioncB`s,eZd�Zd�Zd�Zd�ZRS(cC`s tj�|_|jjtdtdtdddddddg�dtdtdddd�dtdtdddd���td	|jd
t�|_	|j	j
}|d|_|d|_|d|_
ttkr�|j	jdd�n-tjj|d
|d|ddd�|_dS(Ntskiptrequiredttypetstrtdefaulttchoicestmviptsvipt
argument_spectsupports_check_modetmsgs)Unable to import the SolidFire Python SDKthostnametusernametpasswordtporti�(tnetapp_utilstontap_sf_host_argument_specRtupdatetdicttFalsetNoneRtTruetmoduletparamsRRRt
HAS_SF_SDKt	fail_jsontElementFactorytcreatetsfe(tselftp((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pyt__init__Js'	


cC`spy,|jjd|j�}|jj}|SWn=tk
rk}|jjddt|�dt	j
��tSXdS(s�
            Check connection to MVIP

            :return: true if connection was successful, false otherwise.
            :rtype: bool
        RRs%Error checking connection to MVIP: %st	exceptionN(R'ttest_connect_mvipRtdetailst	connectedt	ExceptionR!R$R	t	tracebackt
format_excR(R(ttesttresultte((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pytcheck_mvip_connectioncs)cC`spy,|jjd|j�}|jj}|SWn=tk
rk}|jjddt|�dt	j
��tSXdS(s�
            Check connection to SVIP

            :return: true if connection was successful, false otherwise.
            :rtype: bool
        RRs%Error checking connection to SVIP: %sR+N(R'ttest_connect_svipRR-R.R/R!R$R	R0R1R(R(R2R3R4((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pytcheck_svip_connectionts)cC`st}d}|jdkrf|j�}|j�}|sHt}d}q�|s]t}d}q�t}nr|jdkr�|j�}|s�t}d}q�t}n9|jdkr�|j�}|s�t}d}q�t}n|r�|jjd|�n
|jj�dS(NtsConnection to MVIP failed.sConnection to SVIP failed.RRR(	R RRR5R7RR!R$t	exit_json(R(tfailedRtmvip_connection_establishedtsvip_connection_established((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pytcheck�s6							(t__name__t
__module__R*R5R7R=(((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pyR
Hs			cC`st�}|j�dS(N(R
R=(tv((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pytmain�s	t__main__(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR0tansible.module_utils.basicRtansible.module_utils._textR	tansible.module_utils.netapptmodule_utilstnetappRt
has_sf_sdkR#tobjectR
RAR>(((sX/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/_sf_check_connections.pyt<module>s 


$	j	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]