hwdZddlZddlmZddlmZmZddlmZm Z ddl m Z ddl m Z mZeeefZejeZGdd eZdS) 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)Any) MessageType ServerConfig) MessageSinkexpect)Scope)get_imunify_patch_idget_imunify_patch_purchase_urlceZdZejZejjZ dZ e e j de de fdZdedefdZdS)$EnrichServerConfigWithImunifyPatchIdc KdSN)selfloops R/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/imunify_patch_id.py create_sinkz0EnrichServerConfigWithImunifyPatchId.create_sink,s  messagereturncNKd|vrfd|dDd{V|d<|S)NuserscJKg|]}|d{VSr)_enrich_user_data).0userrs r zMEnrichServerConfigWithImunifyPatchId.enrich_server_config..4sJ   7;d,,T22222222   rr)rrs` renrich_server_configz9EnrichServerConfigWithImunifyPatchId.enrich_server_config/sk g      ?Fw?O         GG rrcKd|vrtd||St|dd{V|d<t|dd{V|d<|S)Nusernamez)User data missing 'username' field: user=imunify_patch_user_idimunify_patch_purchase_url)loggerwarningr r )rrs rrz6EnrichServerConfigWithImunifyPatchId._enrich_user_data:s T ! ! NNI$II J J JK.B  / / ) ) ) ) ) )  $% 1j1ABB B B B B B B (  rN)__name__ __module__ __qualname__rAV_IM360SCOPErProcessingOrderPRE_PROCESS_MESSAGEPROCESSING_ORDERrrrrrUserDatarrrrr r (s NE"2F    VK $%%# &% H       rr )__doc__loggingtypingr"defence360agent.contracts.messagesrr!defence360agent.contracts.pluginsrrdefence360agent.utilsrimav.contracts.imunify_patch_idr r dictstrr- getLoggerr%r#r rrrr8s*HHHHHHHH(''''' S>  8 $ $;r