def is_rule_in_set(rule, rule_list):
    """Check if the given rule is present in the rule_list

    :param rule_list: list of existing rules in dictionary format
    :param rule: new rule to be added
    :return boolean:
    """
    for old_rule in rule_list:
        if rule['source'] == old_rule['source']\
                and rule['destination'] == old_rule['destination']\
                and rule['action'] == old_rule['action']\
                and rule['priority'] == old_rule['priority']:
            return True
    return False