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_ifprop.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZdd
gZde
fd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: ipadm_ifprop
short_description: Manage IP interface properties on Solaris/illumos systems.
description:
    - Modify IP interface properties on Solaris/illumos systems.
version_added: "2.3"
author: Adam Števko (@xen0l)
options:
    interface:
        description:
            - Specifies the IP interface we want to manage.
        required: true
        aliases: [nic]
    protocol:
        description:
            - Specifies the protocol for which we want to manage properties.
        required: true
    property:
        description:
            - Specifies the name of the property we want to manage.
        required: true
        aliases: [name]
    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" ]
s2
- name: Allow forwarding of IPv4 packets on network interface e1000g0
  ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0

- name: Temporarily reset IPv4 forwarding property on network interface e1000g0
  ipadm_ifprop: protocol=ipv4 interface=e1000g0  temporary=true property=forwarding state=reset

- name: Configure IPv6 metric on network interface e1000g0
  ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100

- name: Set IPv6 MTU on network interface bge0
  ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6
s
protocol:
    description: property's protocol
    returned: always
    type: str
    sample: ipv4
property:
    description: property's name
    returned: always
    type: str
    sample: mtu
interface:
    description: interface name we want to set property on
    returned: always
    type: str
    sample: e1000g0
state:
    description: state of the target
    returned: always
    type: str
    sample: present
value:
    description: property's value
    returned: when value is provided
    type: str
    sample: 1280
(t
AnsibleModuletipv4tipv6tIfPropcB`s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cC`sm||_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_dS(Nt	interfacetprotocoltpropertytvaluet	temporarytstate(tmoduletparamsRR
RRRR(tselfR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pyt__init__ls	c	C`s�|jjd�g}|jd�|jd�|j|j�|jd�|j|j�|j|j�|jj|�\}}}|dkr�tS|jjdd|j|j|jfd|jd	|jd
|j�dS(Ntipadmsshow-ifprops-ps-mitmsgs+Unknown %s property "%s" on IP interface %sR
RR(	Rtget_bin_pathtappendRR
Rtrun_commandtTruet	fail_json(Rtcmdtrct_((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytproperty_existsvs


		cC`s�|jjd�g}|jd�|jd�|jd�|jd�|jd�|j|j�|jd�|j|j�|j|j�|jj|�\}}}|j�}|jd�\}}|d	kr�||kr�t	St
SdS(
NRsshow-ifprops-cs-oscurrent,defaults-ps-mt:i(RRRRR
RRtrstriptsplitRtFalse(RRRtoutRRtdefault((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytproperty_is_modified�s 





cC`s�|jjd�g}|jd�|jd�|jd�|jd�|jd�|j|j�|jd�|j|j�|j|j�|jj|�\}}}|j�}|dkr�|j|kr�t	St
SdS(	NRsshow-ifprops-cs-otcurrents-ps-mi(RRRRR
RRR"RRR$(RRRR%R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytproperty_is_set�s





cC`s�|jjd�g}|jd�|jr;|jd�n|jd�|j|jd|j�|jd�|j|j�|j|j�|jj|�S(NRs
set-ifprops-ts-pt=s-m(	RRRRRRR
RR(RR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytset_property�s
	

cC`s�|jjd�g}|jd�|jr;|jd�n|jd�|j|j�|jd�|j|j�|j|j�|jj|�S(NRsreset-ifprops-ts-ps-m(RRRRRR
RR(RR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytreset_property�s
	

(t__name__t
__module__RR R'R)R+R,(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pyRjs	
				cC`s�tdtdtdtdt�dtdtddg�dtdt�d	td
tdd�d
tdtd
dddg�dtd
dddddg��dt�}t|�}d}d}d}i}|j|d<|j|d<|j	|d
<|j
|d<|jr|j|d<n|j
dks4|j
dkr�|j�r�|j
�s�|jrh|jdt�n|j�\}}}|dkr�|jd|jd|jd
|j	d|d|�q�q�q�n�|j
dkr�|jdkr�|jdd�n|j�r�|j�s�|jr+|jdt�n|j�\}}}|dkr�|jd|jd|jd
|j	d|d|�q�q�q�n|dkr�t|d<n
t|d<|r�||d<n|r�||d<n|j|�dS(Nt
argument_specR
trequiredtchoicesRtaliasestnameRRR&ttypetboolRtnicRtpresenttabsenttresettsupports_check_modettchangediRRs'Value is mandatory with state "present"tstdouttstderr(RtdictRtSUPPORTED_PROTOCOLSR$tNoneRR
RRRRR R't
check_modet	exit_jsonR,RR)R+(RtifpropRR%terrtresult((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pytmain�sn	



							



t__main__N(t
__future__RRRR4t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR@tobjectRRGR-(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/ipadm_ifprop.pyt<module>s


+o	F

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