import logging import json import re import sys import subprocess from arc.paths import * # init module __logger __logger = logging.getLogger('ARC.Config') # module-wise data structures to store parsed configs __parsed_config = {} __parsed_config_admin_defined = {} __parsed_blocks = [] __default_config = {} __default_blocks = [] # processing constants and regexes __def_path_arcconf = ARC_CONF __def_path_defaults = ARC_DATA_DIR + '/arc.parser.defaults' __def_path_runconf = ARC_RUN_DIR + '/arc.runtime.conf' # defaults parsing constants __no_default = 'undefined' __var_re = re.compile(r'\$VAR\{(?:\[(?P[^\[\]]+)\])?(?P