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



]j
$UddlZddlmZddlmZmZmZmZddlm	Z	GddeZ
ee
Zee
e
d<e
je
je
jgZdee
fd	Ze
je
je
je
jgZe
je
jgZe
je
je
jgZgZee
e
d
<dee
fdZe
je
je
je
jgZdee
fdZdee
fd
Z de!e
e"ffdZ#dee
fdZ$dZ%dZ&de'dzfdZ(dS)N)StrEnum)is_cl_admin_editionis_cl_shared_pro_edition_safelyis_cl_solo_editionis_container)	is_ubuntucFeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdS)FeaturezS
    Enum of available CloudLinux features that vendors can disable or enable.
    php_selector
ruby_selectorpython_selectornodejs_selector	mod_lsapimysql_governorlvewizardcagefsreseller_limitsxray
accelerate_wpautotracingN)__name__
__module____qualname____doc__PHP_SELECTOR
RUBY_SELECTORPYTHON_SELECTORNODEJS_SELECTORLSAPIGOVERNORLVEWIZARDCAGEFSRESELLER_LIMITSXRAYWPOSAUTOTRACINGq/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/features.pyr
r
s["L#M'O'OEH
C
F
F'ODDKKKr*r
ALL_CL_FEATURESreturnc0trtSgS)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!UBUNTU_BASED_CL_FEATURES_DISABLEDr)r*r+%_get_features_disabled_by_system_typer0.s{{100
Ir*SHARED_PRO_CL_FEATURES_DISABLEDctdrtStdrtSt	rt
StS)NTskip_jwt_check)rSOLO_CL_FEATURES_DISABLEDrADMIN_CL_FEATURES_DISABLEDrr1SHARED_CL_FEATURES_DISABLEDr)r*r+!_get_features_disabled_by_licenser8OsN...+((	D	1	1	1+))	(	*	*+..**r*c0trtSgS)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
    )rCONTAINER_CL_FEATURES_DISABLEDr)r*r+%_get_features_disabled_by_environmentr;bs~~.--
Ir*c6ddlm}|S)Nrcpapi)clcommonr>get_unsupported_featuresr=s r+#get_control_panel_disabled_featuresrAps&))+++r*ct}t}t}t}t	tj||||fdtDS)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.
    ci|]}||vSr)r)).0featureunsuppored_featuress  r+
<dictcomp>z-get_cl_feature_status_map.<locals>.<dictcomp>s1	 33r*)rAr0r8r;set	itertoolschainr,)panel_supported_features features_disabled_by_system_typefeatures_disabled_by_license features_disabled_by_environmentrFs    @r+get_cl_feature_status_maprOws CDD'L'N'N$#D#F#F 'L'N'N$,(,$		
	
&r*cVdtDS)z,
    Return a list of enabled features.
    cg|]	\}}||
Sr)r))rDrEis_feature_enableds   r+
<listcomp>z+get_cl_enabled_features.<locals>.<listcomp>s3'G'r*)rOitemsr)r*r+get_cl_enabled_featuresrUs5+D+F+F+L+L+N+Nr*cbtdrtStdrtSdS)zm
    Return the maximum number of hosting accounts that
    are currently allowed by CloudLinux license.
    Tr3N)r!MAX_HOSTING_ACCOUNTS_SOLO_EDITIONr"MAX_HOSTING_ACCOUNTS_ADMIN_EDITIONr)r*r+get_hosting_accounts_limitr[s;
...200	D	1	1	12114r*))rIenumrclcommon.lib.cleditionrrrrclcommon.utilsrr
listr,__annotations__rrrr/r0r!r"r%r5r6r&r'r(r7r1r8r:r;rAdictboolrOrUrYrZintr[r)r*r+<module>rds\
%$$$$$     g   ("&gg...%!	tG}				K	LL24g333+4=++++K	"tG},T'],,,,!4
#6!!!!Hg%&!%&"	C$J						r*
Back to Directory File Manager