g' .ddlZddlZddlmZdZdZdS)N)get_supported_modulesc < tj|}n.#ttf$r}t jd|d}~wwxYwt }|D]3\}}||vr9t jd|dt| dt| vrt|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: ) jsonloads TypeError ValueErrorargparseArgumentTypeErrorritemslistkeyssetissubsetsupported_options) json_stringdata json_errorsupported_modulesname instructionss F/opt/cloudlinux/venv/lib64/python3.11/site-packages/clwizard/parser.pyvalidate_json_modulesrsUz+&& z "UUU()CDD*TU.//#jjlll ( ( (,DDDD#'(9(>(>(@(@#A#ADD  \..0011 1 1|I.335566??%d+==?? 0ddddb>bdd   ,ZDZZtLDUDUDWDW?X?XZZ   KsA=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)actionhelp subparser)destinstallzLInstall 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 argumentsstatusz(Return JSON with statuses of all modulesz --initialz-izGet the current modules' statusfinishz6Finalize the installation from UI and close the wizardcancelz+Remove a module from the installation queuemodule)choices) r ArgumentParser add_argumentSUPPRESSadd_subparsers add_parseradd_mutually_exclusive_grouprrr parse_args) argvparserr!install_parserinstaller_group status_parser finish_parser cancel_parseroptss rparse_cloudlinux_wizard_optsr:+s $ ?F  Hr>sS 222222:66666r;