
    ~ g                     6    S SK JrJrJrJr   " S S\\\5      rg)    )PluginRedHatPluginUbuntuPlugin	PluginOptc                   f    \ rS rSrSrSrSrSrSr\	" SSS	S
S9\	" SSSSS9\	" SSSS9/r
S rS rSrg)Podman   a  Podman is a daemonless container management engine, and this plugin is
meant to provide diagnostic information for both the engine and the
containers that podman is managing.

General status information will be collected from podman commands, while
detailed inspections of certain components will provide more insight
into specific container problems. This detailed inspection is provided for
containers, images, networks, and volumes. Per-entity inspections will be
recorded in subdirs within sos_commands/podman/ for each of those types.
zPodman containerspodman)	container)r
   allFz0collect for all containers, even terminated oneszEnable collection for all containers that exist on the system regardless of their running state. This may cause a significant increase in sos archive size, especially when combined with the 'logs' option.)defaultdesc	long_desclogsz)collect stdout/stderr logs for containerszCapture 'podman logs' output for discovered containers. This may be useful or not depending on how/if the container produces stdout/stderr output. Use cautiously when also using the 'all' option.sizez!collect image sizes for podman ps)r   r   c                    U R                  / SQ5        U R                  SSS.5        / SQnU R                  U Vs/ s H  nSU 3PM
     sn5        U R                  S5      (       a  U R                  SS	S
9  U R	                  SS/SS9  U R                  SSS9nUS   S:X  a[  US   R                  5       SS   Vs/ s H  oDR                  5       S   PM     nnU R                  U Vs/ s H  nSU 3PM
     snSSS9  U R                  SU R                  S5      S9 Vs/ s H  owS   PM	     nnU R                  SS9n	U R                  SS9n
U H  nU R                  SU 3SS S9  M     U	 H9  nUu  pS!U;  a  UOUnU R                  SU 3S"S#S9  U R                  S$U 3S%S&S9  M;     U
 H  nU R                  S'U 3S(S)S9  M     U R                  S*5      (       a  U H  nU R                  S+U 3SS,S-9  M     g g s  snf s  snf s  snf s  snf ).N)
HTTP_PROXYHTTPS_PROXYNO_PROXY	ALL_PROXYpodman_list_imagespodman_list_containers)zpodman imagesz	podman ps)infozimage trust showimageszimages --digestszpod psz
port --allpszps -azstats --no-stream --allversionz	volume lszpodman r   zpodman ps -asd   )priorityz/etc/cniz/etc/containersT)	recursivezpodman network lspodman_list_networks)tagsstatusr   output   zpodman network inspect networkspodman_network_inspect)subdirr!   r
   r   )runtimeget_all)r(   zpodman inspect 
containerspodman_container_inspectnoner   podman_image_inspectzpodman image tree zimages/treepodman_image_treezpodman volume inspect volumespodman_volume_inspectr   zpodman logs -t 2   )r'   r   )add_env_varadd_cmd_tagsadd_cmd_output
get_optionadd_dir_listingcollect_cmd_output
splitlinessplitget_containersget_container_imagesget_container_volumes)selfsubcmdsspnetspnnetsnetcr*   r   r/   r   imgnameimg_idinspvolcons                     ;/usr/lib/python3/dist-packages/sos/report/plugins/podman.pysetupPodman.setup2   s    
 	 	11
 	

 	G<Gqwqc]G<= ??6""#>
  	 	
 ''(;-C ( E?a,1(O,F,F,H,LM,LbHHJqM,LDM;?!;?C)#/4! '?   A
 --h6:ooe6L . N
NQaD N 	 
 **8*<,,X,>#I/) ='3%?   A $
 CLD!-46D/$ 8%;   =$TF+$(     C"8 >'0%<   > 
 ??6""!##ocU$;+7" $ F " #_ = N!
s   G::G?'HH	c                 .    SnU R                  SUS5        g )Nz=(?P<var>(pass|key|secret|PASS|KEY|SECRET).*?)=(?P<value>.*?)"z	*inspect*z\g<var>=********")do_cmd_output_sub)r=   
env_regexps     rK   postprocPodman.postproc   s    (
{J3	5     N)__name__
__module____qualname____firstlineno____doc__
short_descplugin_nameprofilespackagesr   option_listrL   rQ   __static_attributes__rT   rS   rK   r   r      so    	 %JKHH 	%I>	@ 	&%B:	< 	&%:	<K&MF^5rS   r   N)sos.report.pluginsr   r   r   r   r   rT   rS   rK   <module>ra      s     M LB5V\< B5rS   