Exemplo n.º 1
0
def log_before_repo_roles(input_dict):
    LOGGER.debug("Calling DURING_REPOABLE_CALCULATION hooks")
    if not all(required in input_dict
               for required in ['account_number', 'roles']):
        raise hooks.MissingHookParamaeter(
            "Did not get all required parameters for BEFORE_REPO_ROLES hook")
    return input_dict
Exemplo n.º 2
0
def log_during_repoable_calculation_batch_hooks(input_dict):
    LOGGER.debug("Calling DURING_REPOABLE_CALCULATION_BATCH hooks")

    if not all(required in input_dict for required in [
            "role_batch",
            "potentially_repoable_permissions",
            "minimum_age",
    ]):
        raise hooks.MissingHookParamaeter(
            "Did not get all required parameters for DURING_REPOABLE_CALCULATION_BATCH hook"
        )
    for role in input_dict["role_batch"]:
        if not isinstance(role, Role):
            raise hooks.MissingHookParamaeter(
                "Role_batch needs to be a series of Role objects in DURING_REPOABLE_CALCULATION_BATCH hook"
            )
    return input_dict
Exemplo n.º 3
0
def log_during_repoable_calculation_hooks(input_dict):
    LOGGER.debug("Calling DURING_REPOABLE_CALCULATION hooks")
    if not all(required in input_dict for required in [
            'account_number', 'role_name', 'potentially_repoable_permissions',
            'minimum_age'
    ]):
        raise hooks.MissingHookParamaeter(
            "Did not get all required parameters for DURING_REPOABLE_CALCULATION hook"
        )
    return input_dict
Exemplo n.º 4
0
def log_after_repo_hooks(input_dict):
    LOGGER.debug("Calling AFTER_REPO hooks")
    if 'role' not in input_dict:
        raise hooks.MissingHookParamaeter(
            "Required key 'role' not passed to AFTER_REPO")
    return input_dict
Exemplo n.º 5
0
def log_after_schedule_repo_hooks(input_dict):
    LOGGER.debug("Calling AFTER_SCHEDULE_REPO hooks")
    if "roles" not in input_dict:
        raise hooks.MissingHookParamaeter(
            "Required key 'roles' not passed to AFTER_SCHEDULE_REPO")
    return input_dict