{
    "name"  : "数据流是否正常",
    "problems" : {
        "nextHopError" : {
            "desc"      : "【问题】没有访问服务器的数据流到达设备",
            "advice"    : "【建议】如果实际有访问流量但未到达设备，请检查网络拓扑或修改映射后的端口确认运营商是否限制相关端口"
        },
        "noMac" : {
            "desc"      : "【问题】访问服务器的数据流没有应答",
            "advice"    : "【建议】请检查内网服务器IP地址是否正确、服务器是否有访问限制"
        }
    }
}
---------------------------code-------------------------------
intraNetIp = precondition('intraNetIp')
intraNetIp = precondition('intraNetIp')
cmd = 'show ip f f  | in ' + intraNetIp
res = cli(cmd)
resArr = res.split(/\r?\n/)
print  resArr
num1 = resArr.slice(1)
num1 = num1.join(" ")
num = num1.match(intraNetIp) 
if num == null :
	add_problem("nextHopError")
	return "warn"
end
res1 = resArr[resArr.length - 1]
if res1.indexOf("#") == -1 :	
	i = 1
	while i < resArr.length :
		resArrTmp = resArr[i]
		resArrTmp = resArrTmp.trim()
		resArrTmp = resArrTmp.split(/\s\s\s\s+/)
		resTmp = resArrTmp[6]
		if resTmp == 0 :
			add_problem("noMac")
			return "warn"
		end	  
		i = i + 1
	end
else :
	i = 1
	print resArr.length
	while i < (resArr.length - 1) :
		print "dddddddddddddddddd"
		resArrTmp = resArr[i]
		resArrTmp = resArrTmp.trim()
		print resArrTmp
		resArrTmp = resArrTmp.split(/\s\s\s\s+/)
		print resArrTmp
		resTmp = resArrTmp[6]
		print resTmp
		if resTmp == 0 :
			add_problem("noMac")
			return "warn"
		end	  
		i = i + 1
	end
end

return 'success'
