HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/features.cpython-37.pyc
B

��6�y7C�@svUddlmZddlZyddlmZefZWn(ek
rTddlmZeefZYnXddl	m
Z
mZmZm
Z
mZGdd�dfe��Zdd	�eD�Zd
ed<ejejejejejejejejfZdd
�dd�ZejejejejfZejejfZ ejejejfZ!dZ"dd
�dd�Z#ejejejejfZ$dd
�dd�Z%dd
�dd�Z&dd
�dd�Z'd
d
�dd�Z(dZ)dZ*dd
�dd �Z+dS)!�)�annotationsN)�StrEnum)�Enum)�is_cl_admin_edition�is_cl_shared_pro_edition_safely�is_cl_solo_edition�is_container�	is_ubuntuc@sDeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdS)�FeaturezREnum of available CloudLinux features
    that vendors can disable or enable.
    Zphp_selectorZ
ruby_selectorZpython_selectorZnodejs_selectorZ	mod_lsapiZmysql_governorZlveZwizardZcagefsZreseller_limitsZxrayZ
accelerate_wpZautotracingN)�__name__�
__module__�__qualname__�__doc__ZPHP_SELECTOR�
RUBY_SELECTOR�PYTHON_SELECTOR�NODEJS_SELECTOR�LSAPI�GOVERNOR�LVE�WIZARDZCAGEFS�RESELLER_LIMITS�XRAY�WPOS�AUTOTRACING�rr��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/clcommon/features.pyr
sr
cCsg|]
}|j�qSr)�value)�.0�featurerrr�
<listcomp>2srz
list[Feature]�ALL_CL_FEATURES�tuple)�returncCst�r
tSdS)z�
    Return overrides that are applied to the list of features
    depending on the current system base os.

    Right now we support two backends: rhel-like almalinux and ubuntu.
    r)r	�"_UBUNTU_BASED_CL_FEATURES_DISABLEDrrrr�%_get_features_disabled_by_system_type@sr$rcCs.tdd�rtStdd�rtSt�r&tStSdS)NT)�skip_jwt_check)r�SOLO_CL_FEATURES_DISABLEDr�ADMIN_CL_FEATURES_DISABLEDr�SHARED_PRO_CL_FEATURES_DISABLED�SHARED_CL_FEATURES_DISABLEDrrrr�!_get_features_disabled_by_licenseas

r*cCst�r
tSdS)z�
    Return overrides that are applied to the list of features
    depending on the current system environment.

    Right now we support two envs:
        - bare metal or virtualized servers
        - virtuoso containers
    r)r�CONTAINER_CL_FEATURES_DISABLEDrrrr�%_get_features_disabled_by_environmentts	r,cCsddlm}|��S)Nr)�cpapi)Zclcommonr-Zget_unsupported_features)r-rrr�#get_control_panel_disabled_features�sr.zdict[Feature, bool]cs>t�}t�}t�}t�}tt�||||����fdd�tD�S)az
    Return dict of CloudLinux features that can be used
    on current system. The key is the feature name
    and the value is True if feature is allowed to be used
    and False otherwise.

    By default, all features are assumed to be supported
    later we check different conditions and turn off features that
    are not supported on current CloudLinux intallation.
    csi|]}|�k|�qSrr)rr)�unsuppored_featuresrr�
<dictcomp>�sz-get_cl_feature_status_map.<locals>.<dictcomp>)r.r$r*r,�set�	itertools�chainr )Zpanel_supported_featuresZ features_disabled_by_system_typeZfeatures_disabled_by_licenseZ features_disabled_by_environmentr)r/r�get_cl_feature_status_map�s	
r4cCsdd�t���D�S)z,
    Return a list of enabled features.
    cSsg|]\}}|r|�qSrr)rrZis_feature_enabledrrrr�sz+get_cl_enabled_features.<locals>.<listcomp>)r4�itemsrrrr�get_cl_enabled_features�sr6��z
int | NonecCs tdd�rtStdd�rtSdS)zm
    Return the maximum number of hosting accounts that
    are currently allowed by CloudLinux license.
    T)r%N)r�!MAX_HOSTING_ACCOUNTS_SOLO_EDITIONr�"MAX_HOSTING_ACCOUNTS_ADMIN_EDITIONrrrr�get_hosting_accounts_limit�s


r;),Z
__future__rr2�enumrZbase_enum_class�ImportErrorr�strZclcommon.lib.cleditionrrrrr	r
r �__annotations__rrrrrrrrr#r$rrrr&r'r)r(r*r+r,r.r4r6r9r:r;rrrr�<module>sT


$