Anons79 Mini Shell

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

�
�Udac@`srdZddlmZmZmZeZddlmZddl	m
Z
ddlmZde
fd��YZdS(	s�
The iosxr 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(tutils(tLldp_globalArgstLldp_globalFactscB`s2eZdZddd�Zdd�Zd�ZRS(s The iosxr lldp fact class
    tconfigtoptionscC`sj||_tj|_t|j�}|rN|rA|||}qT||}n|}tj|�|_dS(N(t_moduleRt
argument_specRRt
generate_dicttgenerated_spec(tselftmoduletsubspecRtspectfacts_argument_spec((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/iosxr/facts/lldp_global/lldp_global.pyt__init__s	
cC`s�|s|jdd�}ni}|rN|j|j|�}|rN|}qNn|djdd�i}tj|ji|d6�}tj|d�|d<|dj	|�|S(s� Populate the facts for lldp
        :param connection: the device connection
        :param ansible_facts: Facts dictionary
        :param data: previously collected conf
        :rtype: dictionary
        :returns: facts
        tflagstlldptansible_network_resourcestlldp_globalRN(
t
get_configt
render_configRtpoptNoneRtvalidate_configR
tremove_emptiestupdate(R
t
connectiont
ansible_factstdatatobjtlldp_objtfactstparams((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/iosxr/facts/lldp_global/lldp_global.pytpopulate_facts)scC`s�t|�}x�|j�D]�}|dkrJd|kr=tnd||<q|dkr�x�dddddgD];}d	j|jd
d��|kr�tnd|||<qlWqtj||�}|r�t	|�n|||<qW|S(
s
        Render config as dictionary structure and delete keys
          from spec for null values

        :param spec: The facts tree, generated from the argspec
        :param conf: The configuration
        :rtype: dictionary
        :returns: The generated config
        t
subinterfacesssubinterfaces enablet
tlv_selecttsystem_nametport_descriptiontmanagement_addresstsystem_descriptiontsystem_capabilitiess{0} disablet_t-N(
RtkeystTrueRtformattreplacetFalseRtparse_conf_argtint(R
RtconfRtkeytitemtvalue((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/iosxr/facts/lldp_global/lldp_global.pyRCs
< N(t__name__t
__module__t__doc__RRR%R(((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/iosxr/facts/lldp_global/lldp_global.pyRsN(R<t
__future__RRRttypet
__metaclass__tcopyRt#ansible.module_utils.network.commonRtBansible.module_utils.network.iosxr.argspec.lldp_global.lldp_globalRtobjectR(((sd/usr/lib/python2.7/site-packages/ansible/module_utils/network/iosxr/facts/lldp_global/lldp_global.pyt<module>s

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