관리-도구
편집 파일: selectorlib.cpython-37.pyc
B �v6d�* � @ sD d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZd dl Z d dlZd dlmZ d dlmZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZ d d l m!Z!m"Z" d d l#m$Z$m%Z%m&Z& d dl'm(Z( d dlm)Z) d d lm*Z* d dlm+Z+m,Z,m-Z- d dl.m/Z/m0Z0m1Z1m2Z2 d dlm3Z3 d dl4m5Z5m6Z6 d dlm7Z8 d dl9m:Z: d dl;m<Z< d dl=m>Z>m?Z? d dl@mAZA d dlBmCZD d dlEmCZF d dlGmHZHmIZImJZJmKZKmLZLmMZM d dlNmOZO d dlPmQZQmRZR G dd� de�Z7G dd� de7�ZSdd iZTG d!d"� d"eU�ZVdS )#� )�print_function)�division)�absolute_importN)�Set)� iteritems)�FormattedException)�resolve_username_and_doc_root)�CP_NAME�docroot)�NoDomain�NotSupported� IncorrectData)�exec_utility)�clselectctl)�clpassenger)�ClUserSelect�ClSelect�ClExtSelect)�APP_STARTED_CONST�ENABLED_STATUS�DISABLED_STATUS�BaseSelectorError)�validate_env_vars)�format_summary�API_1)�ClSelectExcept)�NodeJSConfigError)�NodeManager)�PythonAppFormatVersion�get_venv_rel_path)� PythonManager)�Environment)�mkdir_p� file_read� file_write�get_using_realpath_keys�get_abs_rel�delete_using_realpath_keys)�get_perm)�_set_ui_config�UIConfigExceptionc @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r. r. �G/opt/alt/python37/lib/python3.7/site-packages/clselector/selectorlib.pyr F s r c @ s e Zd ZdZdS )�ClSelectDomainNotFoundzK Custom exception in case if user doesn't have the specific domain N)r+ r, r- �__doc__r. r. r. r/ r0 J s r0 �status�okc @ s� e Zd Zdd� Zdd� Zdd� Zed�dd ��Zed d� �Zedd � �Z ed�dd��Z ed�dd��Zedd� �Zed�dd��Z dd� Zedd� �Zdd� Zdd� Zedd� �Zed d!� �Zd"d#� Zd�d$d%�Zed&d'� �Zd(d)� Zed*d+� �Zd,d-� Zd�d.d/�Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8d9� Zd:d;� Z d<d=� Z!d>d?� Z"d@dA� Z#dBdC� Z$dDdE� Z%dFdG� Z&dHdI� Z'dJdK� Z(dLdM� Z)d�dNdO�Z*edPdQ� �Z+d�dRdS�Z,d�dTdU�Z-edVdW� �Z.d�dYdZ�Z/d�d\d]�Z0d^d_� Z1d`da� Z2dbdc� Z3ddde� Z4edfdg� �Z5dhdi� Z6edjdk� �Z7dldm� Z8dndo� Z9edpdq� �Z:d�drds�Z;d�dtdu�Z<dvdw� Z=edxdy� �Z>d�dzd{�Z?d|d}� Z@d~d� ZAd�d�� ZBd�d�� ZCd�d�d��ZDd�d�� ZEd�d�� ZFd�d�� ZGed�d�� �ZHed�d�� �ZIeJd�d�� �ZKd�d�� ZLd�d�� ZMdS )��CloudlinuxSelectorLibc C s� || _ d| _d| _d| _d| _d| _d| _d| _d | _d | _ d | _ d | _| j | jkr�dd lm } |� | _ t� | _tj| _ tj| _nZ| j | jkr�dd lm } |� | _ t� | _tj| _ tj| _n | j | jkr�dd lm} |� | _d S )Nz/usr/bin/selectorctlz+/usr/share/l.v.e-manager/utils/dynamicui.pyz/usr/sbin/cloudlinux-selectorZnodejs�pythonZruby�phpr )�ApplicationsManager)� PhpManager)�interpreter�_SELECTORCTL_UTILITY�DYNAMIC_UI_CTL_CMDZCLOUDLINUX_SELECTOR_UTILITY�NODEJS_INTERPRETER�PYTHON_INTERPRETER�RUBY_INTERPRETER�PHP_INTERPRETER�selector_manager�apps_manager�selector_user_lib�selector_old_libZ$clselect.clselectnodejs.apps_managerr7 r �clselectZclselectnodejsuserZclselectctlnodejsuser�$clselect.clselectpython.apps_managerr ZclselectpythonuserZclselectctlpythonZ clselect.clselectphp.php_managerr8 )�selfr9 r7 r8 r. r. r/ �__init__U s6 zCloudlinuxSelectorLib.__init__c C s | j | jkrdS | jj�� dS )za Checks that selector is able to work on current os environment :return: N)r9 r? r@ Z cl_select_libZcheck_requirements)rF r. r. r/ �check_selector_is_availablew s z1CloudlinuxSelectorLib.check_selector_is_availablec C s"