o
    O6uf)  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚRedHatPluginc                   @   s0   e Zd ZdZdZdZdZdZdZdZ	dd„ Z
d	S )
ÚFrraG  
    FRR is a routing project that provides numerous traditional routing
    protocols for Linux platforms. In particular, OpenStack uses FRR to provide
    BGP functionality for the overcloud nodes.

    This plugin is primarily designed the deployment of FRR within OSP
    environments, which deploy FRR in a container.
    zFrr routing serviceÚfrr)Únetwork)z/etc/frr/zebra.conf)r   c                 C   sH   d}|   d|d g¡ |  d¡r"g d¢}| jdd„ |D ƒdd� d S d S )Nz*/var/lib/config-data/ansible-generated/frrz	/etc/frr/r   )zshow bgp detailzshow bgp neighborszshow bgp summaryzshow historyzshow ip bgp detailzshow ip bgp neighborszshow ip bgp summaryzshow ip bgpzshow ip routezshow ipv6 routezshow running-configzshow versionc                 S   s   g | ]}d |› d�‘qS )z
vtysh -c 'ú'© )Ú.0Úsubcmdr   r   ú8/usr/lib/python3/dist-packages/sos/report/plugins/frr.pyÚ
<listcomp>7   s    zFrr.setup.<locals>.<listcomp>)Ú	container)Úadd_copy_specÚcontainer_existsÚadd_cmd_output)ÚselfÚvar_ansible_genÚsubcmdsr   r   r   Úsetup   s   þ

þðz	Frr.setupN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
short_descÚplugin_nameÚprofilesÚfilesÚpackagesÚ
containersr   r   r   r   r   r      s    	r   N)Úsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   