Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
xray
/
apiclient
/
__pycache__
/
✏️
Editing: api_client.cpython-311.pyc
� W��j�t � �Z � d Z ddlmZ ddlZddlZddlZddlZddlZddl Z ddl mZ ddlm Z ddlmZ ddlmZmZ ddlmZ dd lmZ dd lmZ ddlmZmZ ddlmZ dd lm Z ddl!m"Z"m#Z#m$Z$ ddl%m&Z&m'Z' ddl(m)Z) ddl(m*Z+ ddl,m-Z-m.Z.m/Z/ ddl0m1Z1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9m:Z: ddl;m<Z< G d� d� � Z= G d� d� � Z> G d� de=e>� � Z? G d� d e=� � Z@ G d!� d"e=e>� � ZA G d#� d$e=� � ZB G d%� d&e=� � ZC G d'� d(e=� � ZD G d)� d*e=� � ZEdS )+zA This module contains class implementing MongoDB API interaction � )�annotationsN)�Iterable)�partial)�Any)�Response�Session)�HTTPAdapter)�RequestException)�Retry)�Schema�SchemaError)�gettext)�filter_by_non_existence)�advice_list_schema�detailed_advice_schema�user_sites_info_schema)�is_feature_hidden_server_wide�is_feature_visible� )�get_advice_instance)� supported)�adviser_api_server� api_server�proto)�TaskNotFoundError�XRayAPIEmptyResponse�XRayAPIError)�open_local_storage)�Task)�get_xray_exec_user�user_mode_verification��read_jwt_tokenc � � e Zd ZdZdd�d&d�Zd'd �Zd� Zd� Zed(d �� � Z ed)d�� � Z d(d�Zd*d+d�Zd*d,d�Z d-d.d�Zd/d0d �Zd1d2d"�Zd3d4d#�Zd1d5d$�Zd%� ZdS )6�Clientz Base client class �unavailable��tracing_task_id� system_id�strr( c � � || _ || _ t j d� � | _ t dt ddg� � t g d�� � d�� � }t |�� � }t � � | _ | j � t � d�|� � t | j j d � � � | j _ d S )N� api_client� �GET�POST)i� i� i� )�total�allowed_methods�status_forcelist�backoff_factor)�max_retries�://� )�timeout)r) �task_id�logging� getLogger�loggerr � frozensetr r �session�mountr r �request)�selfr) r( � retry_conf�adapters �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/apiclient/api_client.py�__init__zClient.__init__4 s� � �"���&����'��5�5�����%�u�f�o�6�6�&����7�7�� � � � � �*�5�5�5���y�y�������e�=�=�=�'�2�2�2�&�t�|�';�R�H�H�H������ �return�Nonec �8 � | j � � � dS )a` Release pooled keep-alive connections of the session. Must be called once the client is dropped, otherwise a connection closed by the server stays in CLOSE_WAIT until the process exits. Safe to call more than once; the session remains usable afterwards (it simply opens a new connection). Closing a client that another thread still uses is safe with urllib3 2.x (the venv ships 2.7), where PoolManager.clear() only drops the pools; with urllib3 1.x an in-flight request of such a client would fail with ClosedPoolError (XRayAPIError). N)r= �close�r@ s rC rI zClient.closeD s � � ��������rE c �>