+
    in#  c                   sJ    ^ RI Ht ^ RIHt ^ RIHtHtHt  ! R R]]4      tR# )i    )match)quote)PluginIndependentPlugin	PluginOptc                   s   a  ] tR t^t o RtRtRtRt]! R^RR7      .t	Rt
RtRtR	tR
tRtRtR]/tRtR tR tRR ltR tRtV tR# )PulpCorezPulp-3 aka pulpcoreZpulpcore/etc/pulp/settings.py	task-dayszdays of task history)ZdefaultZdescZ	localhosti8  ZpulpZ z/var/lib/pulp/assetsz/var/lib/pulp/media/upload
PGPASSWORDc                sz   RpRR lp \        V P                  RRR7      ;_uu_ 4       pVP                  4       P                  RR4      P                  RR	4      P                  R
R4      P	                  4        EF  pV'       d   V^ ,          R8X  d   K  VP                  R4      '       d   RpK7  RpV'       d'   \        VR,          V4      '       d   V! V4      V n        V'       d'   \        VR,          V4      '       d   V! V4      V n        V'       d'   \        VR,          V4      '       d   V! V4      V n	        V'       d'   \        VR,          V4      '       d   V! V4      V n
        V'       d'   \        VR,          V4      '       d   V! V4      V n        V'       d
   R
V9   d   RpVP                  R4      '       d   V! VRR7      V n        VP                  R4      '       g   EKp  V! VRR7      V n        EK  	  RRR4       RT P                  /T n        R#   + '       g   i     L%; i  \         d     L5i ; i)zParse pulp settings Fc                 s2   V P                  V4      ^,          P                  4       P                  R4      pVP                  R4      '       d   VP	                  R4      '       g/   VP                  R4      '       d   VP	                  R4      '       d   V^R pV# )i   ,Z"Z'i)ZsplitZlstripZrstrip
startswithZendswith)linesepZvals   && @/usr/lib/python3.14/site-packages/sos/report/plugins/pulpcore.pyseparate_valueZ6PulpCore.parse_settings_config.<locals>.separate_value)   st     **S/!$++-44S9Cs##S(9(9t$$d););!BiJ    ZrzUTF-8)Zencodingr	   z,
Z{z{
Z}z
}Z#Z	DATABASESTz\s*['|\"]%s['|\"]\s*:\s*\S+ZHOSTZPORTZNAMEZUSERZPASSWORDzSTATIC_ROOT = Z=)r   zCHUNKED_UPLOAD_DIR = Nr   )Z:)Zopensettings_fileZreadZreplace
splitlinesr
   r    dbhostdbportdbnamedbuserdbpasswd
staticroot	uploaddirZIOErrorenv)selfZdatabases_scoper   Zfiler   Zpatterns   &     r   parse_settings_configZPulpCore.parse_settings_config%   s   	"	d((#@@D IIK e,WWS%-@ e,ZZ\:D  47c> {33*.  =G&561A4+H+H&4T&:&561A4+H+H&4T&:&561A4+H+H&4T&:&561A4+H+H&4T&:&5:1Et+L+L(6t(<&3$;*/'788*83*G'>??)7#)F9: AJ !$--0K A@>  		se    H, BH+H9-H'-H-H-H1-HH?#H(H<H, H)	$H, )H, ,H:9H:c           	     s   R ;V n         V n        V P                  RRR7      pVR,          ^ 8X  d=   VR,          P                  4       p\	        V4      ^8  d   RV n         RV n        RV n        V P                  4        V P                  RR	.V P                   V P                  R
7       V P                  R4       V P                  RRV P                   V P                  R7       RRRRRR/pV P                  RVV P                   V P                  R7       V P                  V P                  3 F*  pV P                  W@P                   V P                  R
7       K,  	  V P                  R4      pR% F  pRV R2pV P                  V P                  VRR7      V P                  V P                   V P                  R7      pVR,          ^ 8X  d
   VR,          MRp	RV	 RV RV R2pV P                  VR R7      p
