Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyc

�
�Udac@`s�dZddlmZmZmZeZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZydd	lmZeZWnek
r�eZnXd
efd��YZd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(tabsolute_importtdivisiontprint_function(tdeepcopy(tto_bytes(tutils(tLldp_globalArgs(tget_resource_config(tstring_types(tetreetLldp_globalFactscB`s)eZdZddd�Zdd�ZRS(s The junos lldp fact class
    tconfigtoptionscC`sj||_tj|_t|j�}|rN|rA|||}qT||}n|}tj|�|_dS(N(t_moduleRt
argument_specRRt
generate_dicttgenerated_spec(tselftmoduletsubspecRtspectfacts_argument_spec((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyt__init__!s	
c
C`sots|jjdd�n|s=d}t|d|�}nt|t�rjtjt|dd��}ni}t	|j
�}|jd�}|r|d}tj
|d	�|d
<tj
|d�|d<tj
|d
�|d<tj
|d�|d<tj
|ddd�rt|d<qntj|jitj|�d6�}	tj|	d�|d<|dj|�|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
        tmsgslxml is not installed.s�
                <configuration>
                    <protocols>
                        <lldp>
                        </lldp>
                    </protocols>
                </configuration>
                t
config_filterterrorstsurrogate_then_replacesconfiguration/protocols/lldpismanagement-addresstaddresssadvertisement-intervaltintervalstransmit-delayttransmit_delayshold-multiplierthold_multipliertdisabletdatattagtenableRtlldp_globaltansible_network_resources(tHAS_LXMLR
t	fail_jsonRt
isinstanceRR	t
fromstringRRRtxpathRtget_xml_conf_argtFalsetvalidate_configRtremove_emptiestupdate(
Rt
connectiont
ansible_factsR RtfactsRt	resourcest	lldp_roottparams((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pytpopulate_facts/s,
%N(t__name__t
__module__t__doc__RtNoneR5(((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/junos/facts/lldp_global/lldp_global.pyR
sN(R8t
__future__RRRttypet
__metaclass__tcopyRtansible.module_utils._textRt#ansible.module_utils.network.commonRtBansible.module_utils.network.junos.argspec.lldp_global.lldp_globalRt.ansible.module_utils.network.junos.utils.utilsRtansible.module_utils.sixRtlxmlR	tTrueR%tImportErrorR+tobjectR
(((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]