HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/microcloud.cpython-39.opt-1.pyc
a

\��h�
�@s.ddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�UbuntuPluginc@s(eZdZdZdZdZdZdZdd�ZdS)	�
MicroCloudz�The MicroCloud plugin collects the current status of the microcloud
    snap.

    It will collect journald logs as well as output from various microcloud
    commands.
    zMicroCloud Snap�
microcloud)�	container)rcCs�|jdd�gd�}|�dd�|D��d}|�d|�d��d	}|j|d
d�|�|�d�|�d
�|�d�g�ddd�ddd�ddd�g}|D]8}t�|�d��}|�d�}|jd|��d|��d�q�dS)Nzsnap.microcloud.*)Zunits)zcluster list�statusz	--versioncSsg|]}d|���qS)zmicrocloud �)�.0Zsubcmdrr�A/usr/lib/python3.9/site-packages/sos/report/plugins/microcloud.py�
<listcomp>&sz$MicroCloud.setup.<locals>.<listcomp>z-/var/snap/microcloud/common/state/cluster.crtzopenssl x509 -in z -noout -datesz*/var/snap/microcloud/common/state/databaseZls_microcloud_dqlite_dir)Zsuggest_filenamez
/cluster.yamlz
/info.yamlz/../daemon.yamlz/SELECT * FROM sqlite_master WHERE type="table";Zschema)�query�suggested_file_suffixz5SELECT id, name, expiry_date FROM core_token_records;Z
token_recordszvSELECT id, name, address, schema_internal, schema_external, heartbeat, role, api_extensions FROM core_cluster_members;Zcore_cluster_membersrr
zmicrocloud sql Zmicrocloud_sql_)Zadd_journalZadd_cmd_outputZadd_dir_listingZ
add_copy_spec�json�dumps�get)�selfZmicrocloud_subcmdsZ
dqlite_crtZdb_pathZqueriesZquery_entryrZfile_suffixrrr
�setupsH
�
�����	��
�zMicroCloud.setupN)	�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesrrrrr
rsr)rZsos.report.pluginsrrrrrrr
�<module>s