Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pyo

�
�Udac@`s~dZddlmZmZmZeZddlZddlm	Z	ddl
mZddlm
Z
defd��YZdS(	s�
The eos lacp 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_functionN(tdeepcopy(tutils(tLacpArgst	LacpFactscB`s2eZdZddd�Zdd�Zd�ZRS(s The eos lacp fact class
    tconfigtoptionscC`sj||_tj|_t|j�}|rN|rA|||}qT||}n|}tj|�|_dS(N(t_moduleRt
argument_specRRt
generate_dicttgenerated_spec(tselftmoduletsubspecRtspectfacts_argument_spec((sT/usr/lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pyt__init__s	
c
C`s|s|jd�}nd}d||f}gtj||tj�D]}|j�^qG}i}xB|D]:}	|	rl|j|j|	�}
|
r�|j|
�q�qlqlW|djdd�iid6}|rt
j|ji|d6�}t
j
|d�|d<n|dj|�|S(s� Populate the facts for lacp
        :param connection: the device connection
        :param ansible_facts: Facts dictionary
        :param data: previously collected configuration
        :rtype: dictionary
        :returns: facts
        s#show running-config | section ^lacptlacps(?:^|\n)%s.*?(?=(?:^|\n)%s|$)tansible_network_resourcesRN(tgettretfindalltDOTALLtstript
render_configRtupdatetpoptNoneRtvalidate_configR
tremove_empties(
R
t
connectiont
ansible_factstdatatresource_delimtfind_patterntpt	resourcestobjstresourcetobjtfactstparams((sT/usr/lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pytpopulate_facts(s&
1

cC`s3t|�}tj|d�|dd<tj|�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
        ssystem-prioritytsystemtpriority(RRtparse_conf_argR(R
RtconfR((sT/usr/lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pyRIs
N(t__name__t
__module__t__doc__RRR,R(((sT/usr/lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pyRs!(R3t
__future__RRRttypet
__metaclass__RtcopyRt#ansible.module_utils.network.commonRt2ansible.module_utils.network.eos.argspec.lacp.lacpRtobjectR(((sT/usr/lib/python2.7/site-packages/ansible/module_utils/network/eos/facts/lacp/lacp.pyt<module>
s

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