Ejemplo n.º 1
0
def read_default_options(account_section='Account'):
    client_config = ConfigFile(CONFIG_FILE)
    Account.read(cfgfile=client_config, section=account_section)
    if client_config.get_section(account_section) is None:
        return None
    else:
        return dict(Account)
Ejemplo n.º 2
0
def read_default_options(account_section='Account'):
    client_config = ConfigFile(CONFIG_FILE)
    Account.read(cfgfile=client_config, section=account_section)
    if client_config.get_section(account_section) is None:
        return None
    else:
        return dict(Account)
Ejemplo n.º 3
0
def get_auth_config(domain):
    config_file = ConfigFile(AuthConfig.__cfgfile__)
    section = config_file.get_section(domain)
    if section is not None:
        AuthConfig.read(section=domain)
        config = AuthConfiguration(dict(AuthConfig))
        AuthConfig.reset()
    else:
        config = AuthConfiguration(dict(AuthConfig))  # use auth defaults
    return config
Ejemplo n.º 4
0
def get_room_config(room):
    config_file = ConfigFile(RoomConfig.__cfgfile__)
    section = config_file.get_section(room)
    if section is not None:
        RoomConfig.read(section=room)
        config = Configuration(dict(RoomConfig))
        RoomConfig.reset()
    else:
        # Apply general policy
        config = Configuration(dict(RoomConfig))
    return config
Ejemplo n.º 5
0
def get_room_config(room):
    config_file = ConfigFile(RoomConfig.__cfgfile__)
    section = config_file.get_section(room)
    if section is not None:
        RoomConfig.read(section=room)
        config = VideoroomConfiguration(dict(RoomConfig))
        RoomConfig.reset()
    else:
        config = VideoroomConfiguration(dict(RoomConfig))  # use room defaults
    config.recording_dir = os.path.join(GeneralConfig.recording_dir, room)
    return config
Ejemplo n.º 6
0
def get_config(uri):
    config_file = ConfigFile(PlaybackConfig.__cfgfile__)
    GeneralConfig.read(cfgfile=config_file)
    section = config_file.get_section(uri)
    if section is not None:
        PlaybackConfig.read(section=uri)
        if not os.path.isabs(PlaybackConfig.file):
            PlaybackConfig.file = os.path.join(GeneralConfig.files_dir, PlaybackConfig.file)
        config = Configuration(dict(PlaybackConfig))
        PlaybackConfig.reset()
        return config
    return None
Ejemplo n.º 7
0
def get_config(uri):
    config_file = ConfigFile(PlaybackConfig.__cfgfile__)
    GeneralConfig.read(cfgfile=config_file)
    section = config_file.get_section(uri)
    if section is not None:
        PlaybackConfig.read(section=uri)
        if not os.path.isabs(PlaybackConfig.file):
            PlaybackConfig.file = os.path.join(GeneralConfig.files_dir,
                                               PlaybackConfig.file)
        config = Configuration(dict(PlaybackConfig))
        PlaybackConfig.reset()
        return config
    return None