This commit is contained in:
bel
2021-09-12 22:16:11 -06:00
commit ceeb6f0385
129 changed files with 9221 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# config.py
import logging
import glob
import yaml
logger = logging.getLogger(__name__)
def glob_the_configs(config_path):
"""
Args:
config_path (string): relative path to the configs
Returns:
List of configs
"""
alert_list = []
for config_file in glob.glob(config_path + "/*.yaml"):
logger.debug("Found {} config".format(config_file))
# LOAD CONFIG
alert_list.append(yaml.load(open(config_file, 'rb').read()))
logger.info("Loaded {} configs".format(len(alert_list)))
return alert_list