{
    "name"  : "接口NAT配置完整性检查",
    "problems" : {
        "NATError" : {
            "desc"      : "【问题】接口上的NAT命令ip nat inside/outside不完整。",
            "advice"    : "【建议】如果NAT转换不生效，请检查接口上的NAT命令。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show run | in ip nat inside")
res1 = cli("show run | in ip nat outside")
resArr = res.match(/\n\s+\w+/) 
resArr1 = res1.match(/\n\s+\w+/) 
print resArr
print resArr1
if (resArr !=null && resArr1 == null ) || (resArr1 !=null && resArr == null) :
	print 'warn'
	add_problem("NATError")
	return 'warn'
end
res  = cli("show run | in ip nat inside source")
res1 = cli("show run | in ip nat inside")
res2 = cli("show run | in ip nat outside")
resArr = res.match(/\n\s+\w+/) 
resArr1 = res1.match(/\n\s+\w+/) 
resArr2 = res2.match(/\n\s+\w+/) 
print resArr
print resArr1
print resArr2
if resArr != null  && (resArr2 == null || resArr1 == null) :
	print 'warn'
	add_problem("NATError")
	return 'warn'
end
print 'success'
return 'success'
