관리-도구
편집 파일: hosting_panel.cpython-311.pyc
� IMg� � �b � d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z m Z G d� de � � ZdS ) � )�PanelException)�DirectAdmin)�HostingPanel)�ValidationError)� RootEndpoints�bindc �� � e Zd Z ed� � d d�� � Z ed� � d d�� � Z ed� � d� � � Z ed� � d � � � Z ed � � d� � � Ze d� � � Z dS )�HostingPanelEndpointsz enable-pluginNc � �F K � | j � |� � � d {V ��S �N)� hosting_panel�enable_imunify360_plugin��self�plugin_names �]/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/simple_rpc/hosting_panel.py� enable_pluginz#HostingPanelEndpoints.enable_plugin s/ � � � ��'�@�@��M�M�M�M�M�M�M�M�M� zdisable-pluginc � �F K � | j � |� � � d {V ��S r )r �disable_imunify360_pluginr s r �disable_pluginz$HostingPanelEndpoints.disable_plugin s/ � � � ��'�A�A�+�N�N�N�N�N�N�N�N�Nr zadd-sudouserc � � K � | j }t |t � � st d� � �|� |� � � d {V ��S �Nz&Feature available only for DirectAdmin)r � isinstancer r �add_sudouser�r �user�hps r r z"HostingPanelEndpoints.add_sudouser sT � � � � � ���"�k�*�*� L�!�"J�K�K�K��_�_�T�*�*�*�*�*�*�*�*�*r zdelete-sudouserc � � K � | j }t |t � � st d� � �|� |� � � d {V ��S r )r r r r �delete_sudouserr s r r z%HostingPanelEndpoints.delete_sudouser sV � � � � � ���"�k�*�*� L�!�"J�K�K�K��'�'��-�-�-�-�-�-�-�-�-r z list-docrootsc � �H K � d| j � � � � d {V ��iS )N�items)r � list_docroots)r s r �get_docrootsz"HostingPanelEndpoints.get_docroots! s2 � � � ��t�1�?�?�A�A�A�A�A�A�A�A�B�Br c �| � t � � S # t $ r!}t t |� � � � �d }~ww xY wr )r r r �str)r �es r r z#HostingPanelEndpoints.hosting_panel% sD � � *��>�>�!��� *� *� *�!�#�a�&�&�)�)�)����� *���s � � ;�6�;r )�__name__� __module__�__qualname__r r r r r r$ �propertyr � r r r r s � � � � � � �T�/���N� N� N� ��N� �T� ���O� O� O� ��O� �T�.���+� +� ��+� �T� ���.� .� ��.� �T�/���C� C� ��C� �*� *� �X�*� *� *r r N)�"defence360agent.subsys.panels.baser �)defence360agent.subsys.panels.directadminr �+defence360agent.subsys.panels.hosting_panelr �defence360agent.rpc_toolsr � defence360agent.rpc_tools.lookupr r r r, r r �<module>r2 s� �� =� =� =� =� =� =� A� A� A� A� A� A� D� D� D� D� D� D� 5� 5� 5� 5� 5� 5� @� @� @� @� @� @� @� @�"*� "*� "*� "*� "*�M� "*� "*� "*� "*� "*r