e2*dZddlmZmZmZmZmZddlmZeedee dded ee d d ed eed ddedee ddedee ddedee dedeedddedededee di Z e fd e d!ed"e fd#Z d$S)%zF This module contains validation schema for config file loaded values )SchemaAndOptionalUse SchemaError)SSAErrordomains_numberc|dkSNrns S/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/configuration/validation.pyrs 16z.number of domains should be a positive integer)error urls_numberc|dkSr r rs rrrs Arz+number of URLs should be a positive integerrequests_durationc t|SNfloatrs rrrs U1XXrc|dkS)Nr rs rrrs Srz#request duration should be positiverequest_numberc|dkSr r rs rrrs 1q5rz/number of requests should be a positive integertimec"d|cxkodkncS)Nr r rs rrrsa2rz8time should be a positive integer between 1 and 12, or 0 correlationz*bad correlation value, should be On or Offcorrelation_coefficientc t|Srrrs rrrs 588rc"d|cxkodkncS)Nrg?r rs rrrssQ~~~~#~~~~rz?correlation coefficient could not be negative or greater than 1 ignore_listc t|Sr)str)ss rrr!s 3q66rsummary_notification_enabledz+bad notification value, should be On or Offdataschemereturnc ||S#t$r$}tdt|d}~wwxYw)z9 Validate given data. Returns validated data zInvalid configuration: N)validaterr r()r+r,es rr/r/'sU ;t$$$ ;;;9Q99:::;s AAAN)__doc__schemarrrrrinternal.exceptionsr intboolconfiguration_schemadictr/r rrr8sC;:::::::::::::******v H C)9)9*Z!\!\!\ H]SSoo'TVVV H !!33ss+=+='>'>'8'8-R$T$T$T H C*[!]!]!] HVcc#55 Z\\\ H]SS'SUUU H &''SS1C1C-D-D-E-E3t*v*v*v H]SS!1!122 H +,,cc$8e/g/g/g%.+?;;4;;4;;;;;;r