|9e :ddlmZddlZddlZddlmZdZdZdS))absolute_importN)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 ( ( (,,(,d3D3I3I3K3K.L.L.LN  \..0011 1 1|I.335566??%d+==?? 00ttT,y"9">">"@"@AAAC  ,,44l//112224   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!r z--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@se'&&&&& 222222>66666r<