HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //opt/cloudlinux/venv/lib/python3.11/site-packages/clwizard/__pycache__/parser.cpython-311.pyc
�

�
�9t�8��.�ddlZddlZddlmZd�Zd�ZdS)�N)�get_supported_modulesc
�<�	tj|��}n.#ttf$r}t	jd��|�d}~wwxYwt
��}|���D�]3\}}||vr9t	jd|�dt|�	���������dt|�	����vr�t|d�	�����||�����s?t	jd|�dt|d�	�����������|r9t	jd|�dt|�	�����������5|S)NzInvalid JSON data passed�'z9' module is not supported at the moment, available keys: �optionsz ' module has incorrect options: z%' module has incorrect instructions: )
�json�loads�	TypeError�
ValueError�argparse�ArgumentTypeErrorr�items�list�keys�set�issubset�supported_options)�json_string�data�
json_error�supported_modules�name�instructionss      �py/clwizard/parser.py�validate_json_modulesrs���U��z�+�&�&�����z�"�U�U�U��(�)C�D�D�*�T�����U����.�/�/��#�j�j�l�l�����l��(�(�(��,�D�D�D�D�#'�(9�(>�(>�(@�(@�#A�#A�D�D���
���\�.�.�0�0�1�1�1�1��|�I�.�3�3�5�5�6�6�?�?�%�d�+�=�=�?�?���
��0�d��d�d�d�<�PY�CZ�C_�C_�Ca�Ca�>b�>b�d�d����
��	��,�Z�D�Z�Z�t�L�DU�DU�DW�DW�?X�?X�Z�Z���
�	��Ks��A�=�Ac��tjdd���}|�ddtj���|�d���}|�d	d
���}|�dd
d���|�ddd���|�d���}|�ddt���|�ddd���|�dd���}|�dddd���|�dd���}|�dd ���}|�d!tt�����"��|�
|��}|S)#z2
    Arg parser for cloudlinux-wizard utility
    zcloudlinux-wizardz)Utility for installing cloudlinux modules)�prog�descriptionz--json�
store_true)�action�help�	subparser)�dest�installzLInstall a module. The installation is performed in the background by default)r z
--no-asynczInstall in the foreground)r rz--forcez4Force the installer to ignore existing installationsT)�requiredz--json-dataz!JSON with modules to be installed)r �typez--resumez@Restart the installation process with previously given arguments�statusz(Return JSON with statuses of all modulesz	--initialz-izGet the current modules' status�finishz6Finalize the installation from UI and close the wizard�cancelz+Remove a module from the installation queue�module)�choices)r�ArgumentParser�add_argument�SUPPRESS�add_subparsers�
add_parser�add_mutually_exclusive_grouprrr�
parse_args)	�argv�parserr!�install_parser�installer_group�
status_parser�
finish_parser�
cancel_parser�optss	         r�parse_cloudlinux_wizard_optsr:+s����
$�
 �?����F�
�����H�<M��N�N�N��%�%�;�%�7�7�I��)�)��
[�*���N�����6�|� ��������
C�� ����%�A�A�4�A�P�P�O�� � ��
0�
"�!����
� � ��
O��!�����(�(��A�)���M�����T�,�5V������(�(��O�)���M��(�(��D�)���M����x��6K�6M�6M�1N�1N��O�O�O����T�"�"�D��K�)rr�clwizard.modulesrrr:�r;r�<module>r>sS����������2�2�2�2�2�2����:6�6�6�6�6r;