Anons79 Mini Shell

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

�
�Udac@`srdZddlmZmZmZeZddlmZddl	m
Z
ddlmZde
fd��YZdS(	s�
The ios lldp_global 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 ios lldp_global fact class
    tconfigtoptionscC`sj||_tj|_t|j�}|rN|rA|||}qT||}n|}tj|�|_dS(N(t_moduleRt
argument_specRRt
generate_dicttgenerated_spec(tselftmoduletsubspecRtspectfacts_argument_spec((sb/usr/lib/python2.7/site-packages/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.pyt__init__s	
c
C`s�t�}|s!|jd�}n|jd�}xB|D]:}|r7|j|j|�}|rq|j|�qqq7q7Wi}|r�tj|jitj	|�d6�}	tj	|	d�|d<n|dj|�|S(s� Populate the facts for lldp_global
        :param connection: the device connection
        :param ansible_facts: Facts dictionary
        :param data: previously collected conf
        :rtype: dictionary
        :returns: facts
        s#show running-config | section ^lldps
Rtlldp_globaltansible_network_resources(
tdicttgettsplitt
render_configRtupdateRtvalidate_configR
tremove_empties(
R
t
connectiont
ansible_factstdatatobjsRtconftobjtfactstparams((sb/usr/lib/python2.7/site-packages/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.pytpopulate_facts(s	
%cC`s�t|�}tj|d�}tj|d�}tj|d�}|r[t|�|d<nd|krtt|d<n|r�t|�|d<n|r�t|�|d<ntj|�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
        s
lldp holdtimes
lldp timerslldp reinittholdtimeslldp runtenabledttimertreinit(RRtparse_conf_argtinttTrueR(R
RR RR%R'R(((sb/usr/lib/python2.7/site-packages/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.pyRCs	
N(t__name__t
__module__t__doc__RtNoneR$R(((sb/usr/lib/python2.7/site-packages/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.pyRsN(R.t
__future__RRRttypet
__metaclass__tcopyRt#ansible.module_utils.network.commonRt@ansible.module_utils.network.ios.argspec.lldp_global.lldp_globalRtobjectR(((sb/usr/lib/python2.7/site-packages/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.pyt<module>s

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