()
return get_all_check_common_template
Gets all checks from noit_cache
Gets all checks from noit_cache
Gets all checks from noit_cache
def get_all_checks():
    """
    Gets all checks from noit_cache
    """
    get_all_check_common_template = {
        "checks": {
            "@resolve_targets": "true",
            "@max_initial_stutter": "30000",
            "@filterset": "default",
            "@transient_min_period": "1000",
            "@transient_period_granularity": "500",
            "@backingstore": "/tmp/noit-bs",
            "config": {
                "@xmlns:ip_acl": "noit://module/ip_acl",
                "ip_acl:whitelist": None
            }
        }
    }
    check_list = []
    for key, value in noit_cache.items():
        each_check = value["check"]["attributes"]
        each_check["uuid"] = key
        each_check["config"] = value["check"]["config"]
        check_list.append(each_check)
    get_all_check_common_template["checks"]["check"] = check_list
    return get_all_check_common_template
def get_all_checks ( ) : get_all_check_common_template = { "checks" : { "@resolve_targets" : "true" , "@max_initial_stutter" : "30000" , "@filterset" : "default" , "@transient_min_period" : "1000" , "@transient_period_granularity" : "500" , "@backingstore" : "/tmp/noit-bs" , "config" : { "@xmlns:ip_acl" : "noit://module/ip_acl" , "ip_acl:whitelist" : None } } } check_list = [ ] for key , value in noit_cache . items ( ) : each_check = value [ "check" ] [ "attributes" ] each_check [ "uuid" ] = key each_check [ "config" ] = value [ "check" ] [ "config" ] check_list . append ( each_check ) get_all_check_common_template [ "checks" ] [ "check" ] = check_list return get_all_check_common_template