Commit 0af4ce86 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added sample config file + parsing test.

parent c9a59902
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
import configparser

config = configparser.ConfigParser()
config.read("vos_ts.conf")
print(config.sections())

numFiles = config["filegrouper"].getint("minNumOfFiles")
maxSize = eval(config["filegrouper"]["maxFolderSize"])
print(f"minNumOfFiles: {numFiles}")
print(f"maxFolderSize: {maxSize}")
 No newline at end of file

tests/vos_ts.conf

0 → 100644
+41 −0
Original line number Diff line number Diff line
###################
# System services #
###################

# Postgres
[file_catalog]
host = file_catalog
port = 5432
db = vospace_testdb
user = postgres
password = postgres

# Redis
[job_cache]
host = redis
port = 6379
; db index representing the db associated to jobs that retrieve data, default is 0
dbRead = 0
; db index representing the db associated to jobs that store data, default is 1
dbWrite = 1
; db index representing the db that stores the scheduling queues, default is 2
dbSched = 2

# Rabbitmq
[rabbitmq]
host = rabbitmq


############################
# VOSpace backend settings #
############################

[checksum]
; buffer size in bytes when reading a chunk, default is 4096 B
fileBufferSize = 4096

[filegrouper]
; minimum number of files contained by a 'leaf', default is 1000
minNumOfFiles = 1000
; maximum size in bytes for a 'leaf', default is 100 GB
maxFolderSize = 100 * (2 ** 30)
 No newline at end of file