HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/bird.cpython-36.opt-1.pyc
3

-�_g�	�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�IndependentPluginc@s0eZdZdZdZd	Zd
ZdZdd�Zdd�Z	dS)�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�networkc#Cs�yNtdddd��6}x.|D]&}|jd�r|j|j�djd��qWWdQRXWn2tk
r�}z|jd|���WYdd}~XnX|jd	dg�|jd
ddd
ddddddddddddddddg�dS)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�
startswithZ
add_copy_spec�split�strip�	ExceptionZ
_log_debugZadd_cmd_output)�selfZbfile�line�err�r�/usr/lib/python3.6/bird.py�setups>

*"z
Bird.setupcCs|jddd�dS)Nz/etc/bird(.*)?.confz((.*password)\s\"(.*)\"(.*))z\2 *******\4)Zdo_path_regex_sub)rrrr�postprocAsz
Bird.postprocN)r)r)r)
�__name__�
__module__�__qualname__�__doc__Zplugin_nameZprofilesZpackagesZservicesrrrrrrrs'rN)Zsos.report.pluginsrrrrrrr�<module>s