File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/containers_common.cpython-36.pyc
3
-�_g�
� @ s8 d dl Z d dlmZmZmZmZ G dd� deee�ZdS )� N)�Plugin�RedHatPlugin�UbuntuPlugin� PluginOptc @ s6 e Zd ZdZdZdZd
Zeddedd�gZ d d
� Z
dS )�ContainersCommonz;Common container configs under {/etc,/usr/share}/containersZcontainers_common� container�containers-common�
rootlessusers� z,colon-delimited list of users to collect for)�defaultZval_typeZdescc s� | j ddddg� | jddi� | jd�}g }|rFdd � |jd
�D �}ddd
dddddddddddddddddg}xZ|D ]R� tjjd� � ��}| j |� d �� | jd!� � �� | j� fd"d �|D �d#d$� qxW d S )%Nz/etc/containers/*z/usr/share/containers/*z/etc/subuidz/etc/subgidz/etc/containers/policy.jsonZcontainers_policyr c S s g | ]}|r|�qS � r )�.0�xr r �'/usr/lib/python3.6/containers_common.py�
<listcomp>) s z*ContainersCommon.setup.<locals>.<listcomp>�:zpodman infoz%podman unshare cat /proc/self/uid_mapz%podman unshare cat /proc/self/gid_mapz
podman imageszpodman images --digestsz
podman pod pszpodman port --allz podman pszpodman ps -azpodman stats --no-stream --allzpodman versionzpodman volume lszbuildah infoz&buildah unshare cat /proc/self/uid_mapz&buildah unshare cat /proc/self/gid_mapzbuildah containerszbuildah containers --allzbuildah imageszbuildah images --allzbuildah version�~z/.config/containers/zloginctl user-status c s g | ]}d � � d|� ��qS )zmachinectl -q shell z@ /usr/bin/r )r
�cmd)�userr r r J s T)Z
foreground)Z
add_copy_specZ
add_file_tagsZ
get_option�split�os�path�
expanduserZadd_cmd_output)�selfZ users_optZ
users_listZuser_subcmdsZ
expanded_userr )r r �setup sP
zContainersCommon.setupN)r )r )�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesr �strZoption_listr r r r r r s
r )r Zsos.report.pluginsr r r r r r r r r �<module> s