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_prop.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZdd
ddddgZde
fd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: ipadm_prop
short_description: Manage protocol properties on Solaris/illumos systems.
description:
    - Modify protocol properties on Solaris/illumos systems.
version_added: "2.2"
author: Adam Števko (@xen0l)
options:
    protocol:
        description:
            - Specifies the protocol for which we want to manage properties.
        required: true
    property:
        description:
            - Specifies the name of property we want to manage.
        required: true
    value:
        description:
            - Specifies the value we want to set for the property.
        required: false
    temporary:
        description:
            - Specifies that the property value is temporary. Temporary
              property values do not persist across reboots.
        required: false
        default: false
        type: bool
    state:
        description:
            - Set or reset the property value.
        required: false
        default: present
        choices: [ "present", "absent", "reset" ]
s�
# Set TCP receive buffer size
- ipadm_prop: protocol=tcp property=recv_buf value=65536

# Reset UDP send buffer size to the default value
- ipadm_prop: protocol=udp property=send_buf state=reset
s?
protocol:
    description: property's protocol
    returned: always
    type: str
    sample: "TCP"
property:
    description: name of the property
    returned: always
    type: str
    sample: "recv_maxbuf"
state:
    description: state of the target
    returned: always
    type: str
    sample: "present"
temporary:
    description: property's persistence
    returned: always
    type: bool
    sample: "True"
value:
    description: value of the property. May be int or string depending on property.
    returned: always
    type: int
    sample: "'1024' or 'never'"
(t
AnsibleModuletipv4tipv6ticmpttcptudptsctptPropcB`s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cC`s]||_|jd|_|jd|_|jd|_|jd|_|jd|_dS(Ntprotocoltpropertytvaluet	temporarytstate(tmoduletparamsRRRRR(tselfR((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pyt__init__`s	cC`s�|jjd�g}|jd�|jd�|j|j�|j|j�|jj|�\}}}|dkrztS|jjdd|j|jfd|jd|j�dS(	Ntipadms	show-props-pitmsgs%Unknown property "%s" for protocol %sRR(Rtget_bin_pathtappendRRtrun_commandtTruet	fail_json(Rtcmdtrct_((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytproperty_existsis

	cC`s�|jjd�g}|jd�|jd�|jd�|jd�|jd�|j|j�|j|j�|jj|�\}}}|j�}|jd�\}}|dkr�||kr�tSt	SdS(	NRs	show-props-cs-oscurrent,defaults-pt:i(
RRRRRRtrstriptsplitRtFalse(RR R!toutR"Rtdefault((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytproperty_is_modified{s




cC`s�|jjd�g}|jd�|jd�|jd�|jd�|jd�|j|j�|j|j�|jj|�\}}}|j�}|dkr�|j|kr�tSt	SdS(NRs	show-props-cs-otcurrents-pi(
RRRRRRR%RRR'(RR R!R(R"((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytproperty_is_set�s




cC`s�|jjd�g}|jd�|jr;|jd�n|jd�|j|jd|j�|j|j�|jj|�S(NRsset-props-ts-pt=(RRRRRRRR(RR ((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytset_property�s
	
cC`sx|jjd�g}|jd�|jr;|jd�n|jd�|j|j�|j|j�|jj|�S(NRs
reset-props-ts-p(RRRRRRR(RR ((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytreset_property�s
	
(t__name__t
__module__RR#R*R,R.R/(((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pyR^s						cC`s�tdtdtdtdt�dtdt�dtdt�dtdtd	d
�dtdddd
ddg��dt�}t|�}d}d}d}i}|j|d<|j|d<|j	|d<|j
|d<|jr�|j|d<n|j	d
ks
|j	dkr�|j�rP|j
�s�|jrA|jdt�n|j�\}}}|dkr�|jd|jd|jd|d|�q�q�qPn�|j	dkrP|jdkr�|jdd�n|j�rP|j�sM|jr�|jdt�n|j�\}}}|dkrJ|jd|jd|jd|d|�qJqMqPn|dkrit|d<n
t|d<|r�||d<n|r�||d<n|j|�dS(Nt
argument_specRtrequiredtchoicesRRRR)ttypetboolRtpresenttabsenttresettsupports_check_modettchangediRR!s'Value is mandatory with state "present"tstdouttstderr(RtdictRtSUPPORTED_PROTOCOLSR'RtNoneRRRRRR#R*t
check_modet	exit_jsonR/RR,R.(RtpropR!R(terrtresult((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pytmain�sh	



					



t__main__N(t
__future__RRRR5t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR@tobjectRRGR0(((sN/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_prop.pyt<module>s


%c	C

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