{
    "name"  : "静态映射permit-inside检查",
    "problems" : {
        "permit" : {
            "desc"      : "【问题】配置静态映射未使用permit inside可能导致内网用户通过无法域名访问内部服务器。",
            "advice"    : "【建议】配置静态映射时配置上permit inside命令"
        }
    }
}
---------------------------code-------------------------------
res = cli("show run | in ip nat inside source static")
resArr = res.split(/\r?\n/)
i = 1
while i < (resArr.length - 1):
    resTmp = resArr[i]
    if resTmp.indexOf("match") == -1 && resTmp.indexOf("permit-inside") == -1 :
        add_problem("permit")
        return "warn" 
    end
    i = i + 1
end

return 'success'

