�
�Udac @` s� d Z d d l m Z m Z m Z e Z d d l m Z d d l m
Z
d d l m Z d d l
m Z d d l m Z d d l m Z y d d l m Z e Z Wn e k
r� e Z n Xd
e f d � � YZ d S(
s�
The junos lldp fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based on the configuration.
i ( t absolute_importt divisiont print_function( t deepcopy( t to_bytes( t utils( t Lldp_globalArgs( t get_resource_config( t string_types( t etreet Lldp_globalFactsc B` s) e Z d Z d d d � Z d d � Z RS( s The junos lldp fact class
t configt optionsc C` sj | | _ t j | _ t | j � } | rN | rA | | | } qT | | } n | } t j | � | _ d S( N( t _moduleR t
argument_specR R t
generate_dictt generated_spec( t selft modulet subspecR t spect facts_argument_spec( ( sd /usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyt __init__! s
c
C` so t s | j j d d � n | s= d } t | d | �} n t | t � rj t j t | d d �� } n i } t | j
� } | j d � } | r| d } t j
| d � | d
<t j
| d � | d <t j
| d
� | d <t j
| d � | d <t j
| d d d �rt | d <qn t j | j i t j | � d 6� } t j | d � | d <| d j | � | S( s Populate the facts for interfaces
:param connection: the device connection
:param data: previously collected configuration as lxml ElementTree root instance
or valid xml sting
:rtype: dictionary
:returns: facts
t msgs lxml is not installed.s�
<configuration>
<protocols>
<lldp>
</lldp>
</protocols>
</configuration>
t
config_filtert errorst surrogate_then_replaces configuration/protocols/lldpi s management-addresst addresss advertisement-intervalt intervals transmit-delayt transmit_delays hold-multipliert hold_multipliert disablet datat tagt enableR t lldp_globalt ansible_network_resources( t HAS_LXMLR
t fail_jsonR t
isinstanceR R t
fromstringR R R t xpathR t get_xml_conf_argt Falset validate_configR t remove_emptiest update(
R t
connectiont
ansible_factsR R t factsR t resourcest lldp_roott params( ( sd /usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyt populate_facts/ s,
%N( t __name__t
__module__t __doc__R t NoneR5 ( ( ( sd /usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyR
s N( R8 t
__future__R R R t typet
__metaclass__t copyR t ansible.module_utils._textR t# ansible.module_utils.network.commonR tB ansible.module_utils.network.junos.argspec.lldp_global.lldp_globalR t. ansible.module_utils.network.junos.utils.utilsR t ansible.module_utils.sixR t lxmlR t TrueR% t ImportErrorR+ t objectR
( ( ( sd /usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyt <module> s
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]