U
    -_g)                     @   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)Znetwork)z/etc/frr/zebra.conf)r   c                 C   sX   d}|  d|d g | drTdddddd	d
dddddg}| jdd |D dd 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 '' ).0Zsubcmdr   r   8/usr/lib/python3/dist-packages/sos/report/plugins/frr.py
<listcomp>7   s     zFrr.setup.<locals>.<listcomp>)Z	container)Zadd_copy_specZcontainer_existsZadd_cmd_output)selfZvar_ansible_genZsubcmdsr   r   r	   setup   s.    
z	Frr.setupN)__name__
__module____qualname____doc__Z
short_descZplugin_nameZprofilesfilesZpackagesZ
containersr   r   r   r   r	   r      s   	r   N)Zsos.report.pluginsr   r   r   r   r   r   r	   <module>	   s   