관리-도구
편집 파일: control.cpython-311.opt-1.pyc
� IMg� � �� � d dl Z d dlZd dlmZ d dlmZmZmZmZ d dl m Z d dlmZ d dl mZ ej e� � Zd� Zd� Zed � � � Zed � � � Zed� � � ZdS )� N)�Version)�EXTENSION_DEFAULTS�FEATURE_EXT_VARIABLES�NATIVE_EXTENSION_NAME�1NATIVE_FEATURE_MANAGEMENT_PACKAGE_EXTENSION_FILES)�reset_features)�cPanel)�HostingPanelc �F � � t j � � � � fd�� � }|S )z-Do not run a function on an unsupported panelc � � �K � t � � � d {V ��r �| i |��� d {V ��S t � d� � d S )Nz*Native feature management is not supported)�&is_native_feature_management_supported�logger�info)�args�kwargs�funcs ��_/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/feature_management/control.py�wrapperzsupported.<locals>.wrapper sg �� � � �7�9�9�9�9�9�9�9�9� /���t�.�v�.�.�.�.�.�.�.�.�.����@�A�A�A�A�A� )� functools�wraps)r r s ` r � supportedr s? �� � �_�T���B� B� B� B� ��B� �Nr c � �� K � t � � } | j t j k rJ t | � � � � d{V ��� � t d� � k S # t $ r Y dS w xY wdS )z:Whether we support native feature management on the panel.Nz68.0F)r �NAMEr r �version� ValueError��hps r r r s� � � � � ���B� �w�&�+��� �������-�-�-�-�-�-�.�.�'�&�/�/�A�A��� � � ��5�5� ���� �5s �7A � A-�,A-c � � K � t � � } | � t �� � o| � � � � d{V ��S )z1Whether the native feature management is enabled.)�pkgsN)r �is_extension_installedr �is_hook_installedr s r �$is_native_feature_management_enabledr# + sY � � � � ���B� �!�!�B� "� � � )� �&�&�(�(�(�(�(�(�(�(� r c � � K � t � � } t di d� t j � � D � � ��� d{V �� | j t t fi t ��� d{V �� t � d� � dS )z!Enable native feature management.c �0 � i | ]\ }}|t | ��S � )r )�.0�feature�pe_vars r � <dictcomp>z4enable_native_feature_management.<locals>.<dictcomp>@ s4 � � � � ���� �'��/� � � r Nz-Imunify360 native feature management enabled.r&