Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
dd
lmZde
fd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: onyx_lldp
version_added: "2.5"
author: "Samer Deeb (@samerd)"
short_description: Manage LLDP configuration on Mellanox ONYX network devices
description:
  - This module provides declarative management of LLDP service configuration
    on Mellanox ONYX network devices.
options:
  state:
    description:
      - State of the LLDP protocol configuration.
    default: present
    choices: ['present', 'absent']
sz
- name: Enable LLDP protocol
  onyx_lldp:
    state: present

- name: Disable LLDP protocol
  onyx_lldp:
    state: lldp
s�
commands:
  description: The list of configuration mode commands to send to the device
  returned: always.
  type: list
  sample:
    - lldp
(t
AnsibleModule(tBaseOnyxModule(tshow_cmdtOnyxLldpModulecB`sPeZdZdZed��Zd�Zd�Zd�Zd�Z	d�Z
RS(tLLDPsshow lldp localcC`s"tdtdddddg��S(Ntstatetdefaulttpresenttchoicestabsent(tdict(tcls((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pyt_get_element_spec;scC`s>|j�}t�}|j|�td|dt�|_dS(s module initialization
        t
argument_spectsupports_check_modeN(RRtupdateRtTruet_module(tselftelement_specR((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pytinit_moduleAs	
cC`sJt�|_|jj}i|dd6}|j|�|jj|�dS(NR
(Rt_required_configRtparamstvalidate_param_valuesR(Rt
module_paramsR((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pytget_required_configKs
cC`st|j|j�S(N(R
Rt
SHOW_LLDP_CMD(R((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pyt_get_lldp_configUscC`s�t�|_d}|j�p$t�}xE|D]=}|j|j�}|dk	r.|dkrgd}nPq.q.W||jd<dS(NRtenabledRR
(Rt_current_configR#tgett
LLDP_ENTRYtNone(RR
tconfigtitemt
lldp_state((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pytload_current_configXs
	cC`s\|jd}|jd}||krXd}|dkrEd|}n|jj|�ndS(NR
tlldpRsno %s(RR%t	_commandstappend(Rt	req_statet
curr_statetcmd((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pytgenerate_commandsds


(t__name__t
__module__R'R"tclassmethodRRR!R#R,R3(((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pyR7s	
	
		cC`stj�dS(s+ main entry point for module execution
    N(Rtmain(((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pyR7nst__main__N(t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt&ansible.module_utils.network.onyx.onyxR	R
RR7R4(((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_lldp.pyt<module>s



	7	

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