https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/redhat_support_tool/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyc
�
��Tc@sddlmZddlmZddlmZmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZdd
lmZddlmZddljjZddlZd
ZdZejd�Zdefd��YZdS(i����(tOption(tdeque(tRequestErrortConnectionError(t_(tEmptyValueError(tInteractivePlugintObjectDisplayOption(t	Constants(tcommon(tconfighelper(tLaunchHelper(tKbNs%Keith Robertson <kroberts@redhat.com>s&Spenser Shumaker <sshumake@redhat.com>s"redhat_support_tool.plugins.searchtSearchcBs%eZdZed�Zed�Zed�Zied�d6ed�d6ed�d	6ZeZ	dZdZdZ
d
ZdZed��Zed
��Zed��Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�ZRS(tsearchs�%s of %s solutions displayed. Type 'm' to see more, 'r' to start from the beginning again, or '?' for help with the codes displayed in the above output.sNo more solutions to displays>More solutions may be available. Type 'm' to try and find mores6Work In Progress: This solution is a Work in Progress.tWIPsQUnverified: This solution has not yet been verified to work by Red Hat customers.tUNVs�Verified: This solution has been verified to work by Red Hat Customers and Support Engineers for the specified product version(s).tVERii�cCs
td�S(s�
        The usage statement that will be printed by OptionParser.

        Example:
            - %prog -c CASENUMBER [options] <comment text here>
        Important: %prog is a OptionParser built-in.  Use it!
        s%prog [options] <keywords>(R(tcls((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyt	get_usageGs	cCstd�|jS(s�
        The description statement that will be printed by OptionParser.

        Example:
            - 'Use the '%s' command to add a comment to a case.'             % cls.plugin_name
        s�Use the '%s' command to search the entire knowledge base for solutions with given keywords, a log message, program configuration variables, etc.(Rtplugin_name(R((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_descRs		cCstd�|j|jfS(s
        The epilog string that will be printed by OptionParser.  Usually
        used to print an example of how to use the program.

        Example:
         Examples:
          - %s -c 12345678 Lorem ipsum dolor sit amet, consectetur adipisicing
          - %s -c 12345678
        sRExamples:
  - %s RHEV
  - %s -s Starting osa-dispatcher: RHN 9899 Traceback caught(RR(R((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyt
get_epilog_scCs.tdddddtdtd�dd	�gS(
Ns-ss	--summarytdesttsummarytdefaultthelps2Display summary information about matched articlestactiont
store_true(RtFalseR(R((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_optionsoscCs�td�|j}|js�tj�r�ttd��}t|�j�}|dkrdt��nt|�j�r�||_q�q�|GHt|��ndS(Ns"ERROR: %s requires text to search.s4Please provide the text to search (or 'q' to exit): tq(	RRt_lineR	tis_interactivet	raw_inputtstrtstript	Exception(tselftmsgtline((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyt
validate_argsus	
	cCs
td�S(NsO
Type the number of the solution to view or 'e' to return to the previous menu.(R(R&((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_intro_text�scCs
td�S(NsSelect a Solution: (R(R&((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_prompt_text�scCs|jS(N(t
_submenu_opts(R&((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_sub_menu_options�scCs�t|j�|jks?t|j�dks?|j|jkrCtS|dkrXd}ni|d6|jd6}|j|7_|j|�}t|�dkr�tS|jj|�|j|�tS(Nii2tlimittoffset(	tlent_solAryt_nextOffsett_MAX_OFFSETRt_get_solutionstextendt_parse_solutionstTrue(R&tnum_optionst
searchoptst
newresults((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytget_more_options�s	
cCsrtd�dtd�g}x|D]}|GHq"Wx-|jj�D]}d||j|fGHqAWtj|�dS(NseRed Hat Support assigns a state with all knowledge solutions, which is displayed in the above output.tsThe current states are:s	  %s - %s(Rtstate_explanationstkeysR	tdo_help(R&R(tdoclinestdoctstate((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyR?�s	
	cCs�t�|_i|_idd6dd6}d|_|j|�|_|j|j�s�td�}|GHtj	t
j|�t��ndS(Ni2R.iR/sUnable to find solutions(
RR,t	_sectionsR2R4R1R6RtloggertlogtloggingtWARNINGR%(R&R9R'((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytpostinit�s		cCs�d}x"|jD]}||j|7}qWy|jdd�GHWnItk
r�}tjtj|�ddl}|j|j	�d�GHnXdS(NusUTF-8treplacei����(
R,RCtencodeR%RDRERFRGtsystgetdefaultencoding(R&RAtoptteRK((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytnon_interactive_action�scCsCd}y&|j}tt�}|j|�Wnt��nXdS(N(tNonet
stored_objRRtrunR%(R&tdisplay_optiontsolution_idtlh((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pytinteractive_action�s	cCs(d}y)tj�}|jj|jd|�SWn�tk
ru}td�t|�}|GHt	j
tj|��n�t
k
r�}td�|j}|GHt	j
tj|��notk
r�td�}|GHt	j
tj|��n8tk
r#td�}|GHt	j
tj|��nXdS(NR9s	ERROR: %ss5Unable to connect to support services API. Reason: %ssZProblem connecting to the support services API.  Is the service accessible from this host?sUnable to find solutions(RPt	apihelpertget_apit	solutionstlistR RRR#RDRERFRGRtreasonRR%(R&R9tapiteveR'tre((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyR4�s2	


cCsvy9x2|D]*}d}|ddtj|j�f7}|jdr�|j�}|rzdj|jdd�j��}n|dtj|f7}n|dtj	|j
�f7}|j�dd!j�}|j
j|d	�}|td
|�7}|j�}|r|dtj|f7}n|dtj|j�f7}|dtjtd
tj�tjf7}tj�jdd�r�|j�dj�}d|j
�|||j�f}	nd|j
�||j�f}	|jdr�|	dtj|f7}	nt|	d|j
��}
|jj|
�||j|
<q
WWn,td�}|GHtjt j!|�t"SX|
rrt#St"S(sB
        Use this for non-interactive display of results.
        us%-8s %-60s
s%s:Rt s
iiR<sState:   %s
s
%-8s %-60ss


%s%s%s

t-toptiontponiess[%7s:%s:%s] %ss[%7s:%s] %ss
 *** %s %sRVs%ERROR: problem parsing the solutions.($RtTITLEt	get_titlet_optionstget_abstracttjoinRItsplittCASE_SUMMARYtIDtget_idtget_kcsStatetupperR=tgetRtget_view_uritURLtget_uritBOLDR#tMAX_RULEtENDR
tget_config_helpertget_ModerationStateRR,tappendRCRDRERFRGRR7(R&tsolArytvalRARtkcsStatetkcsStateExplanationtvuritpublished_statet
disp_opt_texttdisp_optR'((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyR6�s^

$
N( t__name__t
__module__RRtpartial_entriestend_of_entriestmore_entries_maybeR=Rthelp_is_optionsRPR,RCR1R2R3tclassmethodRRRRR)R*R+R-R;R?RHRORVR4R6(((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyR
's8

										(toptparseRtcollectionsRt(redhat_support_lib.infrastructure.errorsRRt(redhat_support_tool.helpers.confighelperRRtredhat_support_tool.pluginsRRt%redhat_support_tool.helpers.constantsRtredhat_support_tool.helpersR	R
t(redhat_support_tool.helpers.launchhelperRtredhat_support_tool.plugins.kbRt%redhat_support_tool.helpers.apihelperthelpersRWRFt
__author__t	getLoggerRDR
(((sF/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/search.pyt<module>s 

https://t.me/AnonymousX5 - 2025