-- 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 DriveDataFromBma = [[{
    "@odata.type": "#Drive.Drive",
    "Id": "PCH_0000:32:04.0_disk0",
    "Name": "Drives",
    "Description": "Drives",
    "Manufacturer": "SAMSUNG",
    "Model": "SAMSUNG MZ7LH480HAHQ-00005",
    "Location": null,
    "Protocol": "SATA",
    "MediaType": "SSD",
    "SerialNumber": "S681NY0N702530",
    "CapacityBytes": 480103981056,
    "RotationalSpeedRpm": 0,
    "CapableSpeedGbs": 6.0,
    "NegotiatedSpeedGbs": 6.0,
    "Status": "Active",
    "MediaErrorCount": null,
    "OtherErrorCount": null,
    "PredFailCount": null,
    "SlotId": null,
    "EnclosureId": null,
    "PredictiveDetailStatus": 0,
    "FaultDetailStatus": 0,
    "HuaweiDefinedSMARTSupported": false,
    "Oem": {
        "Huawei": {
            "FirmwareVersion": "HXT7404Q",
            "VendorID": "0x19e5",
            "DeviceID": "0xa230",
            "SubsystemDeviceID": "0x0000",
            "SubsystemVendorID": "0x0000",
            "Temperature": 32,
            "PowerOnHours": 18036,
            "PowerState": "Spun Up",
            "PredictionSate": 2,
            "PredictionState": 2,
            "SilkScreen": "HDDPlaneDisk0",
            "TestStatus": "Completed without error",
            "SAS_Address": null,
            "HotspareState": null,
            "RebuildState": null,
            "PatrolState": null,
            "SenseCodeList": []
        }
    },
    "RebuildStatus": {
        "@odata.id": "/redfish/v1/Sms/1/Systems/1/Storage/1/Drives/PCH_0000:32:04.0_disk0/RebuildState"
    },
    "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/Storage/Members/Drives/Members/$entity",
    "@odata.id": "/redfish/v1/Sms/1/Systems/1/Storage/1/Drives/PCH_0000:32:04.0_disk0",
    "SmartDetails": {
        "AttributeRevisionNumber": 1,
        "AttributesItemsNumeber": 3,
        "AttributeItemList": [
            {
                "ID#": 177,
                "ATTRIBUTE_NAME": "DISK_WEAR_LEVELING_COUNT",
                "FLAG": "0x0013",
                "VALUE": 99,
                "WORST": 99,
                "THRESHOLD": 5,
                "TYPE": "Pre-fail",
                "UPDATED": "Always",
                "WHEN_FAILED": null,
                "RAW_VALUE": 3
            },
            {
                "ID#": 241,
                "ATTRIBUTE_NAME": "DISK_TOTAL_LBAS_WRITTEN",
                "FLAG": "0x0032",
                "VALUE": 99,
                "WORST": 99,
                "THRESHOLD": 0,
                "TYPE": "Old_age",
                "UPDATED": "Always",
                "WHEN_FAILED": null,
                "RAW_VALUE": 34015972
            },
            {
                "ID#": 251,
                "ATTRIBUTE_NAME": "DISK_UNKNOWN_ATTRIBUTE",
                "FLAG": "0x0032",
                "VALUE": 100,
                "WORST": 100,
                "THRESHOLD": 0,
                "TYPE": "Old_age",
                "UPDATED": "Always",
                "WHEN_FAILED": null,
                "RAW_VALUE": 38218688
            }
        ]
    }
}]]
return {
    DriveDataFromBma = DriveDataFromBma
}