{
    "name"  : "TELNET服务是否被关闭检查",
    "problems" : {
        "app_close" : {
            "desc"      : "【问题】设备TELNET服务被关闭",
            "advice"    : "【建议】开启方式为配置模式下执行enable service telnet-server all命令" 
        }
    }
}

---------------------------code-------------------------------

res = cli("show run | in no enable service telnet-server")
resArr = res.match(/telnet-server/)
if resArr[1] != null :
	print 'warn'
    add_problem("app_close")
    return 'warn'
end
print 'success'
return 'success'