{
    "name"  : "接口下一跳检查",
    "problems" : {
        "nexthop" : {
            "desc"      : "【问题】接口不配置nexthop，当使用选路功能时，影响选路效果。",
            "advice"    : "【建议】建议在接口上补充配置下一跳nexthop的ip。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show html inter info | in WAN")
res = res.split(/\r?\n/)
i = 1
interNameArr = []
while i < (res.length - 1) :
    resSignal = res[i]
    if resSignal.indexOf("DOWN") == -1 && resSignal.indexOf("di") == -1 && resSignal.indexOf("Di") == -1: 
        resSignal  = resSignal.trim()
        resSignalArr = resSignal.split("#")
        interName = resSignalArr[0]
        interNameArr.push(interName)
    end
    i = i + 1
end

print interNameArr

j = 0
while j < interNameArr.length:
    interName = interNameArr[j]
    cmd = "show run interface " + interName +" | in nexthop"
    res = cli(cmd)
    print res
    res = res.split(/\r?\n/)
    if !res[2]:
        add_problem("nexthop")
        return "warn"
    end
    j = j + 1
end

return "success"
