HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clwizard/__pycache__/parser.cpython-37.opt-1.pyc
B

��r]f���@s<ddlmZddlZddlZddlmZdd�Zdd�ZdS)�)�absolute_importN)�get_supported_modulesc
Cs�yt�|�}Wn2ttfk
r@}zt�d�|�Wdd}~XYnXt�}x�|��D]�\}}||kr|t�d|t|�	��f��dt|�	��kr�t
|d�	���||���s�t�d|t|d�	��f��qR|rRt�d|t|�	��f��qRW|S)NzInvalid JSON data passedz>'%s' module is not supported at the moment, available keys: %sZoptionsz%'%s' module has incorrect options: %sz*'%s' module has incorrect instructions: %s)
�json�loads�	TypeError�
ValueError�argparseZArgumentTypeErrorr�items�list�keys�set�issubsetZsupported_options)Zjson_string�dataZ
json_errorZsupported_modules�nameZinstructions�r�py/clwizard/parser.py�validate_json_moduless*rc	Cs�tjddd�}|jddtjd�|jdd�}|jd	d
d�}|jdd
dd�|jdddd�|jdd�}|jddtd�|jdddd�|jddd�}|jddddd�|jddd�}|jdd d�}|jd!tt	��d"�|�
|�}|S)#z2
    Arg parser for cloudlinux-wizard utility
    zcloudlinux-wizardz)Utility for installing cloudlinux modules)�progZdescriptionz--json�
store_true)�action�help�	subparser)�destZinstallzLInstall a module. The installation is performed in the background by default)rz
--no-asynczInstall in the foreground)rrz--forcez4Force the installer to ignore existing installationsT)Zrequiredz--json-dataz!JSON with modules to be installed)r�typez--resumez@Restart the installation process with previously given argumentsZstatusz(Return JSON with statuses of all modulesz	--initialz-izGet the current modules' statusZfinishz6Finalize the installation from UI and close the wizardZcancelz+Remove a module from the installation queue�module)�choices)r�ArgumentParser�add_argumentZSUPPRESSZadd_subparsersZ
add_parserZadd_mutually_exclusive_grouprr
r�
parse_args)	�argv�parserrZinstall_parserZinstaller_groupZ
status_parserZ
finish_parserZ
cancel_parserZoptsrrr�parse_cloudlinux_wizard_opts/sD



r!)Z
__future__rrrZclwizard.modulesrrr!rrrr�<module>	s