
    Vh
                     j    d dl mZmZmZ eZdZdZdZd dl	m
Z
 d dlmZmZ d Zd Zed	k(  r e        y
y
)    )absolute_importdivisionprint_functiona>  
module: eos_lldp
author: Ganesh Nalawade (@ganeshrn)
short_description: Manage LLDP configuration on Arista EOS network devices
description:
- This module provides declarative management of LLDP service on Arista EOS network
  devices.
version_added: 1.0.0
notes:
- Tested against Arista EOS 4.24.6F
options:
  state:
    description:
    - State of the LLDP configuration. If value is I(present) lldp will be enabled
      else if it is I(absent) it will be disabled.
    default: present
    type: str
    choices:
    - present
    - absent
    - enabled
    - disabled
z
- name: Enable LLDP service
  arista.eos.eos_lldp:
    state: present

- name: Disable LLDP service
  arista.eos.eos_lldp:
    state: absent
z
commands:
  description: The list of configuration mode commands to send to the device
  returned: always, except for the platforms that use Netconf transport to manage the device.
  type: list
  sample:
    - lldp run
)AnsibleModule)
get_configload_configc                 2    t        | dg      }d}d|vrd}|S )Nz| section lldp)flagsFno lldp runT)r   )moduleconfigis_lldp_enables      g/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/arista/eos/plugins/modules/eos_lldp.pyhas_lldpr   ?   s*    '7&89FNF"    c                  *   t        t        dg d            } t        | d      }t               }ddi}|r||d	<   t        |      }g }|j                  d
   dk(  r|r|j                  d       n%|j                  d
   dk(  r|s|j                  d       ||d<   |rg|j                   }t        |||      }|j                  d      r"|j                  rd|j                  d      i|d<   |j                  d      |d<   d|d<    |j                  di | y)z%main entry point for module executionpresent)r   absentenableddisabled)defaultchoices)stateT)argument_specsupports_check_modechangedFwarningsr   r   r   zlldp runcommands)commitdiffpreparedsessionsession_nameN )dictr   listr   paramsappend
check_moder   get_diff	exit_json)r   r   r   resultHAS_LLDPr   r   responses           r   mainr0   I   s   @
M # F
 vHF%zHH}}W)h&	w	9	,X
#!F:&&&vx?<<FLL((,,v*>?F6N!)i!8~ yFvr   __main__N)
__future__r   r   r   type__metaclass__DOCUMENTATIONEXAMPLESRETURNansible.module_utils.basicr   Cansible_collections.arista.eos.plugins.module_utils.network.eos.eosr   r   r   r0   __name__r$   r   r   <module>r;      sS    A @ 0
 5(V zF r   