33# created: 2018-03-31
44
55"""
6- CloudLinux Build System builds sign node configuration storage.
6+ AlmaLinux Build System builds sign node configuration storage.
77"""
88
9- from .utils .config import BaseConfig
10- from .utils .file_utils import normalize_path
11-
12- __all__ = ["SignNodeConfig" ]
9+ from albs_common_lib .utils .file_utils import normalize_path
10+ from albs_sign_lib .constants import DEFAULT_PARALLEL_FILE_UPLOAD_SIZE
1311
12+ from .utils .config import BaseConfig
1413
1514DEFAULT_MASTER_URL = 'http://web_server:8000/api/v1/'
1615DEFAULT_WS_MASTER_URL = 'ws://web_server:8000/api/v1/'
1716DEFAULT_PULP_HOST = "http://pulp"
1817DEFAULT_PULP_USER = "pulp"
1918DEFAULT_PULP_PASSWORD = "test_pwd"
2019DEFAULT_PULP_CHUNK_SIZE = 8388608 # 8 MiB
21- # Max file size to allow parallel upload for
22- DEFAULT_PARALLEL_FILE_UPLOAD_SIZE = 52428800 # 500 MB
2320DEFAULT_PGP_PASSWORD = "test_pwd"
2421DEFAULT_SENTRY_DSN = ""
2522DEFAULT_SENTRY_ENVIRONMENT = "dev"
2623DEFAULT_SENTRY_TRACES_SAMPLE_RATE = 0.2
2724DEFAULT_JWT_TOKEN = "test_jwt"
2825
29- COMMUNITY_KEY_SUFFIX = 'ALBS community repo'
30-
3126GPG_SCENARIO_TEMPLATE = (
3227 '%no-protection\n '
3328 'Key-Type: RSA\n '
@@ -64,6 +59,7 @@ def __init__(self, config_file=None, **cmd_args):
6459 "pulp_user" : DEFAULT_PULP_USER ,
6560 "pulp_password" : DEFAULT_PULP_PASSWORD ,
6661 "pulp_chunk_size" : DEFAULT_PULP_CHUNK_SIZE ,
62+ "parallel_upload" : True ,
6763 "parallel_upload_file_size" : DEFAULT_PARALLEL_FILE_UPLOAD_SIZE ,
6864 "dev_pgp_key_password" : DEFAULT_PGP_PASSWORD ,
6965 'sentry_dsn' : DEFAULT_SENTRY_DSN ,
@@ -83,13 +79,24 @@ def __init__(self, config_file=None, **cmd_args):
8379 "node_id" : {"type" : "string" , "required" : True },
8480 "master_url" : {"type" : "string" , "required" : True },
8581 "ws_master_url" : {"type" : "string" , "required" : True },
86- "working_dir" : {"type" : "string" , "required" : True ,
87- "coerce" : normalize_path },
82+ "working_dir" : {
83+ "type" : "string" ,
84+ "required" : True ,
85+ "coerce" : normalize_path ,
86+ },
8887 "pulp_host" : {"type" : "string" , "nullable" : False },
8988 "pulp_user" : {"type" : "string" , "nullable" : False },
9089 "pulp_password" : {"type" : "string" , "nullable" : False },
9190 "pulp_chunk_size" : {"type" : "integer" , "nullable" : False },
92- "parallel_upload_file_size" : {"type" : "integer" , "nullable" : False },
91+ "parallel_upload" : {
92+ "type" : "boolean" ,
93+ "nullable" : False ,
94+ "default" : True ,
95+ },
96+ "parallel_upload_file_size" : {
97+ "type" : "integer" ,
98+ "nullable" : False ,
99+ },
93100 "jwt_token" : {"type" : "string" , "required" : True },
94101 "dev_pgp_key_password" : {"type" : "string" , "nullable" : False },
95102 "sentry_dsn" : {"type" : "string" , "nullable" : True },
@@ -101,7 +108,8 @@ def __init__(self, config_file=None, **cmd_args):
101108 'immudb_address' : {'type' : 'string' , 'nullable' : True },
102109 'immudb_public_key_file' : {'type' : 'string' , 'nullable' : True },
103110 'files_sign_cert_path' : {
104- 'type' : 'string' , 'required' : False ,
111+ 'type' : 'string' ,
112+ 'required' : False ,
105113 'coerce' : normalize_path ,
106114 },
107115 }
0 commit comments