관리-도구
편집 파일: validations.cpython-37.pyc
B � d � @ s� d Z ddlZddlmZ ddlmZmZmZmZm Z m Z ddlmZ edee dd � d d�ed�eed d � �dd � dd�ed�eedd � �dd � dd�ed�eedd � �dd � dd�ed�eedd � �dd � dd�ed�eedd � �dd � dd�ed �eed!d � �d"d � d#d�ed$�eed%d � �d&d � d'd�ed(�ed)d � �ed*�eed+d � �d,d � d-d�i �Zedee d.d � d/d�ed0�e e d�ed1�eed2�ei�Zeed3�d4d5�Zeed6�d7d8�ZdS )9zF This module contains validation schema for config file loaded values � N)� Namespace)�Schema�And�Optional�Use�SchemaError�Or� )�SSAError�commandc C s | dkS )N)z set-configz get-configzget-ssa-statusz get-reportz enable-ssazdisable-ssazget-stat� )�cr r �J/opt/alt/python37/lib/python3.7/site-packages/ssa/cli_utils/validations.py�<lambda> � r zInvalid command)�errorZdomains_numberc C s t | �S )N)�int)�nr r r r r c C s | dkS )Nr r )r r r r r r z.number of domains should be a positive integerZurls_numberc C s t | �S )N)r )r r r r r r c C s | dkS )Nr r )r r r r r r z+number of URLs should be a positive integerZrequests_durationc C s t | �S )N)�float)r r r r r r c C s | dkS )Ng r )r r r r r r z#request duration should be positiveZrequest_numberc C s t | �S )N)r )r r r r r "