-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.

local PMC_3152_8I_SMART_RAID = 64
local PMC_2100_8I_SMART_HBA = 65
if Input[4] ~= PMC_3152_8I_SMART_RAID and Input[4] ~= PMC_2100_8I_SMART_HBA then
    return cjson.null
end

local res = cjson.json_object_new_object()

res.HBADrive = Input[1] ~= '' and Input[1] or cjson.null
res.ConfiguredDrive = Input[2] ~= '' and Input[2] or cjson.null
res.UnconfiguredDrive = Input[3] ~= '' and Input[3] or cjson.null
return res