Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/bird.cpython-312.pyc
�

-�_g�	��,�ddlmZmZGd�dee�Zy)�)�Plugin�IndependentPluginc�,�eZdZdZdZdZdZdZd�Zd�Z	y)�Birdz�BIRD is an Internet Routing Daemon used in many *nix and nix-like
    distributions. This plugin will capture the configuration files for a local
    bird installation, as well as runtime information and metrics.
    �bird)�network)rc��	tddd��5}|D]E}|jd�s�|j|j�dj	d���G	ddd�|jd	dg�|jgd
��y#1swY�0xYw#t
$r}|j
d|���Yd}~�Ud}~wwxYw)Nz/etc/bird.conf�rzutf-8)�encoding�log��"zUnable to parse bird.conf: z/etc/bird/*)zbirdc show statuszbirdc show memoryzbirdc show protocols allzbirdc show interfaceszbirdc show route allzbirdc show symbolszbirdc show bfd sessionszbirdc show babel interfaceszbirdc show babel neighborszbirdc show babel entrieszbirdc show babel routeszbirdc show ospfzbirdc show ospf neighborszbirdc show ospf interfacezbirdc show ospf topologyzbirdc show ospf state allzbirdc show ospf lsadbzbirdc show rip interfaceszbirdc show rip neighborszbirdc show static)�open�
startswith�
add_copy_spec�split�strip�	Exception�
_log_debug�add_cmd_output)�self�bfile�line�errs    �9/usr/lib/python3/dist-packages/sos/report/plugins/bird.py�setupz
Bird.setups���	A��&��g�>�
G�%�!�G�D����u�-��*�*�4�:�:�<��?�+@�+@��+E�F�G�
G�	
�����
�	�
	
���
�	�
G�
G��
�	A��O�O�9�#��?�@�@��	A�s3�B�B�3B�B�B�B�	B>� B9�9B>c�*�|jddd�y)Nz/etc/bird(.*)?.confz((.*password)\s\"(.*)\"(.*))z\2 *******\4)�do_path_regex_sub)rs r�postprocz
Bird.postprocAs�����4�>�.�	0�N)
�__name__�
__module__�__qualname__�__doc__�plugin_name�profiles�packages�servicesrr�r rrrs(���
�K��H��H��H�%�N0r rN)�sos.report.pluginsrrrr)r r�<module>r+s��9�50�6�$�50r