{
    "name"  : "检测网络线是否正常|端口是否配置IP地址",
    "problems" : {
        "address" : {
            "desc"      : "【问题】物理口未插线",
            "advice"    : "【建议】请检查配置策略路由的端口是否插线" 
        },
		 "conflict" : {
            "desc"      : "【问题】配置策略路由的端口未配置IP地址",
            "advice"    : "【建议】请检查配置策略路由端口是否配置IP地址"
        }
      }
	 
}

---------------------------code------------------------------- 
routeInterface = precondition('routeInterface')
cmd = 'show ip interface brief | include ' + routeInterface
response = cli(cmd)
results = response.split(/\r?\n/ig)
i=1
while i < results.length:
    resultsTemp = results[i]
	resultsTemp = resultsTemp.trim()
	arr = resultsTemp.split(/\s\s\s+/)
	b = arr[3]	
	c = arr[1]	
	if b == "down" :
	add_problem('address')
	end
	if c == "no address" :
		add_problem('conflict')
		return 'warn'	
	end
	i = i + 1
end	
return 'success'


