Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidgd6dd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functiontpreviewtstatust	communitytsupported_bys1.1tmetadata_versions�
---
module: ibm_sa_host_ports
short_description: Add host ports on IBM Spectrum Accelerate Family storage systems.
version_added: "2.8"

description:
    - "This module adds ports to or removes them from the hosts
        on IBM Spectrum Accelerate Family storage systems."

options:
    host:
        description:
            - Host name.
        required: true
    state:
        description:
            - Host ports state.
        required: true
        default: "present"
        choices: [ "present", "absent" ]
    iscsi_name:
        description:
            - iSCSI initiator name.
        required: false
    fcaddress:
        description:
            - Fiber channel address.
        required: false
    num_of_visible_targets:
        description:
            - Number of visible targets.
        required: false

extends_documentation_fragment:
    - ibm_storage

author:
    - Tzur Eliyahu (@tzure)
s�
- name: Add ports for host.
  ibm_sa_host_ports:
    host: test_host
    iscsi_name: iqn.1994-05.com***
    username: admin
    password: secret
    endpoints: hostdev-system
    state: present

- name: Remove ports for host.
  ibm_sa_host_ports:
    host: test_host
    iscsi_name: iqn.1994-05.com***
    username: admin
    password: secret
    endpoints: hostdev-system
    state: absent

t
(t
AnsibleModule(texecute_pyxcli_commandtconnect_ssltspectrum_accelerate_spectis_pyxcli_installedc
C`s�t�}|jtdtdddddg�dtdt�dt�d	t�d
t���t|�}t|�t|�}g}y(|jjd|j	j
d��j}Wntk
r�nX|j	d}t
}g|D]}|j
d�^q�}|j	j
d	�r|j	j
d	�ng}|j	j
d�rE|j	j
d�ng}x0|D](}||ksp||krRt}PqRqRWt
}	|dkr�|r�t|d|�}	n|dkr�|r�t|d
|�}	n|jd|	�dS(Ntstatetdefaulttpresenttchoicestabsentthosttrequiredt
iscsi_namet	fcaddresstnum_of_visible_targetst	port_namet
host_add_portthost_remove_porttchanged(RtupdatetdicttTrueR	R
Rtcmdthost_list_portstparamstgettas_listt	ExceptiontFalseR
t	exit_json(
t
argument_spectmoduletxcli_clienttportsRtport_existstporttfc_portstiscsi_portst
state_changed((sQ/usr/lib/python2.7/site-packages/ansible/modules/storage/ibm/ibm_sa_host_ports.pytmainUsD			



"**
t__main__N(t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t!ansible.module_utils.ibm_sa_utilsR
RRR
R0t__name__(((sQ/usr/lib/python2.7/site-packages/ansible/modules/storage/ibm/ibm_sa_host_ports.pyt<module>	s

)"	.

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