관리-도구
편집 파일: cmdline_parser.cpython-311.pyc
� 9�1g$ � �: � d Z ddlZddlZd d�Zd d�Z dd �ZdS )zl This module contains an argparse command line parser for cloudlinux-ssa-manager and cloudlinux-autotracing � N�return�argparse.ArgumentParserc �� � t j dd�� � } | � ddd�� � }|� dd t j � � � }|� ddd �� � |� ddd�� � |� ddd�� � |� ddd�� � |� ddd�� � |� ddd�� � |� ddd �� � |� d!d"d#�� � |� d$d%d&�� � |� d'd(t j � � � |� d)d*t j � � � |� d+d,t j � � � |� d-d.t j � � � |� d/d0t j � � � |� d1d2t j � � � | S )3zh Command line parser for SSA manager utility using built-in argparse module :return: parser zcloudlinux-ssa-managerzUtility to manage SSA��prog�description�Commands�commandT��title�dest�requiredz set-configzSet SSA configuration)�help�argument_defaultz--domains-number�DOMAINS_NUMBERz!Size of TOP list for slow domains)�metavarr z--request-number�REQUEST_NUMBERz[The threshold value of slow requests number in the period of time to mark URL as a slow onez--time�TIMEz:Period of time in hours required to analyze these requestsz --correlation�CORRELATIONz%Flag to enable or disable correlationz--correlation-coefficient�CORRELATION_COEFFICIENTz.The threshold value of correlation coefficientz --urls-number�URLS_NUMBERzSize of TOP list for slow urlsz--requests-duration�REQUESTS_DURATIONz2The threshold value of request duration in secondsz --ignore-list�IGNORE_LISTzGList of URLs or domains that should not be included in the daily reportz--summary-notification-enabled�SUMMARY_NOTIFICATIONz.Turn on|off sending the daily report by e-mailz get-configzGet SSA configurationzget-ssa-statuszGet current status of SSAz enable-ssaz Enable SSAzdisable-ssazDisable SSAz get-reportzGet the latest reportzget-statzGet the SSA statistics)�argparse�ArgumentParser�add_subparsers� add_parser�SUPPRESS�add_argument)�parser� subparsers�set_config_parsers �S/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/ssa_utils/cmdline_parser.py�cmd_parser_managerr% s� � � � $�*B�1H�J� J� J�F��&�&�Z�i�04� '� 6� 6�J� #�-�-�l�3J�?G�?P� .� R� R�� �"�"�#5�?O�(K� #� M� M� M��"�"�#5�?O� )F� #� G� G� G��"�"�8�V�(d� #� f� f� f��"�"�?�M�(O� #� Q� Q� Q��"�"�#>�Ha�(X� #� Z� Z� Z��"�"�?�M�(H� #� J� J� J��"�"�#8�BU�(\� #� ^� ^� ^��"�"�?�M�(q� #� s� s� s��"�"�#C�Mc�(X� #� Z� Z� Z� ���,�-D�+3�+<� � >� >� >����*�1L�+3�+<� � >� >� >����,�\�+3�+<� � >� >� >����-�m�+3�+<� � >� >� >����,�-D�+3�+<� � >� >� >����*�+C�+3�+<� � >� >� >��M� c � � t j dd�� � } | � ddd�� � }|� dd � � � }|� ddd d�� � |� dddd�� � |� dd� � � }|� ddd d�� � |� dddd�� � |� dd� � � }|� ddd d�� � |� dddd�� � | S )z` Command line parser for Autotracing using built-in argparse module :return: parser zcloudlinux-autotracingzUtility to manage Auto Tracingr r r Tr �enablezEnable Auto Tracing feature)r z--all� store_trueFzenable for all users)�action�defaultr �user�?Nzenable for a particular user)�nargsr+ r �disablezDisable Auto Tracing featurezdisable for all userszdisable for a particular user�statusz"Get status of Auto Tracing featurez--list-disabledzlist disabled userszstatus of a particular user)r r r r r )r! r"