Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/microk8s.cpython-36.pyc

3

�f��@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�UbuntuPluginc@s4eZdZdZdZdZd
ZdZdZdd�Z	dd�Z
d	S)�Microk8saThe Microk8s plugin collects the current status of the microk8s
    snap on a Ubuntu machine.

    It will collect logs from journald related to the snap.microk8s
    units as well as run microk8s commands to retrieve the configuration,
    status, version and loaded plugins.
    zThe lightweight Kubernetes�microk8s�	containercCs>|jdd�ddddddg}|jd	�|jd
d�|D��dS)Nzsnap.microk8s.*)Zunitszaddons repo list�configzctr plugins lszctr plugins ls -dZstatus�versionz4/var/snap/microk8s/current/credentials/client.configcSsg|]}d|���qS)z	microk8s �)�.0Zsubcmdr	r	�/usr/lib/python3.6/microk8s.py�
<listcomp>0sz"Microk8s.setup.<locals>.<listcomp>)Zadd_journalZ
add_copy_specZadd_cmd_output)�selfZmicrok8s_subcmdsr	r	r�setup szMicrok8s.setupcCs@d}|jd|d�dddg}ddj|��d	�}|jd
|d�dS)Nz((certificate-authority-data:|token:)\s.*rz\1 "**********"zcertificate-authority-datazclient-certificate-datazclient-key-dataz(^\s*(�|z
)\s*:\s*)(.*)z4/var/snap/microk8s/current/credentials/client.configz\1*********)Zdo_cmd_output_sub�joinZdo_path_regex_sub)r
ZrsubZprotect_keysZ	key_regexr	r	r�postproc3szMicrok8s.postprocN)r)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesZmicrok8s_cmdrrr	r	r	rrsrN)Zsos.report.pluginsrrrr	r	r	r�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists