{
    "name"  : "检测版本",
    "problems" : {
        "problem1" : {
            "desc"      : "【问题】主备版本不一致",
            "advice"    : "【建议】主机和备机建议使用相同的软件版本"
        }
    }
}
---------------------------code-------------------------------
#step1
response = cli('show version detail')
print response
response = response.split(/\r?\n/)
reg = /System software number/
foreach item in response :
	if reg.test(item) :
		item = item.split(/\s?:\s?/)
		version = item[1]
	end
end

#step2
ip = precondition('ip')
cmd = 'telnet' + ip
cli(cmd)
cli(user_name)
cli(user_psw)
if user_snpsw != '' :
    cli(user_snpsw)
end

response = cli('show version detail')
print response
response = response.split(/\r?\n/)
reg = /System software number/
foreach item in response :
	if reg.test(item) :
		item = item.split(/\s?:\s?/)
		version_2 = item[1]
	end
end

if version != version_2 :
	add_problem('problem1')
	return 'warn'
end

return 'success'