3 ܓi @s8ddlZddlmZmZmZmZGdddeeeZdS)N)Plugin RedHatPlugin UbuntuPlugin PluginOptc@s6eZdZdZdZd Zd ZeddeddgZ d d Z d S)ContainersCommonz;Common container configs under {/etc,/usr/share}/containersZcontainers_common containercontainers-common rootlessusersz,colon-delimited list of users to collect for)defaultZval_typeZdesccs|jddddg|jddi|jd}g}|rFdd |jd D}d d d dddddddddddddddddg}xZ|D]Rtjjd}|j|d |jd!|jfd"d |Dd#d$qxWdS)%Nz/etc/containers/*z/usr/share/containers/*z /etc/subuidz /etc/subgidz/etc/containers/policy.jsonZcontainers_policyr cSsg|] }|r|qSr ).0xr r '/usr/lib/python3.6/containers_common.py )sz*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 cmd)userr rrJsT)Z foreground)Z add_copy_specZ add_file_tagsZ get_optionsplitospath expanduserZadd_cmd_output)selfZ users_optZ users_listZ user_subcmdsZ expanded_userr )rrsetupsP     zContainersCommon.setupN)r)r) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrstrZ option_listrr r r rrs r)rZsos.report.pluginsrrrrrr r r r s