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__/clear_containers.cpython-36.pyc

3

�fU
�@s.ddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@sBeZdZdZdZdZdZefZdZdZ	d	d
�Z
dd�Zd
d�ZdS)�ClearContainersz'Intel(R) Clear Containers configurationZclear_containers�system�virt�	containerz
cc-runtime�cc-proxyNcCsZdg}|j�d�}|j|�d}x"|j�D]}|dkr*|j|�q*Wt|�}|j|�dS)z' Collect Clear Containers config files z_/etc/clear-containers/configuration.toml/usr/share/defaults/clear-containers/configuration.tomlz --cc-show-default-config-paths�output�N)�runtime�exec_cmd�
splitlines�append�set�
add_copy_spec)�selfZconfig_files�cmdZconfigs�config�r�&/usr/lib/python3.6/clear_containers.py�collect_cc_config_filessz'ClearContainers.collect_cc_config_filescCsvdg}|j�d�}|j|�d}x:|j�D].}tjd|�}|r*|jd�}|rV|j|�Pq*Wt|�}|j||j	�dS)z$ Collect Clear Containers log files z-/var/lib/clear-containers/runtime/runtime.logz cc-envr	z\bGlobalLogPath\b\s+=\s+"(.+)"�N)
rrr
�re�search�grouprrr�loglimit)rZ	log_filesrr	�line�resultZglobal_logfilerrr�collect_cc_log_files/s

z$ClearContainers.collect_cc_log_filescCsN|jd�|_|jd�rd|_|j|j�d��|j�|j�|jdd�dS)NZlog_sizeZall_logsz cc-envzcc-shim)Z
identifier)Z
get_optionrZadd_cmd_outputrrrZadd_journal)rrrr�setupGs
zClearContainers.setup)rrr)r)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesrZpackagesZservicesrrrrrrrrr
sr)rZsos.report.pluginsrrrrrrr�<module>	s

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