a >h @s8ddlZddlmZmZmZmZGdddeeeZdS)N)Plugin RedHatPlugin UbuntuPlugin PluginOptc@s6eZdZdZdZdZdZeddeddgZ d d Z d S) ContainersCommonz;Common container configs under {/etc,/usr/share}/containersZcontainers_common) container)zcontainers-common rootlessusersz,colon-delimited list of users to collect for)defaultZval_typeZdesccs|gd|ddi|d}g}|rBdd|dD}gd}|D]Rtjd }||d |d |jfd d|Dd dqNdS)N)z/etc/containers/*z/usr/share/containers/*z /etc/subuidz /etc/subgidz/etc/containers/policy.jsonZcontainers_policyrcSsg|] }|r|qSr ).0xr r H/usr/lib/python3.9/site-packages/sos/report/plugins/containers_common.py )z*ContainersCommon.setup..:)z podman 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 psz podman ps -azpodman stats --no-stream --allzpodman versionzpodman volume lsz buildah 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 csg|]}dd|qS)zmachinectl -q shell z @ /usr/bin/r )r cmduserr rrIsT)Z foreground)Z add_copy_specZ add_file_tagsZ get_optionsplitospath expanduserZadd_cmd_output)selfZ users_optZ users_listZ user_subcmdsZ expanded_userr rrsetups( zContainersCommon.setupN) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrstrZ option_listrr r r rrsr)rZsos.report.pluginsrrrrrr r r r s