{
    "name"  : "静态路由配置检查",
    "problems" : {
        "staticRoute" : {
            "desc"      : "【问题】以太网静态路由下一跳只配置接口可能会导致ARP表占满引起故障。",
            "advice"    : "【建议】静态路由的下一跳需要指定为IP地址或接口加IP地址的方式如：\r\nip route 192.168.1.0 255.255.255.0 192.168.34.1\r\nip route 192.168.1.0 255.255.255.0 GigabitEthernet 0/2 192.168.34.1。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show run | in ip route")
print res
res = res.split(/\r?\n/)
i = 0
while i < res.length:
    resSignal = res[i]
    if resSignal.indexOf("Ethernet") != -1: 
        resSignal = resSignal.trim()
        resSignalArr = resSignal.match(/Ethernet.*([0-9]+\.)([0-9]+\.)([0-9]+\.)/)
		print resSignalArr
        if resSignalArr == null:
            add_problem("staticRoute")
            return "warn" 
        end
    end
    i = i + 1
end

return "success"
