JFIF$        dd7 

Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/clcommon/__pycache__/features.cpython-311.pyc

�

�K+��m����UddlZddlmZddlmZmZmZmZddlm	Z	Gd�de��Z
ee
��Zee
e
d<e
je
je
je
je
je
je
jfZdefd	�Ze
je
je
je
jfZe
je
jfZe
je
je
jfZd
Zdefd�Ze
je
je
je
jfZ defd�Z!defd
�Z"de#e
e$ffd�Z%dee
fd�Z&dZ'dZ(de)dzfd�Z*dS)�N)�StrEnum)�is_cl_admin_edition�is_cl_shared_pro_edition_safely�is_cl_solo_edition�is_container)�	is_ubuntuc�F�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdS)�FeaturezREnum of available CloudLinux features
    that vendors can disable or enable.
    �php_selector�
ruby_selector�python_selector�nodejs_selector�	mod_lsapi�mysql_governor�lve�wizard�cagefs�reseller_limits�xray�
accelerate_wp�autotracingN)�__name__�
__module__�__qualname__�__doc__�PHP_SELECTOR�
RUBY_SELECTOR�PYTHON_SELECTOR�NODEJS_SELECTOR�LSAPI�GOVERNOR�LVE�WIZARD�CAGEFS�RESELLER_LIMITS�XRAY�WPOS�AUTOTRACING���q/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/features.pyr
r
s[��������"�L�#�M�'�O�'�O��E��H�
�C�
�F�
�F�'�O��D��D��K�K�Kr*r
�ALL_CL_FEATURES�returnc�0�t��rtSdS)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_DISABLEDr)r*r+�%_get_features_disabled_by_system_typer02s���{�{�2�1�1�
�2r*r)c��td���rtStd���rtSt	��rt
StS)NT��skip_jwt_check)r�SOLO_CL_FEATURES_DISABLEDr�ADMIN_CL_FEATURES_DISABLEDr�SHARED_PRO_CL_FEATURES_DISABLED�SHARED_CL_FEATURES_DISABLEDr)r*r+�!_get_features_disabled_by_licenser8SsN����.�.�.�+�(�(�	�D�	1�	1�	1�+�)�)�	(�	*�	*�+�.�.�*�*r*c�0�t��rtSdS)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_DISABLEDr)r*r+�%_get_features_disabled_by_environmentr;fs���~�~�.�-�-�
�2r*c�6�ddlm}|���S)Nr��cpapi)�clcommonr>�get_unsupported_featuresr=s r+�#get_control_panel_disabled_featuresrAts&���������)�)�+�+�+r*c����t��}t��}t��}t��}t	tj||||������fd�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.
    c���i|]}||�v��Sr)r))�.0�feature�unsuppored_featuress  �r+�
<dictcomp>z-get_cl_feature_status_map.<locals>.<dictcomp>�s1�������	�� 3�3���r*)rAr0r8r;�set�	itertools�chainr,)�panel_supported_features� features_disabled_by_system_type�features_disabled_by_license� features_disabled_by_environmentrFs    @r+�get_cl_feature_status_maprO{s���� C�D�D��'L�'N�'N�$�#D�#F�#F� �'L�'N�'N�$����,�(�,�$�		
�	
��������&����r*c�V�d�t�����D��S)z,
    Return a list of enabled features.
    c��g|]	\}}|�|��
Sr)r))rDrE�is_feature_enableds   r+�
<listcomp>z+get_cl_enabled_features.<locals>.<listcomp>�s3�����'�G�'������r*)rO�itemsr)r*r+�get_cl_enabled_featuresrU�s5����+D�+F�+F�+L�+L�+N�+N����r*��c�b�td���rtStd���rtSdS)zm
    Return the maximum number of hosting accounts that
    are currently allowed by CloudLinux license.
    Tr2N)r�!MAX_HOSTING_ACCOUNTS_SOLO_EDITIONr�"MAX_HOSTING_ACCOUNTS_ADMIN_EDITIONr)r*r+�get_hosting_accounts_limitr[�s;��
��.�.�.�2�0�0�	�D�	1�	1�	1�2�1�1��4r*)+rI�enumr�clcommon.lib.cleditionrrrr�clcommon.utilsrr
�listr,�__annotations__rrrr&r(r'r#r/�tupler0r!r"r%r4r5r7r6r8r:r;rA�dict�boolrOrUrYrZ�intr[r)r*r+�<module>resR��
�����������������������%�$�$�$�$�$� � � � � �g� � � �("&��g�����g��.�.�.��������L����L��N�&�"�	�u�	�	�	�	������K���	���������L��L�����#%��+�5�+�+�+�+������K���	"���u�����,�U�,�,�,�,�!�4���
�#6�!�!�!�!�H��g������%&�!�%&�"�	�C�$�J�	�	�	�	�	�	r*
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?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