File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/bridge.cpython-310.pyc
o
�N�g�) � @ s d Z ddlZddlZddlZddiZg d�Zdd� Zdd � Zd8d
d�Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zd8dd�Zd8dd�Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd8d&d'�Zd(d� Zd8d)d*�Zd+d,� Zd8d-d.�Zd8d/d0�Zd9d1d2�Zd9d3d4�Zd:d6d7�ZdS );z8
Module for gathering and managing bridging information
� N�list_�list)�FreeBSD�NetBSD�OpenBSDc C sD ddddd�} t d }| D ]}||krtjj�| | �r dS q
dS )zZ
Confirm this module is supported by the OS and the system has
required tools
�ifconfig�brctl�brconfig)r �Linuxr r �kernelT)Fz�The bridge execution module failed to load: requires one of the following tool/os combinations: ifconfig on FreeBSD/OpenBSD, brctl on Linux or brconfig on NetBSD.)�
__grains__�salt�utils�path�which)Zsupported_os_toolZcur_os�_os� r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/bridge.py�__virtual__ s ��r c C s t jj�| �S )z&
Internal, returns tools path
)r
r r r )Zostoolr r r �
_tool_path( s r c C s� t d�}| r|� d| � �}n|� d�}i }td |dd��� D ]F}|�d�r'q|�� }|s.qt|�dkrR|d }|d |d
d�||<