V P                  WP                  VV P                   V P                  R!7       K  	  V P                  R"RR7      p
V P                  V
R#V P                  V P                   V P                  R$7       R # )&Nz"podman ps --filter name=rhui5-rhuaZrhui)runasZstatusZoutputz
rhui5-rhuaz%/var/lib/rhui/config/pulp/settings.pyr   z/etc/pki/pulp/*)r   	containerz/etc/pki/pulp/**/*.keyz.curl -ks https://localhost/pulp/api/v3/status/Zpulp_status)suggest_filenamer   r   ZLC_ALLzen_US.UTF-8ZPULP_SETTINGSZDJANGO_SETTINGS_MODULEzpulpcore.app.settingsdynaconf list)r   r   r   r   z]COPY (SELECT STRING_AGG(column_name, ', ') FROM information_schema.columns WHERE table_name='zl'AND table_schema = 'public' AND column_name NOT IN ('args', 'kwargs', 'enc_args', 'enc_kwargs')) TO STDOUT;F)csvZ*zselect z from z, where pulp_last_updated> NOW() - interval 'z! days' order by pulp_last_updatedT)r   r   r   r   a[  SELECT table_name, pg_size_pretty(total_bytes) AS total, pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast, pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME, c.reltuples AS row_estimate, pg_total_relation_size(c.oid) AS total_bytes, pg_indexes_size(c.oid) AS index_bytes, pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE relkind = 'r') a) a order by total_bytes DESCZpulpcore_db_tables_sizes)r   r   r   r   )Z	core_taskZcore_taskgroupZcore_groupprogressreportZcore_progressreport)r   in_containerZexec_cmdr   Zlenr   r   Zadd_copy_specZadd_forbidden_pathZadd_cmd_outputr   r   Zadd_dir_listingZ
get_optionbuild_query_cmdr   )r   Zrhui_podman_psZlinesZdynaconf_envZ_dirZ	task_daysZtableZ_queryZcol_outZcolumnsZ_cmds   &          r   setupZPulpCore.setupZ   s   )--
T&'K-3 ' 5(#q("8,779E5zA~#
$0!%L"""$#
 t'8'8 	 	: 	 89L-:$**&*&7&7 	 	9 !-')@02IK 	O"&**8I8I 	 	K__dnn5D  ZZ+/+<+< ! > 6 OOK0	IEFFKW M$$F
 mmD$8$8U$8$K(,*.**.2.?.? $ AG ,38+<+Agh'sGyug 6--6K 8++F ''D'9D((U&*jjD<M<M   O!I( ##  $ 
  	D3M $

&*&7&7 	 	9r   c                s    V'       d   RV R2pRpW0P                   V P                  V P                  V P                  \	        V4      3,          # )a  
Builds the command needed to invoke the pgsql query as the postgres
user.
The query requires significant quoting work to satisfy both the
shell and postgres parsing requirements. Note that this will generate
a large amount of quoting in sos logs referencing the command being run
zCOPY (z6) TO STDOUT WITH (FORMAT 'csv', DELIMITER ';', HEADER)z0psql --no-password -h %s -p %s -U %s -d %s -c %s)r   r   r   r   r   )r   Zqueryr    Z_dbcmds   &&& r   r"   ZPulpCore.build_query_cmd   sS     UG $A AECdkkdkk5<A A 	Ar   c                sV    R pRpV P                  RW4       V P                  RW4       R# )zQ((SECRET_KEY|AUTH_LDAP_BIND_PASSWORD|password|PASSWORD)(\"|'|:|=|\s)+)([^\s'\"]+)z
\1********r   r   N)Zdo_path_regex_subZdo_cmd_output_sub)r   ZregZrepls   &  r   postprocZPulpCore.postproc   s/    ,6B:r   )r   r   r   r   r   r   r!   r   r   r   r   N)zpulpcore-manager)r   )F)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z
short_descZplugin_nameZcommandsZfilesr   Zoption_listr   r   r   r   r   r   r   r   r   r   r#   r"   r$   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s~     &JK$H&E+q/EFK FFFFH'J,I
"C+M31jG9RA; ;r   r   N)	Zrer    Zshlexr   Zsos.report.pluginsr   r   r   r   ) r   r   <module>r%      s$      C Cm;v( m;r   