+
    ik+  c                   s    ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt  ]! ]P$                  ! 4       P&                  ^x4      t ! R R	]	4      t ! R
 R4      tR#   ] d    ^xt L"i ; i)    N)OrderedDict)fill)SoSComponent)import_policy)Plugin)boldImporterHelperc                   s   a a ] tR t^t oRtRtRtRtRtRR/t	V 3R lt
]R 4       tR tR	 tR
 tR tR tR tR tR tRtVtV ;t# )	SoSHelperzProvide better, more in-depth help for specific parts of sos than is
provided in either standard --help output or in manpages.
zDetailed help infomationFtopic c                s^   < \         SV `  WV4       V P                  P                  V n        R # )N)Zsuper__init__optsr	   )selfparserZargsZcmdline	__class__s   &&&&6/usr/lib/python3.14/site-packages/sos/help/__init__.pyr   ZSoSHelper.__init__+   s!    w/YY__
    c                sd    R Vn         VP                  RR4      pVP                  RRRRRR7       R	# )
zsos help TOPIC [options]zHelp Information Optionsz<These options control what detailed information is displayedr	   ZTOPICr
   Z?z/name of the topic or component to show help for)ZmetavarZdefaultZnargsZhelpN)usageZadd_argument_groupZadd_argument)clsr   Zhelp_grps   && r   add_parser_optionsZSoSHelper.add_parser_options/   sA    1,,&J
 	gw#%/ 	 	1r   c                s    V P                   P                  P                  R 4      ^ ,          pRRRRRR/pW9   d>   V P                   P                  P                  WV,          4      V P                   n        R# R# ).cleancleanerZmaskcollect	collectorN)r   r	   splitreplace)r   Z_comZ_replace   &  r   sanitize_topic_componentZ"SoSHelper.sanitize_topic_component:   sd    yy$$S)!,YI{

 "iioo55dTNKDIIO r   c                sr   V P                   P                  '       g'   V P                  4        \        P                  ! ^ 4       V P                  4         V P                  4       pX'       d/    \        4       pVP                  V4       VP                  4        R# \        RV P                   P                   R24       R#   \         dF   p\        RT P                   P                   RT 24       \        P                  ! ^4        Rp?LRp?ii ; i  \         d   p\        RT 24        Rp?R# Rp?ii ; i)r    zCould not load help for 'z': NzError loading help: zNo help section found for 'Z')r   r	   display_self_helpsysZexitr   get_obj_for_topic	ExceptionprintHelpSectionZdisplay_helpdisplay)r   ZklassZerrZhts   &   r   executeZSoSHelper.executeD   s    yy""$HHQK 	%%'	**,E
 4 ]""2&

 /		/@BC  	-diioo->c#GHHHQKK	  4,SE2334s0   B? -+D ?D
;D

DD6D11D6c                s   RRRRRRRRR	R
RRRRRR/pRpV P                   P                  V9   dZ   \        P                  ! RV P                   P                  ,           4      p\	        W1V P                   P                  ,          4      pV# RV P
                  RV P                  RV P                  RV P                  /pVP                  4        F:  w  rVV P                   P                  P                  V4      '       g   K2  V! 4       p V# 	  V# )zBased on the help topic we're after, try to smartly decide which
object we need to manipulate in order to get help information.
reportZ	SoSReportreport.pluginsr   r   Z
SoSCleanerr   SoSCollectorzcollector.transportsZRemoteTransportzcollector.clustersZClusterpoliciesZPolicyuploadZ	SoSUploadNsos.zreport.plugins.z	policies.zcollector.transports.zcollector.clusters.)r   r	   	importlibimport_moduleZgetattr_get_plugin_variant_get_policy_by_name_get_collect_transport_get_collect_clusteritemsZ
startswith)r   Z
static_mapr   modZ_helpZ_secvalue   &      r   r    ZSoSHelper.get_obj_for_topic\   s    
 kh|"$5 )k	

 99??j())&499??*BCC#$))//:;C 
 "4#;#;T55')D)D%t'@'@	E  %{{}99??--d33'C
	  - 
r   c                s    ^ RI Hp V P                  P                  P	                  R4      R,          pW!9   d	   W,          # R# )r    )
TRANSPORTSr   N)Zsos.collector.sosnoder6   r   r	   r   )r   r6   Z
_transportr   r   r0   Z SoSHelper._get_collect_transport}   s4    4YY__**3/3
#))r   c                s    ^ RI Hp ^ RIpVP                  VP                  P
                  R4      pV FF  pV^ ,          V P                  P                  P                  R4      R,          8X  g   K=  V^,          u # 	  R# )r    )r(   Nclustersr   r7   )	Zsos.collectorr(   Zsos.collector.clustersZ_load_modulesr   r8   r   r	   r   )r   r(   sosr8   Zclusters   &    r   r1   ZSoSHelper._get_collect_cluster   sd    .%--cmm.D.D.8:GqzTYY__2237;;qz!   r   c                s   \         P                  ! R V P                  P                  ,           4      pV P	                  4        \
        P                  ! V\
        P                  4      pV Uu. uF+  p\        V^,          \        4      '       g   K"  V^,          NK-  	  ppV FF  pVP                  4       '       g   K  V P                  P                  VP                  4       4      pVu # 	  R# u upi )r+   N)r,   r-   r   r	   Zload_local_policyinspectZ
getmembersZisclassZ
issubclassr   Z__subclasses__policyZmatch_plugin)r   r3   ZmemsZmZpluginsZpluginr   r5   r   r.   ZSoSHelper._get_plugin_variant   s    %%ftyy&>? !!#w7!%BAAaD&)A41Q44BF$$&&kk..v/D/D/FG
   Cs   +C,C,c                sb   V P                   P                  P                  R 4      R,          p^ RIp\	        VP
                  P                  4      pVP                  4        FK  p\        V4       F9  pVP                  P                  4       P                  RR4      pWa8X  g   K5  Vu u # 	  KM  	  R# )r   Nr;   r
   r7   )r   r	   r   Zsos.policies.distrosr   r)   ZdistrosZget_modulesr   __name__Zlowerr   )r   Z_topicr9   Z_helperr3   r;   Z_pr5   r   r/   ZSoSHelper._get_policy_by_name   s    &&s+B/ 	$ !5!56&&(C',__**,44XrB<!M - )
 r   c                s   \        RR4      pVP                  R\        R4       R24       VP                  R4      p\        R4      pVP                  RV R	24       \        R
4      pVP                  RV R24       VP                  R4      pVP                  R4       RRRRRRRRRRRRRR/pVP	                  4        F'  w  rxVP                  R\        V4      R V 2RR 7       K)  	  VP                  4        R!# )"zXDisplays the help information for this component directly, that is
help for `sos help`.
zDetailed help for sos helpzThe 'help' sub-command is used to provide more detailed information on different sub-commands available to sos as well as different components at play within those sub-commands.zSoS - officially pronounced "ess-oh-ess" - is a diagnostic and supportability utility used by several Linux distributions as an easy-to-use tool for standardized data collection. The most known component of which is z
sos reportz (formerly sosreport) which is used to collect troubleshooting information into an archive for review by sysadmins or technical support teams.zHow to search using sos helpz$component.$topic.$subtopicz8To get more information on a given topic, use the form 'z'.zsos help report.plugins.kernelzFor example 'zM' will provide more information on the kernel plugin for the report function.zAvailable Help SectionszThe following help sections are available. Additional help topics and subtopics may be displayed within their respective help section.
r&   z#Detailed help on the report commandr'   z'Information on the plugin design of soszreport.plugins.$pluginz!Information on a specific $pluginr   z"Detailed help on the clean commandr   z$Detailed help on the collect commandr*   z#Detailed help on the upload commandr)   z+How sos operates on different distributionsZ	z<36F)newlineN)r#   add_textr   add_sectionr2   r$   )	r   Z	self_helpZsubsectr   Zrep_exZ
avail_helpsectionsZsectr4   s	   &        r   r   ZSoSHelper.display_self_help   sN     (J
	 	& '+<&8%9 :JJ	
 ''(FG23s	

 67= 1% % 	& **+DE
	
 =G$&I<>;E
 $>>+KD"T$Z$4UG <eL , 	r   )r	   )r<   
__module____qualname____firstlineno____doc__ZdescZconfigure_loggingZload_policyZ
load_probeZarg_defaultsr   Zclassmethodr   r   r%   r    r0   r1   r.   r/   r   __static_attributes____classdictcell__Z__classcell__)r   __classdict__s   @@r   r   r      sx      &DKJ 	L% 1 1LD0B	3 3r   r   c                   sX   a  ] tR t^t o RtR
R ltR tRR ltRR ltRR lt	R t
RtV tR	# )r#   z}This class is used to build the output displayed by `sos help` in a
standard fashion that provides easy formatting controls.
c                sH    Wn         W n        W0n        \        4       V n        R# )aK  
:param title:   The title of the output section, will be prominently
                displayed
:type title:    ``str``

:param content: The text content to be displayed with this section
:type content:  ``str``

:param indent:  If the section should be nested, set this to a multiple
                of 4.
:type indent:   ``int``
N)titlecontentindentr   r@   r   rH   rI   rJ      &&&&r   r   ZHelpSection.__init__   s     
#r   c                s    Wn         R# )zSet or override the title for this help section

:param title:   The name to set for this help section
:type title:    ``str``
N)rH   )r   rH   s   &&r   	set_titleZHelpSection.set_title   s	     
r   c                s    V P                   '       d   V'       d   RMRpW1,           pV ;P                   V,          un         R# )zAdd body text to this section. If content for this section already
exists, append the new ``content`` after a newline.

:param content:     The text to add to the section
:type content:      ``str``
z

Z
N)rI   )r   rI   r=   lns   &&& r   r>   ZHelpSection.add_text   s+     <<<"BlGr   c                sL    V P                  WV4       V P                  V,          # )a  Add a section of text to the help section that will be displayed
when the HelpSection object is printed.

Sections will be printed *in the order added*.

This will return a subsection object with which block(s) of text may be
added to the subsection associated with ``title``.

:param title:   The title of the subsection being added
:type title:    ``str``

:param content: The text the new section should contain
:type content:  ``str``

:returns:   The newly created subsection for ``title``
:rtype:     ``HelpSection``
)_add_sectionr@   rK   rL   r   r?   ZHelpSection.add_section  s#    $ 	%&1}}U##r   c                sn    WP                   9   d   \        R4      h\        WV4      V P                   V&   R# )zInternal method used to add a new subsection to this help output

:param title:   The title of the subsection being added
:type title:    ``str`
z(A section with that title already existsN)r@   r!   r#   rK   rL   r   rO   ZHelpSection._add_section  s/     MM!FGG*56Ber   c           	     s   \        \        \        V P                  4      \        V P
                  R7      4       V P                  P                  4        F(  p\        \        V\        V P
                  R7      4       K*  	  V P                   F/  p\        R4       V P                  V,          P                  4        K1  	  R# )zGPrint the HelpSection contents, including any subsections, to
console.
)ZwidthZinitial_indentr
   N)
r"   r   r   rH   TERMSIZErJ   rI   Z
splitlinesr@   r$   )r   rN   Zsectionr   r   r$   ZHelpSection.display&  s     	dHT[[
 	 ,,))+B$r$++FG ,}}G"IMM'"**, %r   )rI   rJ   r@   rH   N)r
   r
   r
   )T)r
   r
   )r<   rA   rB   rC   rD   r   rM   r>   r?   rO   r$   rE   rF   )rG   s   @r   r#   r#      s.     &$
 $*C- -r   r#   )r:   r,   r   ZosZcollectionsr   Ztextwrapr   Zsos.componentr   Zsos.policiesr   Zsos.report.pluginsr   Zsos.utilitiesr   r   ZminZget_terminal_sizeZcolumnsrP   r!   r   r#   ) r   r   <module>rQ      sw      
 	 #  & & % .2'')1137H
| |~U- U-G  Hs   "A1 1	A=<A=