Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/illumos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZdefd
��YZ
d�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: ipadm_if
short_description: Manage IP interfaces  on Solaris/illumos systems.
description:
    - Create, delete, enable or disable IP interfaces on Solaris/illumos
      systems.
version_added: "2.2"
author: Adam Števko (@xen0l)
options:
    name:
        description:
            - IP interface name.
        required: true
    temporary:
        description:
            - Specifies that the IP interface is temporary. Temporary IP
              interfaces do not persist across reboots.
        required: false
        default: false
        type: bool
    state:
        description:
            - Create or delete Solaris/illumos IP interfaces.
        required: false
        default: "present"
        choices: [ "present", "absent", "enabled", "disabled" ]
s�
# Create vnic0 interface
- ipadm_if:
    name: vnic0
    state: enabled

# Disable vnic0 interface
- ipadm_if:
    name: vnic0
    state: disabled
s7
name:
    description: IP interface name
    returned: always
    type: str
    sample: "vnic0"
state:
    description: state of the target
    returned: always
    type: str
    sample: "present"
temporary:
    description: persistence of a IP interface
    returned: always
    type: bool
    sample: "True"
(t
AnsibleModuletIPInterfacecB`sGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cC`s=||_|jd|_|jd|_|jd|_dS(Ntnamet	temporarytstate(tmoduletparamsR
RR(tselfR
((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pyt__init__Os	cC`sh|jjdt�g}|jd�|j|j�|jj|�\}}}|dkr`tStSdS(Ntipadmsshow-ifi(R
tget_bin_pathtTruetappendR
trun_commandtFalse(Rtcmdtrct_((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytinterface_existsVs
cC`s�|jjdt�g}|jd�|jd�|jd�|j|j�|jj|�\}}}|dkr�|jjd|jd|d|�nd	|kS(
NRsshow-ifs-oRiR
Rtmsgtdisabled(R
RRRR
Rt	fail_json(RRRtoutterr((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytinterface_is_disabledbs


%cC`s^|jjdt�g}|jd�|jr>|jd�n|j|j�|jj|�S(NRs	create-ifs-t(R
RRRRR
R(RR((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytcreate_interfaceps
	cC`s^|jjdt�g}|jd�|jr>|jd�n|j|j�|jj|�S(NRs	delete-ifs-t(R
RRRRR
R(RR((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytdelete_interface|s
	cC`sR|jjdt�g}|jd�|jd�|j|j�|jj|�S(NRs	enable-ifs-t(R
RRRR
R(RR((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytenable_interface�s


cC`sR|jjdt�g}|jd�|jd�|j|j�|jj|�S(NRs
disable-ifs-t(R
RRRR
R(RR((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytdisable_interface�s


(	t__name__t
__module__RRR R!R"R#R$(((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pyR	Ms							cC`s�tdtdtdt�dtdtdd�dtdd	d
dd	dd
g��dt�}t|�}d}d}d}i}|j|d<|j|d<|j|d<|jdkr(|j	�r�|j
r�|jdt�n|j�\}}}|dkr%|j
d|jd|d|�q%q�nl|jd	kr�|j	�s�|j
r_|jdt�n|j�\}}}|dk	r�|dkr�|j
d|jd|d|�q�q�n�|jdkr$|j�r�|j�\}}}|dk	r!|dkr!|j
d|jd|d|�q!q�np|jd
kr�|j�s�|j�\}}}|dk	r�|dkr�|j
d|jd|d|�q�q�n|dkr�t|d<n
t|d<|r�||d<n|r�||d<n|j|�dS(Nt
argument_specR
trequiredRtdefaultttypetboolRtpresenttchoicestabsenttenabledRtsupports_check_modettchangediRRtstdouttstderr(RtdictRRR	tNoneR
RRRt
check_modet	exit_jsonR"RR!R R#R$(R
t	interfaceRRRtresult((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pytmain�sb	


	(	(((



t__main__N(t
__future__RRRR*t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRtobjectR	R;R%(((sL/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_if.pyt<module>s


N	B

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