{
    "name"  : "EB线卡CPLD缺陷",
    "problems" : {
        "copper" : {
            "desc"      : "【风险】现有EB线卡存在CPLD版本风险，对应槽位为{$0}",
            "advice"    : "【建议】请联系锐捷远程支持工程师安排CPLD版本升级，拨打电话4008-111-000" 
        }
    }
}

---------------------------code-------------------------------
res = cli("show version slots")
print res
if res.indexOf("M7800E-24SFP/8GT-EB") == -1 && res.indexOf("M8600E-24SFP/8GT-EB") == -1:
	return 'success'
end
slot = []
res = cli("show cpld version")
resTmp = res.split(/\r?\n/ig)
print resTmp
i = 0
while i < (resTmp.length - 1):
	tmp = resTmp[i]
	if tmp.match(/\d+/) != null:
		tmp = tmp.trim()
		res = tmp.split(/\s+/)
		if res[1] == "141008":
			num = res[0]
			slot.push(num)
		end
	end
	i = i + 1
end
if slot.length != 0:
	add_problem('noResponse',[slot])
	return 'warn'
end

return 'success'