{
    "name"  : "风扇和电源状态是否正常",
    "problems" : {
        "fan_power" : {
            "desc"      : "【问题】风扇或电源状态异常",
            "advice"    : "【建议】请联系400协助处理" 
        },
		"single_power" : {
            "desc"      : "【问题】设备目前为单电源运行，供电有风险",
            "advice"    : "【建议】建议插上双电源" 
        }
    }
}

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

model = get_device_model()
print model
if model.search(/EG2000X/i) == -1 && model.search(/EG2000XE/i) == -1 && model.search(/EG2000UE/i) == -1 && model.search(/ACE3000E/i) == -1 :
    add_reason('该诊断仅支持设备型号为EG2000X、EG2000XE、EG2000UE或ACE3000E的设备')
    return 'skip'
end

res = cli("show environment")
if res.search(/FAN [0-4] is OK/i) == -1
end