• File: cmdline_parser.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/ssa/cli_utils/__pycache__/cmdline_parser.cpython-37.pyc
  • Date Modified: 06/05/2023 11:41 AM
  • File size: 3.68 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

ed@sPdZddlZddlZddlmZddddZdddd	Zdd
ddd
ZdS)zl
This module contains an argparse command line parser
for cloudlinux-ssa-manager and cloudlinux-autotracing
N)is_cl_solo_editionzargparse.ArgumentParser)returncCs:tjddd}|jdddd}|jdd	tjd
}tdds|jdd
dd|jdddd|jdddd|jdddd|jdddd|jdddd|jdd d!d|jd"d#d$d|jd%d&d'd|jd(d)tjd
|jd*d+tjd
|jd,d-tjd
|jd.d/tjd
|jd0d1tjd
|jd2d3tjd
|S)4zh
    Command line parser for SSA manager utility using built-in argparse module
    :return: parser
    zcloudlinux-ssa-managerzUtility to manage SSA)progdescriptionCommandscommandT)titledestrequiredz
set-configzSet SSA configuration)helpZargument_default)Zskip_jwt_checkz--domains-numberZDOMAINS_NUMBERz!Size of TOP list for slow domains)Zmetavarrz--request-numberZREQUEST_NUMBERz[The threshold value of slow requests number in the period of time to mark URL as a slow onez--timeZTIMEz:Period of time in hours required to analyze these requestsz
--correlationZCORRELATIONz%Flag to enable or disable correlationz--correlation-coefficientZCORRELATION_COEFFICIENTz.The threshold value of correlation coefficientz
--urls-numberZURLS_NUMBERzSize of TOP list for slow urlsz--requests-durationZREQUESTS_DURATIONz2The threshold value of request duration in secondsz
--ignore-listZIGNORE_LISTzGList of URLs or domains that should not be included in the daily reportz--summary-notification-enabledZSUMMARY_NOTIFICATIONz.Turn on|off sending the daily report by e-mailz
get-configzGet SSA configurationzget-ssa-statuszGet current status of SSAz
enable-ssaz
Enable SSAzdisable-ssazDisable SSAz
get-reportzGet the latest reportzget-statzGet the SSA statistics)argparseArgumentParseradd_subparsers
add_parserZSUPPRESSradd_argument)parser
subparsersZset_config_parserrM/opt/alt/python37/lib/python3.7/site-packages/ssa/cli_utils/cmdline_parser.pycmd_parser_managersN







rcCstjddd}|jdddd}|jdd	d
}|jddd
dd|jddddd|jddd
}|jddd
dd|jddddd|jddd
}|jddd
dd|jddddd|S)z`
    Command line parser for Autotracing using built-in argparse module
    :return: parser
    zcloudlinux-autotracingzUtility to manage Auto Tracing)rrrrT)rr	r
ZenablezEnable Auto Tracing feature)rz--allZ
store_trueFzenable for all users)actiondefaultruser?Nzenable for a particular user)ZnargsrrZdisablezDisable Auto Tracing featurezdisable for all userszdisable for a particular userZstatusz"Get status of Auto Tracing featurez--list-disabledzlist disabled userszstatus of a particular user)rr
rrr)rrZe_parserZd_parserZs_parserrrrcmd_parser_autotracing_utilBs.





rzargparse.Namespace)rrc
CsLy|}|Stk
rF}ztjddt|idWdd}~XYnXdS)z}
    Parse arguments with given parser
    :param parser: an instance of ArgumentParser
    :return: arguments Namespace
    zInvalid utility invocationerr)ZextraN)Z
parse_args
SystemExitloggingerrorstr)rargserrrparse_cmd_argumentsdsr")__doc__rrZclcommon.lib.cleditionrrrr"rrrr<module>s0#