File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/containers_common.cpython-310.pyc
o
([Qh�
� @ s8 d dl Z d dlmZmZmZmZ G dd� deee�ZdS )� N)�Plugin�RedHatPlugin�UbuntuPlugin� PluginOptc @ s6 e Zd ZdZdZdZdZeddedd�gZ d d
� Z
dS )�ContainersCommonz;Common container configs under {/etc,/usr/share}/containers�containers_common)� container)zcontainers-common�
rootlessusers� z,colon-delimited list of users to collect for)�default�val_type�descc s� | � g d�� | �ddi� | �d�}g }|r!dd� |�d�D �}g d�}|D ])� tj�d � � ��}| � |� d
�� | �d� � �� | j� fdd�|D �d
d� q'd S )N)z/etc/containers/*z/usr/share/containers/*z/etc/subuidz/etc/subgidz/etc/containers/policy.json�containers_policyr c S s g | ]}|r|�qS � r )�.0�xr r �F/usr/lib/python3/dist-packages/sos/report/plugins/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 I s ��T)�
foreground)�
add_copy_spec�
add_file_tags�
get_option�split�os�path�
expanduser�add_cmd_output)�self� users_opt�
users_list�user_subcmds�
expanded_userr r r �setup s* �
����zContainersCommon.setupN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr �str�option_listr'