eddlZddlmZddlmZddlmZddlmZddl m Z d efd Z d efd Z d e fd Zd eded e fdZdS)N)urlopen)Schema)SSAConfigParser)validate)SSAErrorreturncJt}||S)zB Create parser and load configuration :return: parser )r read_ssa_confconfs Q/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/configuration/__init__.py load_parserr s&   D Kc~t}tt|}|S)zL Create parser, load configuration, validate it :return: parser rrdictitems)r_s rload_validated_parserrs/ ==Ddjjll##$$A Krczt}tt|S)z) Load and validate configuration rr s rload_configurationrs+ ==D D&& ' ''rexternal_sourceschemec d|} t|5}ttj||cdddS#1swxYwYdS#ttjt f$rtt|cYSwxYw)zW Load values from remote JSON config or default values in case of troubles z2https://repo.cloudlinux.com/cloudlinux/sources/da/N)rrjsonloadOSErrorJSONDecodeErrorr r)rr cfg_locationcfgs r load_tunablesr#'s ZYYL( \ " " 4cDIcNNF33 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 T)8 4((('''''(s3A"A AA  A A  A8B  B )rurllib.requestrschemarparserr validationrinternal.exceptionsr rrrrstrr#rrr+s """"""###### ******_(D(((( (3 ( (4 ( ( ( ( ( (r