예제 #1
0
def configure():
    """
    Load configuration
    """
    cfg_fields = [ "aws_account_key", "aws_secret_key" ]
    temp_cfg = conf.read(CONFIG_FILE)
    conf.check_string_fields(CONFIG_FILE, cfg_fields, temp_cfg)
    cfg.update(temp_cfg)
예제 #2
0
def configure():
    """
    Load configuration
    """
    cfg_fields = ["library_connect_string"]

    temp_cfg = conf.read(CONFIG_FILE)
    conf.check_string_fields(CONFIG_FILE, cfg_fields, temp_cfg)
    cfg.update(temp_cfg)

    sqlhub.processConnection = connectionForURI(cfg["library_connect_string"])
예제 #3
0
def configure():
    """Load Members Configuration"""

    string_fields = [ 'username_regex', 'shells_file', 'ldap_server_url',
            'ldap_users_base', 'ldap_groups_base', 'ldap_sasl_mech', 'ldap_sasl_realm',
            'expire_hook' ]
    numeric_fields = [ 'min_password_length' ]

    # read configuration file
    cfg_tmp = conf.read(CONFIG_FILE)

    # verify configuration
    conf.check_string_fields(CONFIG_FILE, string_fields, cfg_tmp)
    conf.check_integer_fields(CONFIG_FILE, numeric_fields, cfg_tmp)

    # update the current configuration with the loaded values
    cfg.update(cfg_tmp)