hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
xray
/
manager
/
__pycache__
/
Upload FileeE
HOME
B �'Ud~ � @ sp d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z dd lmZ dd l mZmZ G dd� de�Zd S )zZ This module contains classes implementing X-Ray Manager behaviour for custom integration � )�ChainMap)�Optional)� PublicApi� )�BaseManager� )�XRayManagerError)� DomainInfo)�user_mode_verification�with_fpm_reload_restrictedc s� e Zd ZdZddddddddddd� Zed�� fdd�Zed�dd �Ze d d� �Z ed�dd �Ze eeed�dd���Zeed�dd�Zeee d�dd�Zeed�dd�Zeed�� fdd�Z� ZS )� CustomManagerz0 Manager supporting integration scripts N) �54Z55Z56Z70Z71Z72Z73Z74�80Z81)� system_idc s2 t � �|� t� | _| jr&| �� | _ntd��d S )Nz.X-Ray is not supported by control panel vendor)�super�__init__r �api�is_xray_integrated�get_all_domains�all_domainsr )�selfr )� __class__� �D/opt/alt/python37/lib/python3.7/site-packages/xray/manager/custom.pyr , s zCustomManager.__init__)�returnc C s t | j| j�S )za Get supported PHP versions :return: dict with custom supported versions )r �VERSIONS�VERSIONS_CUSTOM)r r r r �supported_versions5 s z CustomManager.supported_versionsc C s( | j �� }|j}|dkrdS |�dd�S )zN Check the X-Ray feature status through the panel_info script NT�xrayF)r � panel_info�supported_cl_features�get)r �_info�featuresr r r r = s z CustomManager.is_xray_integratedc C s | j jdd�S )z9 Collect domains from integration script T)�with_php)r �domains)r r r r r I s zCustomManager.get_all_domains)�domain_namer c C s� y| j | }W n< tk rJ | jjdd|id� td|� d�dd��Y nX t||j|jj|jj |jj |jjd�}| j�d ||j |j� |S ) z< Retrieve PHP setting for given domain_name z#Domain does not exist on the serverr&