| Server IP : 185.143.233.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/clpackages/__pycache__/ |
Upload File : |
�
rJJ��&p�� �� � d dl Z d dlZd dlmZ d dlmZmZmZmZ d dl m
Z
mZ d dlm
Z
mZ d dlmZ d dlmZ d dlmZmZmZ d d lmZ d d
lmZmZmZ ddlmZ G d
� d� � ZdS )� N)�Feature)�admin_packages�is_admin�is_panel_feature_supported�resellers_packages)�
MySQLGovernor�MySQLGovException)�print_dictionary�replace_params)�CloudlinuxLicenseLib)�LvectlException)�ClQuotaException�
ClQuotaLib�QuotaDisabledException)�
LveCtlPackage)�DEFAULT_PACKAGE�is_active_reseller_limits�lve� )�parse_cloudlinux_packages_optsc �N � e Zd ZdZg d�Zd� Zd� Zd� Zd� Zd� Z d� Z
dd�Zdd
�ZdS )�CloudlinuxPackagesz4
Class for run cloudlinux-packages commands
)
�speed�nproc�pmem�vmem�
maxEntryProcs�io�iops�inodes� mysql-cpu�mysql-ioc � � d| _ i | _ t � � | _ t t
j � � rt � � nd | _ t t
j � � rt � � nd | _ d S )NF)�_is_json�_optsr �_clquota_pack_libr r �LVEr �_lvectl_pack_lib�GOVERNORr �_mysql_governor)�selfs �py/clpackages/packages.py�__init__zCloudlinuxPackages.__init__ sc � ���
���
�!+�����3M�g�k�3Z�3Z� d�
����`d���2L�W�M]�2^�2^�h�}����dh����� c � � t � � }|� � � sd| _ | � ddi� � S d|v | _ | � |� � | _ | j � d� � r*t j � � s| � ddi� � | j d r| � � � S | �
� � S )z$
Run command action
T�resultzCloudlinux license isn't validz--json�--for-resellerzLerror: reseller limits are not supported, can not use --for-reseller option.�set)r �get_license_statusr$ �_error_and_exit�_parse_argsr% �getr �reseller_limit_supported�_set_run�_get_run)r+ �argv�licences r, �runzCloudlinuxPackages.run'