Loading tests/test_config_file.py +8 −5 Original line number Diff line number Diff line import configparser from configparser import ConfigParser, ExtendedInterpolation config = configparser.ConfigParser() config = ConfigParser(interpolation = ExtendedInterpolation()) config.read("vos_ts.conf") print(config.sections()) numFiles = config["filegrouper"].getint("minNumOfFiles") maxSize = eval(config["filegrouper"]["maxFolderSize"]) numFiles = config["file_grouper"].getint("min_num_files") maxSize = eval(config["file_grouper"]["max_dir_size"]) tn_data_in = config["transfer_node"]["data_in"] print(f"minNumOfFiles: {numFiles}") print(f"maxFolderSize: {maxSize}") print(f"data_in: {tn_data_in}") No newline at end of file tests/vos_ts.conf +31 −11 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ [file_catalog] ; hostname or IP address of the machine that hosts the Postgres database host = file_catalog ; port at which the service is available, default is 5432 ; port at which the database is available, default is 5432 TCP port = 5432 ; database name db = vospace_testdb Loading @@ -17,9 +17,9 @@ password = postgres # Redis [job_cache] ; hostname or IP address of the machine that hosts Redis ; hostname or IP address of the machine that hosts the Redis cache system host = redis ; port at which the service is available, default is 6379 ; port at which the cache service is available, default is 6379 TCP port = 6379 ; db index representing the db associated to jobs that retrieve data, default is 0 db_read = 0 Loading @@ -30,20 +30,24 @@ db_sched = 2 # RabbitMQ [amqp] ; hostname or IP address of the machine that hosts the RabbitMQ broker ; hostname or IP address of the machine that hosts the RabbitMQ message broker host = rabbitmq ; port at which the broker is available, default is 5672 TCP port = 5672 ############################ # VOSpace backend settings # ############################ [main] vos_base_path = /vos [checksum] ; buffer size in bytes when reading a chunk, default is 4096 B file_buffer_size = 4096 ; suffix for files containing MD5 checksums md5_file_suffix = -md5sum.txt ; buffer size in bytes when reading a chunk, default is 4096 B file_buffer_size = 4096 [file_grouper] ; minimum number of files contained by a 'leaf', default is 1000 Loading @@ -51,13 +55,29 @@ min_num_files = 1000 ; maximum size in GB for a 'leaf', default is 100 GB max_dir_size = 100 [scheduling] ; maximum number of jobs within a 'pending' queue, default is 32 max_pending_jobs = 32 ; maximum number of jobs within a 'ready' queue, default is 4 max_ready_jobs = 4 #################### # Storage settings # #################### [tape] path_prefix = None [transfer_node] ; user folder base_path = /home/{username} ; data entry point data_in = ${base_path}/store ; data exit point data_out = ${base_path}/retrieve [tape_library] ; user folder base_path = /home/users/{username} [server1] path_prefix = None [ia2_server] ; user folder base_path = /home/{username} Loading
tests/test_config_file.py +8 −5 Original line number Diff line number Diff line import configparser from configparser import ConfigParser, ExtendedInterpolation config = configparser.ConfigParser() config = ConfigParser(interpolation = ExtendedInterpolation()) config.read("vos_ts.conf") print(config.sections()) numFiles = config["filegrouper"].getint("minNumOfFiles") maxSize = eval(config["filegrouper"]["maxFolderSize"]) numFiles = config["file_grouper"].getint("min_num_files") maxSize = eval(config["file_grouper"]["max_dir_size"]) tn_data_in = config["transfer_node"]["data_in"] print(f"minNumOfFiles: {numFiles}") print(f"maxFolderSize: {maxSize}") print(f"data_in: {tn_data_in}") No newline at end of file
tests/vos_ts.conf +31 −11 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ [file_catalog] ; hostname or IP address of the machine that hosts the Postgres database host = file_catalog ; port at which the service is available, default is 5432 ; port at which the database is available, default is 5432 TCP port = 5432 ; database name db = vospace_testdb Loading @@ -17,9 +17,9 @@ password = postgres # Redis [job_cache] ; hostname or IP address of the machine that hosts Redis ; hostname or IP address of the machine that hosts the Redis cache system host = redis ; port at which the service is available, default is 6379 ; port at which the cache service is available, default is 6379 TCP port = 6379 ; db index representing the db associated to jobs that retrieve data, default is 0 db_read = 0 Loading @@ -30,20 +30,24 @@ db_sched = 2 # RabbitMQ [amqp] ; hostname or IP address of the machine that hosts the RabbitMQ broker ; hostname or IP address of the machine that hosts the RabbitMQ message broker host = rabbitmq ; port at which the broker is available, default is 5672 TCP port = 5672 ############################ # VOSpace backend settings # ############################ [main] vos_base_path = /vos [checksum] ; buffer size in bytes when reading a chunk, default is 4096 B file_buffer_size = 4096 ; suffix for files containing MD5 checksums md5_file_suffix = -md5sum.txt ; buffer size in bytes when reading a chunk, default is 4096 B file_buffer_size = 4096 [file_grouper] ; minimum number of files contained by a 'leaf', default is 1000 Loading @@ -51,13 +55,29 @@ min_num_files = 1000 ; maximum size in GB for a 'leaf', default is 100 GB max_dir_size = 100 [scheduling] ; maximum number of jobs within a 'pending' queue, default is 32 max_pending_jobs = 32 ; maximum number of jobs within a 'ready' queue, default is 4 max_ready_jobs = 4 #################### # Storage settings # #################### [tape] path_prefix = None [transfer_node] ; user folder base_path = /home/{username} ; data entry point data_in = ${base_path}/store ; data exit point data_out = ${base_path}/retrieve [tape_library] ; user folder base_path = /home/users/{username} [server1] path_prefix = None [ia2_server] ; user folder base_path = /home/{username}