File: //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/microovn.cpython-312.pyc
�
([Qh� � �4 � d dl Z d dlmZmZ G d� dee� Zy)� N)�Plugin�UbuntuPluginc �* � e Zd ZdZdZdZdZdZdZd� Z y)�MicroOVNz�The MicroOVN plugin collects the current status of the microovn
snap.
It will collect journald logs as well as output from various microovn
commands.
z
MicroOVN Snap�microovn)�network�virt)r c �� � | j d�� g d�}| j |D �cg c] }d|� ��� c}� d}| j d|� d�� d}| j |d �
� | j |� d�|� d�|� d
�g� ddd�ddd�ddd�ddd�ddd�g}|D ]P }t j
|j
d� � }|j
d� }| j d|� �d|� ��
� �R y c c}w )Nzsnap.microovn.*)�units)zcluster list�statuszcertificates listz --versionz microovn z+/var/snap/microovn/common/state/cluster.crtzopenssl x509 -in z -noout -datesz(/var/snap/microovn/common/state/database�ls_microovn_dqlite_dir)�suggest_filenamez
/info.yamlz
/cluster.yamlz/../daemon.yamlz/SELECT * FROM sqlite_master WHERE type="table";�schema)�query�suggested_file_suffixzgSELECT * FROM config WHERE NOT ( key LIKE "%keyring%" OR key LIKE "%ca_cert%" OR key LIKE "%ca_key%" );�configzSELECT * FROM services;�servicesz5SELECT id, name, expiry_date FROM core_token_records;�
token_recordszvSELECT id, name, address, schema_internal, schema_external, heartbeat, role, api_extensions FROM core_cluster_members;�core_cluster_membersr r zmicroovn cluster sql �microovn_cluster_sql_)�add_journal�add_cmd_output�add_dir_listing�
add_copy_spec�json�dumps�get) �self�microovn_subcmds�subcmd�
dqlite_crt�db_path�queries�query_entryr �file_suffixs �=/usr/lib/python3/dist-packages/sos/report/plugins/microovn.py�setupzMicroOVN.setup sr � ����0��1�
��
���/?�
�%+�i��x� �
� � C�
�����
�|�>�:�
� =��
����5� �
�
����)�:�&��)�=�)��)�?�+�
� � M�)1�
�/�
*2�
� 3�)3�
�/� *9�
�1� *@�
�3!
��F #� �K��J�J�{���w�7�8�E�%�/�/�*A�B�K����'��w�/�#8��
�!F�
�
� ��u
s �C.N)
�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�packages�commandsr'