관리-도구
편집 파일: validations.cpython-311.pyc
� 9�1g � �r � d Z ddlZddlmZ ddlmZmZmZmZm Z m Z ddlmZ ed ee d� d � � � ed� � e ed� � � d � d� � � ed� � e ed� � � d� d� � � ed� � e ed� � � d� d� � � ed� � e ed� � � d� d� � � ed� � e ed� � � d� d� � � ed� � e ed � � � d!� d"� � � ed#� � e ed$� � � d%� d&� � � ed'� � ed(� � � ed)� � e ed*� � � d+� d,� � � i � � Z ed ee d-� d.� � � ed/� � e e d� � ed0� � e ed1� � ei� � Zd2ed3efd4�Zd5ed3efd6�ZdS )7zF This module contains validation schema for config file loaded values � N)� Namespace)�Schema�And�Optional�Use�SchemaError�Or� )�SSAError�commandc � � | dv S )N)z set-configz get-configzget-ssa-statusz get-reportz enable-ssazdisable-ssazget-stat� ��cs �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/ssa_utils/validations.py�<lambda>r s � �!� (4� #4� � zInvalid command)�error�domains_numberc � � t | � � S �N��int��ns r r r � � �#�a�&�&� r c � � | dk S �Nr r r s r r r s � �a�1�f� r z.number of domains should be a positive integer�urls_numberc � � t | � � S r r r s r r r s � �s�1�v�v� r c � � | dk S r r r s r r r s � �1�q�5� r z+number of URLs should be a positive integer�requests_durationc � � t | � � S r ��floatr s r r r s � �U�1�X�X� r c � � | dk S )N� r r s r r r s � ��S�� r z#request duration should be positive�request_numberc � � t | � � S r r r s r r r "