ځL " b d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z m
Z
G d de ZdS ) )PanelException)DirectAdmin)HostingPanel)ValidationError)
RootEndpointsbindc 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_panelenable_imunify_pluginselfplugin_names ]/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/simple_rpc/hosting_panel.py
enable_pluginz#HostingPanelEndpoints.enable_plugin s/ '==kJJJJJJJJJ zdisable-pluginc F K | j | d {V S r )r
disable_imunify_pluginr s r disable_pluginz$HostingPanelEndpoints.disable_plugin
s/ '>>{KKKKKKKKKr zadd-sudouserc K | j }t |t st d | | d {V S Nz&Feature available only for DirectAdmin)r
isinstancer r add_sudouserr userhps r r z"HostingPanelEndpoints.add_sudouser sT
"k** L!"JKKK__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!"JKKK''---------r z
list-docrootsc H K d| j d {V iS )Nitems)r
list_docroots)r s r get_docrootsz"HostingPanelEndpoints.get_docroots! s2 t1??AAAAAAAABBr 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/K K K K
T
L L L L
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