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/dladm_linkprop.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZdefd
��YZ
d�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys9
---
module: dladm_linkprop
short_description: Manage link properties on Solaris/illumos systems.
description:
    - Set / reset link properties on Solaris/illumos systems.
version_added: "2.3"
author: Adam Števko (@xen0l)
options:
    link:
        description:
            - Link interface name.
        required: true
        aliases: [ "nic", "interface" ]
    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 link property.
        required: false
    temporary:
        description:
            - Specifies that lin property configuration is temporary. Temporary
              link property configuration does not persist across reboots.
        required: false
        type: bool
        default: false
    state:
        description:
            - Set or reset the property value.
        required: false
        default: "present"
        choices: [ "present", "absent", "reset" ]
s-
- name: Set 'maxbw' to 100M on e1000g1
  dladm_linkprop: name=e1000g1 property=maxbw value=100M state=present

- name: Set 'mtu' to 9000 on e1000g1
  dladm_linkprop: name=e1000g1 property=mtu value=9000

- name: Reset 'mtu' property on e1000g1
  dladm_linkprop: name=e1000g1 property=mtu state=reset
s�
property:
    description: property name
    returned: always
    type: str
    sample: mtu
state:
    description: state of the target
    returned: always
    type: str
    sample: present
temporary:
    description: specifies if operation will persist across reboots
    returned: always
    type: bool
    sample: True
link:
    description: link name
    returned: always
    type: str
    sample: e100g0
value:
    description: property value
    returned: always
    type: str
    sample: 9000
(t
AnsibleModuletLinkPropcB`sGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cC`su||_|jd|_|jd|_|jd|_|jd|_|jd|_|jjdt�|_	dS(Ntlinktpropertytvaluet	temporarytstatetdladm(
tmoduletparamsR
RRR
Rtget_bin_pathtTruet	dladm_bin(tselfR((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pyt__init__bs	cC`s�|jg}|jd�|jd�|j|j�|j|j�|jj|�\}}}|dkrqtS|jjdd|j|jfd|jd|j�dS(Ns
show-linkprops-pitmsgs Unknown property "%s" on link %sRR
(RtappendRR
Rtrun_commandRt	fail_json(Rtcmdtrct_((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytproperty_existsms

	cC`s�|jg}|jd�|jd�|jd�|jd�|jd�|j|j�|j|j�|jj|�\}}}|j�}|jd�\}}|dkr�||kr�tSt	SdS(Ns
show-linkprops-cs-os
value,defaults-pt:i(
RRRR
RRtrstriptsplitRtFalse(RRRtoutRRtdefault((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytproperty_is_modifieds




cC`s�|jg}|jd�|jd�|jd�|jd�|jd�|j|j�|j|j�|jj|�\}}}|j�}|dkr�|dkr�tStSdS(Ns
show-linkprops-cs-otperms-pisr-(	RRRR
RRR RR"(RRRR#R((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytproperty_is_readonly�s




cC`s�|jg}|jd�|jd�|jd�|jd�|jd�|j|j�|j|j�|jj|�\}}}|j�}|dkr�|j|kr�tSt	SdS(Ns
show-linkprops-cs-oRs-pi(
RRRR
RRR RRR"(RRRR#R((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytproperty_is_set�s




cC`sz|jg}|jd�|jr2|jd�n|jd�|j|jd|j�|j|j�|jj|�S(Nsset-linkprops-ts-pt=(RRR
RRR
RR(RR((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytset_property�s
	
cC`so|jg}|jd�|jr2|jd�n|jd�|j|j�|j|j�|jj|�S(Nsreset-linkprops-ts-p(RRR
RR
RR(RR((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytreset_property�s
	
(	t__name__t
__module__RRR%R'R(R*R+(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pyR	`s						cC`s�tdtdtdtddddddd	g�d
tdtddddg�dtdtdd�d
tdtdd�dtddddddg��ddddgggdt�}t|�}d}d}d}i}|j|d
<|j|d<|j|d<|j	r|j	|d<n|jdks<|jdkr�|j
�r�|j�s�|jrp|j
dt�n|j�\}}}|dkr�|jd
|jd|jd|d|�q�q�q�n�|jdkr�|j
�r�|j�sf|j�s�|jr|j
dt�n|j�\}}}|dkrc|jd
|jd|jd|d|�qcq�q�|jdd|jd
|jd|j�q�n|dkr�t|d<n
t|d<|r�||d<n|r�||d<n|j
|�dS(Nt
argument_specR
trequiredR$ttypetstrtaliasestnict	interfaceRtnameRR
tboolRtpresenttchoicestabsenttresettrequired_iftsupports_check_modettchangediRRsProperty "%s" is read-only!tstdouttstderr(RtdictRtNoneR"R	RR
RRRR%t
check_modet	exit_jsonR+RR'R(R*(RtlinkpropRR#terrtresult((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pytmain�sl'	


						



t__main__N(t
__future__RRRR0t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRtobjectR	RHR,(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_linkprop.pyt<module>s


'y	H

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