{
    "name"  : "地址库版本",
    "precondition" : [],
    "problems" : {
        "ver" : {
            "desc"      : "【问题】当前地址库版本${0}.${1}.${2}.${3}比较旧,可能会存在误判，请进行升级",
            "advice"    : [
                "【建议】请按照下述方式尝试进行升级：web界面，高级选项->系统升级->检测当前最新版本库->检查最新版本"                
            ]
        }
    }
}


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

isProblemFound = false

wansDetail = get_share_value('wansDetail');
#set_share_value('wansDetail', wansDetail)
cmd = 'show http-update info version | include route-db'
res = cli(cmd)
reg = /(\d+).(\d+).(\d+).(\d+)/im
#2015.12.05.00
matchStr = reg.exec(res)
if matchStr != null:
    year = matchStr[1]
    month = matchStr[2]
    day = matchStr[3]
    ver = matchStr[4]
    #print matchStr
    if year > 2015:
        return 'success'
    end
    if year == 2015 && month >1:
        return 'success'
    end
    if year == 2015 && month == 1 && day > 6:
        return 'success'
    end
    if year == 2015 && month == 1 && day == 6 && ver > 10:
        return 'success'
    end
    isProblemFound = true
    add_problem("ver",[year,month,day,ver])
end


if isProblemFound == true:
    return 'warn'
else:
    return 'success'
end

