(z* d Z ddlZddlZddlmZ ddlmZ ddlmZm Z m
Z
ddlZddlm
Z
mZ ej e Z G d de Z G d d
Z G d de ZdS )
u
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
N)StrEnum)Path)AnyDictList) check_run
nice_iteratorc e Zd ZdZdZdS )PatchmanCustomIntegrationTypefilescriptN)__name__
__module____qualname__FILESCRIPT U/opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/custom_integration.pyr r # s D
FFFr r c e Zd ZdZdddddddddddddddddg ddd d
dddZded
efdZed Zed Z de
de
fdZde
fdZde
eeef fdZdS )PatchmanCustomIntegrationa`
Patchman custom integration uses pre-defined user files that can be
either files with info about users (file integration) or scripts (script
integration). This class is designed to retrieve the users and provide them
to the DB the same way panels do.
More info:
https://docs.imunify360.com/Patchman_custom_integration.pdf
stringT)typerequired)r r nullablebooleaninteger) )r allowedr dict)homediremailparentlanguage suspendedleveldomainsintegration_type
metadata_pathc " || _ || _ d S N)_integration_type_metadata_path)selfr* r+ s r __init__z"PatchmanCustomIntegration.__init__= s !1+r c * t | j S r- )r r. r0 s r r* z*PatchmanCustomIntegration.integration_typeA s ,T-CDDDr c * t | j S r- )r r/ r3 s r r+ z'PatchmanCustomIntegration.metadata_pathE s D'(((r
users_datareturnc t j | j }i }| D ]A\ }}| | s"t
d||j <|||<