OwlCyberSecurity - MANAGER
Edit File: features.cpython-311.pyc
� ����V#h�����������������������������U�d�dl�Z�d�dlmZ�d�dlmZmZmZmZ�d�dlm Z ��G�d��de������������Z �ee ������������Zee ���������e d<���e j��������e j��������e j��������fZdefd �Ze j��������e j��������e j��������e j��������fZe j��������e j��������fZe j��������e j��������e j��������fZd Zdefd�Ze j��������e j��������e j��������e j��������fZdefd�Z defd �Z!de"e e#f���������fd�Z$dee ���������fd�Z%dZ&dZ'de(dz��fd�Z)dS�)�����N)�StrEnum)�is_cl_admin_edition�is_cl_shared_pro_edition_safely�is_cl_solo_edition�is_container)� is_ubuntuc��������������������F�����e�Zd�ZdZdZdZdZdZdZdZ 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���������/builddir/build/BUILDROOT/alt-python27-cllib-3.4.28-1.el8.cloudlinux.x86_64/opt/cloudlinux/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������������������������rt����������S�dS�)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_typer0���.���s��������{�{��2�1�1� �2r*���r)���c������������������������t����������d�������������rt����������S�t����������d�������������rt����������S�t ������������������������rt ����������S�t����������S�)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_licenser8���O���sN��������.�.�.��+�(�(� �D� 1� 1� 1��+�)�)� (� *� *��+�.�.�*�*r*���c�������������������0�����t������������������������rt����������S�dS�)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;���b���s��������~�~��.�-�-� �2r*���c�������������������6�����ddl�m}��|������������������������������������S�)Nr�����cpapi)�clcommonr>����get_unsupported_featuresr=���s��� r+����#get_control_panel_disabled_featuresrA���p���s&�������������)�)�+�+�+r*���c��������������������������t������������������������}�t������������������������}t������������������������}t������������������������}t ����������t����������j��������||||���������������������������fd�t����������D���������������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��S�r)���r)���)�.0�feature�unsuppored_featuress��� �r+���� <dictcomp>z-get_cl_feature_status_map.<locals>.<dictcomp>����s1��������������� �� 3�3�����r*���)rA���r0���r8���r;����set� itertools�chainr,���)�panel_supported_features� features_disabled_by_system_type�features_disabled_by_license� features_disabled_by_environmentrF���s��� @r+����get_cl_feature_status_maprO���w���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�|�] \��}}|�|�� S�r)���r)���)rD���rE����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�����t����������d�������������rt����������S�t����������d�������������rt����������S�dS�)zm Return the maximum number of hosting accounts that are currently allowed by CloudLinux license. Tr2���N)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.cleditionr���r���r���r����clcommon.utilsr���r ����listr,����__annotations__r���r���r���r/����tupler0���r!���r"���r%���r4���r5���r&���r'���r(���r7���r6���r8���r:���r;���rA����dict�boolrO���rU���rY���rZ����intr[���r)���r*���r+����<module>re������s=���� ����������������������������������������������%��$��$��$��$��$� �� �� �� �� �g�� �� �� �(�"&��g�����g���.��.��.��������&��"� �u�� �� �� �� �������K��� �������������L��L�������#%���+�5��+��+��+��+�������K��� "����u���������,�U��,��,��,��,�!�4��� �#6��!��!��!��!�H��g�����������%&��!�%&��"� �C�$�J�� �� �� �� �� �� r*���