Ejemplo n.º 1
0
def check_required_keys(config, toolbox):
    """ Validates that all required keys for an [radius_server_auto] section are present in the config.

    Args:
        config (ConfigDict): The config object to check the required config for
        toolbox (ConfigTestToolbox): Toolbox used to execute the tests

    Returns:
        list of BaseResult
    """
    return base.check_common_required_radius_keys(config, toolbox)
Ejemplo n.º 2
0
def check_required_keys(config, toolbox):
    """ Validates that all required keys for an [radius_server_auto] section are present in the config.

    Args:
        config (ConfigDict): The config object to check the required config for
        toolbox (ConfigTestToolbox): Toolbox used to execute the tests

    Returns:
        list of ConfigResults
    """
    problems = base.check_common_required_radius_keys(config, toolbox)

    if not toolbox.test_config_has_key(config, 'type'):
        problems.append(MissingKey(key='type'))

    return problems