)]}'
{
  "commit": "bb3b1b0523ad02b12dfa7d8732430a78bc5fef0a",
  "tree": "57f5ad199dcb241f9deed431edaf4aeb41fe30d3",
  "parents": [
    "268c1096a7fc7f11d31fdf8aacc4c0276b3caed5"
  ],
  "author": {
    "name": "Utkarsh",
    "email": "uyadav@nvidia.com",
    "time": "Wed Jan 07 09:48:53 2026 +0530"
  },
  "committer": {
    "name": "Joey Rainville",
    "email": "jrainville@nvidia.com",
    "time": "Fri Jan 23 23:26:48 2026 +0000"
  },
  "message": "Leak Detection sensor support added\n\nAs part of this commit, following changes have been made:\n1. Support set leak detection thresholds command from type-3.\n2. Support get leak detection info command from type-3.\n3. Support for nsmtool for both commands.\n4. Support for mockupResponder for both commands.\n5. Support for adding inventory and sensor objects for leak detection.\n6. Support for performing patch operations on leak detection thresholds.\n\nApplicable on device: SMA/MCU\n\u0027\u0027\u0027\nSpec:\nhttps://docs.google.com/spreadsheets/d/12d4OYNn7qg3FpKdBPrwSwd7h-FHJGREr/edit?usp\u003dsharing\u0026ouid\u003d114969439290552447702\u0026rtpof\u003dtrue\u0026sd\u003dtrue\nIT:\nhttps://docs.google.com/spreadsheets/d/12d4OYNn7qg3FpKdBPrwSwd7h-FHJGREr/edit?usp\u003dsharing\u0026ouid\u003d114969439290552447702\u0026rtpof\u003dtrue\u0026sd\u003dtrue\n\nConfig required: EG-\n{\n    \"Name\": \"IO_Board_$INSTANCE_NUMBER_LeakDetector\",\n    \"Type\": \"NSM_LeakDetection\",\n    \"SensorIdMap\": [2],\n    \"SensorNameMap\": [\"IO_Board_$INSTANCE_NUMBER_LeakDetector_0\"],\n    \"MaxThresholdsmV\": [102],\n    \"MinThresholdsmV\": [0],\n    \"CriticalThresholdsmV\": [122],\n    \"ChassisPath\": \"/xyz/openbmc_project/inventory/system/board/IO_Board_$INSTANCE_NUMBER\",\n    \"UUID\": \"$UUID\"\n}\n\nTested on VR-BMC:\nroot@vr-nvl144-bmc:~# nsmtool telemetry GetLeakDetectionInfo -m 40 -v\nnsmtool: \u003c6\u003e EID: 28, TAG: 0b, Tx: 10 de 80 89 03 17 00 00 00 00 00\nSuccess in creating the socket : RC \u003d 5\nSuccess in sending message type as VDM to mctp : RC \u003d 0\nnsmtool: \u003c6\u003e EID: 28, TAG: 03, Rx: 10 de 00 89 03 17 00 00 00 16 00 02 03 00 01 a4 00 71 06 16 07 a0 05 01 01 a4 00 71 06 16 07 ce 04\n{\n    \"Completion Code\": 0,\n    \"NumberOfSensors\": 2,\n    \"NumberOfThresholdLevels\": 3,\n    \"Sensors\": [\n        {\n            \"SensorId\": 0,\n            \"LeakState\": 1,\n            \"ADCReading\": 1440,\n            \"Thresholds\": [\n                164,\n                1649,\n                1814\n            ],\n            \"Unit\": \"mV\"\n        },\n        {\n            \"SensorId\": 1,\n            \"LeakState\": 1,\n            \"ADCReading\": 1230,\n            \"Thresholds\": [\n                164,\n                1649,\n                1814\n            ],\n            \"Unit\": \"mV\"\n        }\n    ]\n}\n\nroot@vr-nvl144-bmc:~# busctl tree xyz.openbmc_project.NSM | grep -i \"leak\"\n    | |- /xyz/openbmc_project/inventory/leakdetectors\n    | | |- /xyz/openbmc_project/inventory/leakdetectors/Chassis_0_LeakDetection_0\n    | | |- /xyz/openbmc_project/inventory/leakdetectors/Chassis_0_LeakDetection_1\n    | | |- /xyz/openbmc_project/inventory/leakdetectors/IO_Board_0_LeakDetector_0\n    | | `- /xyz/openbmc_project/inventory/leakdetectors/IO_Board_3_LeakDetector_0\n    |   |- /xyz/openbmc_project/sensors/voltage/Chassis_0_LeakDetection_0\n    |   |- /xyz/openbmc_project/sensors/voltage/Chassis_0_LeakDetection_1\n    |   |- /xyz/openbmc_project/sensors/voltage/IO_Board_0_LeakDetector_0\n    |   `- /xyz/openbmc_project/sensors/voltage/IO_Board_3_LeakDetector_0\n      `- /xyz/openbmc_project/state/leakdetectors\n        |- /xyz/openbmc_project/state/leakdetectors/Chassis_0_LeakDetection_0\n        |- /xyz/openbmc_project/state/leakdetectors/Chassis_0_LeakDetection_1\n        |- /xyz/openbmc_project/state/leakdetectors/IO_Board_0_LeakDetector_0\n        `- /xyz/openbmc_project/state/leakdetectors/IO_Board_3_LeakDetector_0\nroot@vr-nvl144-bmc:~#\n\nroot@vr-nvl144-bmc:~# busctl introspect xyz.openbmc_project.NSM /xyz/openbmc_project/inventory/leakdetectors/Chassis_0_LeakDetection_0 --f\nNAME                                            TYPE      SIGNATURE RESULT/VALUE                                                                         FLAGS\norg.freedesktop.DBus.Introspectable             interface -         -                                                                                    -\n.Introspect                                     method    -         s                                                                                    -\norg.freedesktop.DBus.Peer                       interface -         -                                                                                    -\n.GetMachineId                                   method    -         s                                                                                    -\n.Ping                                           method    -         -                                                                                    -\norg.freedesktop.DBus.Properties                 interface -         -                                                                                    -\n.Get                                            method    ss        v                                                                                    -\n.GetAll                                         method    s         a{sv}                                                                                -\n.Set                                            method    ssv       -                                                                                    -\n.PropertiesChanged                              signal    sa{sv}as  -                                                                                    -\nxyz.openbmc_project.Association.Definitions     interface -         -                                                                                    -\n.Associations                                   property  a(sss)    1 \"chassis\" \"contained_by\" \"/xyz/openbmc_project/inventory/system/chassis/Chassis_0\" emits-change writable\nxyz.openbmc_project.Inventory.Item.LeakDetector interface -         -                                                                                    -\n.LeakDetectorType                               property  s         \"xyz.openbmc_project.Inventory.Item.LeakDetector.LeakDetectorTypeEnum.Moisture\"      emits-change\nroot@vr-nvl144-bmc:~#\n\nroot@vr-nvl144-bmc:~# busctl introspect xyz.openbmc_project.NSM /xyz/openbmc_project/state/leakdetectors/Chassis_0_LeakDetection_0 --f\nNAME                                                  TYPE      SIGNATURE RESULT/VALUE                                                                                            FLAGS\norg.freedesktop.DBus.Introspectable                   interface -         -                                                                                                       -\n.Introspect                                           method    -         s                                                                                                       -\norg.freedesktop.DBus.Peer                             interface -         -                                                                                                       -\n.GetMachineId                                         method    -         s                                                                                                       -\n.Ping                                                 method    -         -                                                                                                       -\norg.freedesktop.DBus.Properties                       interface -         -                                                                                                       -\n.Get                                                  method    ss        v                                                                                                       -\n.GetAll                                               method    s         a{sv}                                                                                                   -\n.Set                                                  method    ssv       -                                                                                                       -\n.PropertiesChanged                                    signal    sa{sv}as  -                                                                                                       -\nxyz.openbmc_project.Association.Definitions           interface -         -                                                                                                       -\n.Associations                                         property  a(sss)    1 \"inventory\" \"leak_detecting\" \"/xyz/openbmc_project/inventory/leakdetectors/Chassis_0_LeakDetection_0\" emits-change writable\nxyz.openbmc_project.State.Decorator.OperationalStatus interface -         -                                                                                                       -\n.Functional                                           property  b         true                                                                                                    emits-change writable\n.State                                                property  s         \"xyz.openbmc_project.State.Decorator.OperationalStatus.StateType.Enabled\"                               emits-change writable\nxyz.openbmc_project.State.LeakDetector                interface -         -                                                                                                       -\n.DetectorState                                        property  s         \"xyz.openbmc_project.State.LeakDetector.DetectorStateEnum.OK\"                                           emits-change\nroot@vr-nvl144-bmc:~#\n\nroot@vr-nvl144-bmc:~# busctl introspect xyz.openbmc_project.NSM /xyz/openbmc_project/sensors/voltage/Chassis_0_LeakDetection_0 --f\nNAME                                          TYPE      SIGNATURE RESULT/VALUE                                                                        FLAGS\ncom.nvidia.Async.Set                          interface -         -                                                                                   -\n.Set                                          method    ssv       o                                                                                   -\norg.freedesktop.DBus.Introspectable           interface -         -                                                                                   -\n.Introspect                                   method    -         s                                                                                   -\norg.freedesktop.DBus.Peer                     interface -         -                                                                                   -\n.GetMachineId                                 method    -         s                                                                                   -\n.Ping                                         method    -         -                                                                                   -\norg.freedesktop.DBus.Properties               interface -         -                                                                                   -\n.Get                                          method    ss        v                                                                                   -\n.GetAll                                       method    s         a{sv}                                                                               -\n.Set                                          method    ssv       -                                                                                   -\n.PropertiesChanged                            signal    sa{sv}as  -                                                                                   -\nxyz.openbmc_project.Association.Definitions   interface -         -                                                                                   -\n.Associations                                 property  a(sss)    1 \"chassis\" \"all_sensors\" \"/xyz/openbmc_project/inventory/system/chassis/Chassis_0\" emits-change writable\nxyz.openbmc_project.Sensor.Threshold.Critical interface -         -                                                                                   -\n.CriticalAlarmHigh                            property  b         false                                                                               emits-change writable\n.CriticalAlarmLow                             property  b         false                                                                               emits-change writable\n.CriticalHigh                                 property  d         nan                                                                                 emits-change writable\n.CriticalLow                                  property  d         0.099                                                                               emits-change writable\n.CriticalHighAlarmAsserted                    signal    d         -                                                                                   -\n.CriticalHighAlarmDeasserted                  signal    d         -                                                                                   -\n.CriticalLowAlarmAsserted                     signal    d         -                                                                                   -\n.CriticalLowAlarmDeasserted                   signal    d         -                                                                                   -\nxyz.openbmc_project.Sensor.Value              interface -         -                                                                                   -\n.MaxAllowableValue                            property  d         3.299                                                                               emits-change writable\n.MaxValue                                     property  d         inf                                                                                 emits-change writable\n.MinAllowableValue                            property  d         0.049                                                                               emits-change writable\n.MinValue                                     property  d         -inf                                                                                emits-change writable\n.Unit                                         property  s         \"xyz.openbmc_project.Sensor.Value.Unit.Volts\"                                       emits-change writable\n.Value                                        property  d         1.521                                                                               emits-change writable\nroot@vr-nvl144-bmc:~#\n\nuyadav@uyadav-mlt ~ % curl -k -u root:0penBmc -H \u0027Expect:\u0027 --location --request GET https://$bmc/redfish/v1/Chassis/Chassis_0/Sensors\n{\n  \"@odata.id\": \"/redfish/v1/Chassis/Chassis_0/Sensors\",\n  \"@odata.type\": \"#SensorCollection.SensorCollection\",\n  \"Description\": \"Collection of Sensors for this Chassis\",\n  \"Members\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Chassis/Chassis_0/Sensors/Chassis_0_LeakDetection_0\"\n    },\n    {\n      \"@odata.id\": \"/redfish/v1/Chassis/Chassis_0/Sensors/Chassis_0_LeakDetection_1\"\n    }\n  ],\n  \"Members@odata.count\": 2,\n  \"Name\": \"Sensors\"\n}%\n\nuyadav@uyadav-mlt ~ % curl -k -u root:0penBmc -H \u0027Expect:\u0027 --location --request GET https://$bmc/redfish/v1/Chassis/Chassis_0/Sensors/Chassis_0_LeakDetection_0\n{\n  \"@odata.id\": \"/redfish/v1/Chassis/Chassis_0/Sensors/Chassis_0_LeakDetection_0\",\n  \"@odata.type\": \"#Sensor.v1_7_0.Sensor\",\n  \"Id\": \"Chassis_0_LeakDetection_0\",\n  \"MaxAllowableOperatingValue\": 3.299,\n  \"MinAllowableOperatingValue\": 0.049,\n  \"Name\": \"Chassis 0 LeakDetection 0\",\n  \"Reading\": 1.521,\n  \"ReadingType\": \"Voltage\",\n  \"ReadingUnits\": \"V\",\n  \"RelatedItem\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Chassis/Chassis_0\"\n    }\n  ],\n  \"Status\": {\n    \"Conditions\": [],\n    \"Health\": \"OK\",\n    \"HealthRollup\": \"OK\",\n    \"State\": \"Enabled\"\n  },\n  \"Thresholds\": {\n    \"LowerCritical\": {\n      \"Reading\": 0.099\n    }\n  }\n}%\nuyadav@uyadav-mlt ~ %\n\u0027\u0027\u0027\n\nFixes JIRA https://jirasw.nvidia.com/browse/DGXOPENBMC-22815\nSigned-off-by: Utkarsh Yadav \u003cuyadav@nvidia.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "95c5979ef78609c49990125739903aa87e7cbf92",
      "old_mode": 33188,
      "old_path": "libnsm/platform-environmental.c",
      "new_id": "7cd70a3171e5d86bded69bd53a66e52c4b66aa5f",
      "new_mode": 33188,
      "new_path": "libnsm/platform-environmental.c"
    },
    {
      "type": "modify",
      "old_id": "9b4b73872432a249293129a7434cab9f4190a2af",
      "old_mode": 33188,
      "old_path": "libnsm/platform-environmental.h",
      "new_id": "027b64d4b350d04828a5e3446ccde1300529fcd7",
      "new_mode": 33188,
      "new_path": "libnsm/platform-environmental.h"
    },
    {
      "type": "modify",
      "old_id": "9c7b499a41be896ebb2eae16c9162321a1625f51",
      "old_mode": 33188,
      "old_path": "mockupResponder/mockupResponder.cpp",
      "new_id": "926e91a5c5c121fe8cf059d3acc604994c045e0e",
      "new_mode": 33188,
      "new_path": "mockupResponder/mockupResponder.cpp"
    },
    {
      "type": "modify",
      "old_id": "b5f63fe18ce65c0d84bb8141b68bf9a433e13a77",
      "old_mode": 33188,
      "old_path": "mockupResponder/mockupResponder.hpp",
      "new_id": "09db387d103ef7d7ef9bf295deb64a7461f5d00b",
      "new_mode": 33188,
      "new_path": "mockupResponder/mockupResponder.hpp"
    },
    {
      "type": "modify",
      "old_id": "5b0ce80ccb05fddfa5834b1e9250bbbc01b3a4ea",
      "old_mode": 33188,
      "old_path": "nsmd/nsmChassis/meson.build",
      "new_id": "92cb4cac5b8214f847e7b6696d15b1466a2f51aa",
      "new_mode": 33188,
      "new_path": "nsmd/nsmChassis/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "463908b9d29894829998f668c1b68f399a053905",
      "new_mode": 33188,
      "new_path": "nsmd/nsmChassis/nsmLeakDetection.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b7fdac7dd7f6aaeb6d57d446226a2837fe151890",
      "new_mode": 33188,
      "new_path": "nsmd/nsmChassis/nsmLeakDetection.hpp"
    },
    {
      "type": "modify",
      "old_id": "31992b45aabe322d7f4c55057cbc0bb705db713f",
      "old_mode": 33188,
      "old_path": "nsmd/nsmDeviceInventory/nsmSwitch.cpp",
      "new_id": "3ea735f8c6abe5516b1fc39984c05df6ada001fe",
      "new_mode": 33188,
      "new_path": "nsmd/nsmDeviceInventory/nsmSwitch.cpp"
    },
    {
      "type": "modify",
      "old_id": "425c632fc55a8aeae40f0e94e2a75d6456776e5c",
      "old_mode": 33188,
      "old_path": "nsmd/nsmSetAsync/asyncOperationManager.hpp",
      "new_id": "6e2bc1aeea23fcecf6c7f56e95e903d44ea5108f",
      "new_mode": 33188,
      "new_path": "nsmd/nsmSetAsync/asyncOperationManager.hpp"
    },
    {
      "type": "modify",
      "old_id": "33cc861783adf3b306f01236e8b95542a4835fb1",
      "old_mode": 33188,
      "old_path": "nsmtool/nsm_telemetry_cmd.cpp",
      "new_id": "6550a95464829a8665028b5d82064440b02c559f",
      "new_mode": 33188,
      "new_path": "nsmtool/nsm_telemetry_cmd.cpp"
    }
  ]
}
