Anons79 Mini Shell

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

�
�Udac@`s	ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZmZddl
mZmZmZddl
mZmZmZeZd�Zd�Zd�Zd�Zd�Zedkre�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiont
deprecatedtstatustnetworktsupported_bys%
---
module: junos_lldp
version_added: "2.4"
author: "Ganesh Nalawade (@ganeshrn)"
short_description: Manage LLDP configuration on Juniper JUNOS network devices
description:
  - This module provides declarative management of LLDP service
    on Juniper JUNOS network devices.
deprecated:
  removed_in: "2.13"
  why: Updated modules released with more functionality
  alternative: Use M(junos_lldp_global) instead.
options:
  interval:
    description:
      - Frequency at which LLDP advertisements are sent (in seconds).
  transmit_delay:
    description:
      - Specify the number of seconds the device waits before sending
        advertisements to neighbors after a change is made in local system.
  hold_multiplier:
    description:
      - Specify the number of seconds that LLDP information is held before it is
        discarded. The multiplier value is used in combination with the
        C(interval) value.
  state:
    description:
      - Value of C(present) ensures given LLDP configuration
        is present on device and LLDP is enabled, for value of C(absent)
        LLDP configuration is deleted and LLDP is in disabled state.
        Value C(enabled) ensures LLDP protocol is enabled and LLDP configuration
        if any is configured on remote device, for value of C(disabled) it ensures
        LLDP protocol is disabled any LLDP configuration if any is still present.
    default: present
    choices: ['present', 'absent', 'enabled', 'disabled']
  active:
    description:
      - Specifies whether or not the configuration is active or deactivated
    default: True
    type: bool
requirements:
  - ncclient (>=v0.5.2)
notes:
  - This module requires the netconf system service be enabled on
    the remote device being managed.
  - Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
  - Recommended connection is C(netconf). See L(the Junos OS Platform Options,../network/user_guide/platform_junos.html).
  - This module also works with C(local) connections for legacy playbooks.
extends_documentation_fragment: junos
sz
- name: Enable LLDP service
  junos_lldp:
    state: enabled

- name: Disable LLDP service
  junos_lldp:
    state: disabled

- name: Set LLDP parameters
  junos_lldp:
    interval: 10
    hold_multiplier: 5
    transmit_delay: 30
    state: present

- name: Delete LLDP parameters
  junos_lldp:
    interval: 10
    hold_multiplier: 5
    transmit_delay: 30
    state: absent
s.
diff.prepared:
  description: Configuration difference before and after applying change.
  returned: when configuration is changed and diff option is enabled.
  type: str
  sample: >
        [edit]
        +  protocols {
        +      lldp {
        +          disable;
        +      }
        +  }
N(t
AnsibleModule(tjunos_argument_specttostring(tload_configtmap_params_to_objtmap_obj_to_ele(tcommit_configurationtdiscard_changest
locked_configcC`s3d|kodkns/|jdd�ndS(Nii�tmsgs$interval must be between 5 and 32768(t	fail_json(tvaluetmodule((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pytvalidate_intervalsscC`s3d|kodkns/|jdd�ndS(Nii�Rs(hold_multiplier must be between 2 and 10(R(RR((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pytvalidate_hold_multiplierxscC`s3d|kodkns/|jdd�ndS(Nii Rs'transmit_delay must be between 2 and 10(R(RR((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pytvalidate_transmit_delay}scC`sSxL|D]D}t�jd|�}t|�r||jj|�|�qqWdS(Nsvalidate_%s(tglobalstgettcallabletparams(Rtobjtkeyt	validator((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pytvalidate_param_values�s
cC`sRtdtdd�dtdd�dtdd�dtddd	dd
ddg�d
tdtdd��}|jt�td|dt�}t�}itd6}|r�||d<nd}tj�}|jdidd6td6fdidd6td6fdidd6td6fdidd6td6td6fg�|j	j
�}|jd�}|d"kritnt|d<|d#kr�d|d<nt||d|�}t
|||d|�}	t|��zt|t|	�|dd�}
|j}|
r;|rt|�n
t|�t|d<|jr;i|
d6|d <q;nWd!QX|j|�d!S($s+ main entry point for module execution
    tintervalttypetintttransmit_delaythold_multipliertstatetdefaulttpresenttchoicestabsenttenabledtdisabledtactivetboolt
argument_spectsupports_check_modetchangedtwarningssprotocols/lldpsadvertisement-intervaltxpatht	leaf_onlystransmit-delayshold-multipliertdisablettag_onlytis_keytparamtactiontmergetpreparedtdiffN(R+R)(R*R+(tdicttTruetupdateR	RtlisttFalsetcollectionstOrderedDictRtcopyRRR
RRR
t
check_modeRRt_difft	exit_json(R.RR1tresultttoptparam_to_xpath_maptitemR%twantteleR;tcommit((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pytmain�sL!
		

%





	t__main__(t
__future__RRRR!t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRAtansible.module_utils.basicRt(ansible.module_utils.network.junos.junosR	R
RRR
RRRR=tUSE_PERSISTENT_CONNECTIONRRRRRNt__name__(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_lldp.pyt<module>s(


5					<

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