
{
    "name"  : "QinQ场景认证报文格式配置是否正确",
    "problems" : {
        "JJ_qinq" : {
            "desc"      : "【问题】Radius报文无法封装内外层vid给SAM，SAM上就识别不了用户的内层vid。",
            "advice"    : "【建议】增加配置radius-server attribute nas-port-id format qinq。"
        }
    }
}

---------------------------code-------------------------------
response = get_share_value('log_versionDetail')
if response.indexOf('N18000') == -1 :
	return 'skip'
end
log_run = get_share_value('log_showrun')
if log_run.indexOf('auth-mode gateway') == -1:
	return 'skip'
end

if log_run.indexOf('qinq termination pe-vlan add') > -1:
	if log_run.indexOf('radius-server attribute nas-port-id format qinq') == -1:
		change_title('检查到当前N18K认证报文格式配置错误')
		add_problem('JJ_qinq')
		return 'warn'
	end
end

return 'success'

