a >h @s.ddlZddlmZmZGdddeeZdS)N)Plugin UbuntuPluginc@s(eZdZdZdZdZdZdZddZdS) MicroCloudzThe 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|jddgd}|dd|Dd}|d|dd }|j|d d ||d |d |dgdddddddddg}|D]8}t|d}|d}|jd|d|d qdS)Nzsnap.microcloud.*)Zunits)z cluster liststatusz --versioncSsg|]}d|qS)z microcloud ).0ZsubcmdrrA/usr/lib/python3.9/site-packages/sos/report/plugins/microcloud.py &sz$MicroCloud.setup..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)querysuggested_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_)Z add_journalZadd_cmd_outputZadd_dir_listingZ add_copy_specjsondumpsget)selfZmicrocloud_subcmdsZ dqlite_crtZdb_pathZqueriesZ query_entryr Z file_suffixrrr setupsH     zMicroCloud.setupN) __name__ __module__ __qualname____doc__Z short_descZ plugin_nameZprofilesZpackagesrrrrr rs r)rZsos.report.pluginsrrrrrrr  s