1dsJj d dl Zd dlmZmZ d dlmc mc mZ d dl
mZmZ d dl
mZmZmZ d dlmZ d dlmZ G d dej Z G d d
ej ZdS ) N)ListOptional)MyImunifyConfigis_mi_freemium_license) MyImunify#set_protection_status_for_all_usersupdate_users_protection)lookup)Scopec e Zd Zej Z ej dd dee de fd Z
ej dd d Z ej dd d Zd
S )MyImunifyEndpoints myimunifyupdateitems
protectionc J K t | j ||dk d {V i S )Nenabled)r _sink)selfr r s Y/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/simple_rpc/myimunify.pyr zMyImunifyEndpoints.update sK %JzY6
z
enable-allc @ K t | j d d {V d S )NTr r r s r
enable_allzMyImunifyEndpoints.enable_all s0 1$*dCCCCCCCCCCCr zdisable-allc @ K t | j d d {V d S )NFr r s r disable_allzMyImunifyEndpoints.disable_all s0 1$*eDDDDDDDDDDDr N)
__name__
__module____qualname__r IM360SCOPEr
bindr strr r r r r r
r
s KEV[h''$s) (' V[l++D D ,+D V[m,,E E -,E E Er r
c t e Zd Zej Z ej dd ddee de
e fd ZdS )MyImunifyCommonEndpointsr statusNr userc
K t j }t j }||g}t j r| d {V |g }t t | d }t j dz t j
ddd||| d z }t j t j | }t j |t' d |D dS )Nz/?cloudlinux_advantageprovisioningmy_imunify_account_protection)mactionsuiteusernamedomain server_ipc 0 g | ]}|d |d dS )r) r )r1 r r% ).0items r