Edit File: parser.cpython-311.pyc
� ��e� � � � d Z ddlZddlmZmZ ddlmZmZ ddlm Z ddl mZ dZ ej d � � Z G d � de� � ZdS )a� This module contains SSA specific config parser: - has defaults - adds default values for ones missing in config file - allows duplicates, the latest value is loaded - performs value normalization during loading items: - to int - to float - to bool - 'correlation' is case-insensitive and allowed to be on, off, 1, 0, yes, no, true, false - loads default configuration in case of missing config file � N)�ConfigParser�NoSectionError)�Callable�List)�is_cl_solo_edition� )�config_file�ssa_conf�ssa_configuration_parserc �� � � e Zd ZdZ� fd�Zedefd�� � Zedefd�� � Zedefd�� � Z de ded edefd �Ze ddfded ededee fd�Zd� Zdd�Zdeddfd�Zdd�Zd� Z� xZS )�SSAConfigParserz2 SSA specific configparser implementation c � �� t d�� � }|rdndd|rdndd|rdnd|rdndd d dd� }dd dddddddd� | _ |� � � | _ t � � � |d�� � d S )NT)�skip_jwt_checkr � � � g @Fg�������?� ) �domains_number�urls_number�request_number�requests_duration�time�correlation�correlation_coefficient�ignore_list�summary_notification_enabledz!Size of TOP list for slow domainszSize of TOP list for slow urlsz[The threshold value of slow requests number in the period of time to mark URL as a slow onez2The threshold value of request duration in secondsz:Period of time in hours required to analyze these requestsz.Flag to enable or disable correlation (On/Off)z.The threshold value of correlation coefficientzEList of URLs or domains that should not be included in a daily reportzBFlag to enable or disable sending daily reports by e-mail (On/Off))�strict)r � _comments�copy�ssa_defaults�super�__init__)�self�cl_solo�defaults� __class__s ��O/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/configuration/parser.pyr"