Edit File: cl_summary_arg_parse.cpython-311.pyc
� c|9e� � �H � d dl mZ d dlmZ d dlmZ d dlmZmZmZmZ d� Z dS )� )�absolute_import)�docopt)� DocoptExit)�Schema�SchemaError�Or�Usec � � d}d� |� � } t || � � }n# t $ r d}d|fcY S w xY wt t t t t t t t t t t t t t t � � d� � t d� � � } |� |� � }d}n(# t $ r}t |� � }d}Y d}~nd}~ww xY w||fS )z Parse arguments for cloudlinux-summary command :param argv: sys.argv :return cortege: (error_flag, s_message) zcloudlinux-summarya� Utility to get Cloudlinux usage statistics Usage: {0} [--json] [--send] [--force-collect] [--lve-id <int>] [--async] {0} status [--json] {0} rpm-packages [--json] [--lve-id <int>] [--send] [--force-collect] {0} get-remote [--json] [--lve-id <int>] {0} enable [--json] [--lve-id <int>] {0} disable [--json] [--lve-id <int>] {0} enable-rpm [--json] {0} disable-rpm [--json] {0} (-h | --help) Options: --json Return data in JSON format. --send Send summary to the CloudLinux server --force-collect Ignore global settings.json when collecting statistics --lve-id <int> LVE for summary script. For internal use only. --async Start background process collecting statistics, return immediately -h, --help Show this help message and exit zERROR: Invalid parameter passedFN) z get-remotezrpm-packages�status�enable�disablez enable-rpmzdisable-rpmz--jsonz--sendz--force-collectz--helpz--lve-idz--asyncT)�formatr r r �boolr r �int�validater �str)�argv� prog_name� docstring�args�s_error_string�sr �es �U/opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/cl_summary_arg_parse.py�parse_cloudlinux_summary_optsr s � � %�I��( �F�9���) �*%��i��&�&����� %� %� %�:���n�$�$�$�$�%���� �������������s�3�x�x��&�&��� � � �A� ��z�z�$��������� � � ��1�v�v����������������� �4�<�s$ �* �=�=�:C � C7�C2�2C7N) � __future__r r r �schemar r r r r � � r �<module>r sz �� '� &� &� &� &� &� � � � � � � � � � � � � /� /� /� /� /� /� /� /� /� /� /� /�8� 8� 8� 8� 8r