{
    "name"  : "VPDN并发协商数量检查",
    "problems" : {
        "vpdn" : {
            "desc"      : "【问题】VPDN协商并发过多，有无法建立连接的风险。",
            "advice"    : "【建议】开启vpdn limit_rate限速，如Ruijie(config)#vpdn limit_rate 15 阀值建议为15。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show vpdn tunnel")
resArr = res.match(/L2TP Tunnel and Session Information Total tunnels (.+) sessions/)
if resArr == null :
    return "success"
end
tunnel = resArr[1]
if tunnel > 30 :
    res = cli("show run | in vpdn limit_rate")
    resArr = res.split(/\r?\n/)
    if resArr.length == 2 :
        add_problem("vpdn")
        return "warn"        
    end
    resArr = res.match(/vpdn limit_rate (.+)\r?\n/)
    limitRate = resArr[1]
    if limitRate > 15 :
        add_problem("vpdn")
        return "warn"
    end
end

return "success"