<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/bmcweb.git/test/redfish-core/include, branch master</title>
<subtitle>A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/'/>
<updated>2026-09-30T18:19:49+00:00</updated>
<entry>
<title>utils: add PrettyName utility function</title>
<updated>2026-09-30T18:19:49+00:00</updated>
<author>
<name>Akash Arunkumar</name>
<email>mirrorghost007@gmail.com</email>
</author>
<published>2026-06-25T06:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=552997940e1a06bc2fc43297d9b7492f008fea03'/>
<id>urn:sha1:552997940e1a06bc2fc43297d9b7492f008fea03</id>
<content type='text'>
Create a reusable utility function getPrettyName() in
utils/name_utils.hpp that can retrieve the PrettyName property from the
D-Bus xyz.openbmc_project.Inventory.Item interface.

The function accepts a JSON pointer parameter, allowing it to set the
PrettyName at any location in the response (e.g. within arrays or nested
objects). This makes it reusable across multiple components (Drives,
Processors, Memory, Chassis, etc.).

Relates-to: https://github.com/openbmc/bmcweb/issues/204

Tested:
- Built bmcweb with meson/ninja successfully
- Tested with https://gerrit.openbmc.org/c/openbmc/bmcweb/+/90364 and
  verified that PrettyName appears in the response
- Falls back to default name when PrettyName is empty

Change-Id: Iebd31b523797152b0e8e7ea8852f86b292fb5f55
Signed-off-by: Akash Arunkumar &lt;mirrorghost007@gmail.com&gt;
Signed-off-by: Justin Nguyen &lt;justinnanguyen@gmail.com&gt;
</content>
</entry>
<entry>
<title>utils: Map Available to UnavailableOffline</title>
<updated>2026-08-19T20:01:10+00:00</updated>
<author>
<name>Justin Nguyen</name>
<email>justinnanguyen@gmail.com</email>
</author>
<published>2026-07-20T15:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=e7df55ce35e441b4a97d0db9ae280a71968ffee6'/>
<id>urn:sha1:e7df55ce35e441b4a97d0db9ae280a71968ffee6</id>
<content type='text'>
- State `Available` will be mapped to `UnavailableOffline` for
  Status.State for resources that are present but unavailable
- Added a utility function to reduce code duplication for retrieving
  resource's Status.State (`getResourceState`) and Status.Health
  (`getResourceHealth`)

Tested:
- Compiles and builds
- Unit tests pass

Change-Id: I1164a9412cbd4e1ab8938366ffc7ea9c7fe58786
Signed-off-by: Justin Nguyen &lt;justinnanguyen@gmail.com&gt;
</content>
</entry>
<entry>
<title>Flag long lambdas</title>
<updated>2026-07-01T17:10:08+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-06-22T16:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=8176ae6778015743b77e8744c046bc50edf13cc4'/>
<id>urn:sha1:8176ae6778015743b77e8744c046bc50edf13cc4</id>
<content type='text'>
Long lambdas have been documented as an anti-pattern for some time.[1]
Despite this being generally understood, bmcweb has a long ways to go
cleaning these up, and routinely code is submitted in violation of this
anti-pattern.

Invent an ast-grep rule that can identify when new examples of this
anti-pattern are added, and ignore the existing 200+ examples that are
in the codebase already using ast-grep ignore.  These flags will give us
something to search for as we clean this up, and will help to prevent
new instances from being added unintentionally.

[1] https://github.com/openbmc/docs/blob/master/anti-patterns.md#very-long-lambda-callbacks

Tested: Comment only change.  ast-grep passes.  Manually removing an
ast-grep ignore flag shows as a failure in ast-grep scan

Change-Id: I77d634a393884969f184d2c39c02cc08288d5a29
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Change a few message responses as errors</title>
<updated>2026-06-25T18:51:59+00:00</updated>
<author>
<name>Myung Bae</name>
<email>myungbae@us.ibm.com</email>
</author>
<published>2026-04-29T12:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=8b0993927ede52f4a32228d955a8405805acedac'/>
<id>urn:sha1:8b0993927ede52f4a32228d955a8405805acedac</id>
<content type='text'>
Some of messages are not currently reported as errors, although they
are the results as Redfish request errors. Those include

- PropertyDuplicate
- ResourceAlreadyExists
- CreateFailedMissingReqProperties
- PropertyValueFormatError
- PropertyValueNotInList
- PropertyValueTypeError
- PropertyValueError
- PropertyNotWritable
- PropertyValueModified
- PropertyMissing

For example, PropertyValueFormatError is currently not treated as an
error. It shows like

```

curl -k -X PATCH "${bmc}/redfish/v1/AccountService/Accounts/admin" \
  -H "Content-Type: application/json" \
  -d '{ "Password": "" }'

  "Password@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The value 'null' for the property Password is not a format that the property can accept.",
      "MessageArgs": [
        "null",
        "Password"
      ],
      "MessageId": "Base.1.19.PropertyValueFormatError",
      "MessageSeverity": "Warning",
      "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
    }
  ]
```

After making it as an error, it will be like
```
{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The value 'null' for the property Password is not a format that the property can accept.",
        "MessageArgs": [
          "null",
          "Password"
        ],
        "MessageId": "Base.1.19.PropertyValueFormatError",
        "MessageSeverity": "Warning",
        "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
      }
    ],
    "code": "Base.1.19.PropertyValueFormatError",
    "message": "The value 'null' for the property Password is not a format that the property can accept."
  }
}
```

Tested:
- Check those response messages

Change-Id: I746c55e42e8f0cde205a3800e3da17cd78cf7e34
Signed-off-by: Myung Bae &lt;myungbae@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>Fix event log timestamp parse error</title>
<updated>2026-06-25T15:16:18+00:00</updated>
<author>
<name>Haiyue Wang</name>
<email>haiyuewa@163.com</email>
</author>
<published>2026-06-23T05:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=ab4232093264b4811695849851bc27137841f03d'/>
<id>urn:sha1:ab4232093264b4811695849851bc27137841f03d</id>
<content type='text'>
The comment from 'getEventLogParams()' says:
    The redfish log format is "&lt;Timestamp&gt; &lt;MessageId&gt;,&lt;MessageArgs&gt;"

And in the OpenBMC main tree, the 'rsyslog.conf' from vendor defines:
    # Template for Redfish messages
    # "&lt;timestamp&gt; &lt;MessageId&gt;,&lt;MessageArgs&gt;"
    template(name="RedfishTemplate" type="list") {
        property(name="timereported" dateFormat="rfc3339")
        constant(value=" ")
        property(name="$!REDFISH_MESSAGE_ID")
        constant(value=",")
        property(name="$!REDFISH_MESSAGE_ARGS")
        constant(value="\n")
    }

    # If the journal entry has a Redfish MessageId, save as a Redfish
    # event
    if ($!REDFISH_MESSAGE_ID != "") then {
        action(type="omfile"
               file="/var/log/redfish"
               template="RedfishTemplate")
    }

The commit aa2dfd26a514 ("Remove static variables") removed extraction
of timestamp data from the whole event log entry, 'dateStringToEpoch()'
will reject this kind of timestamp with trailing text.

Fixes: aa2dfd26a514 ("Remove static variables")

Change-Id: Id59af476e56a913a02a9f56a8c5f38c4ada7ccbf
Signed-off-by: Haiyue Wang &lt;haiyuewa@163.com&gt;
</content>
</entry>
<entry>
<title>redfish_aggregator: test createNewRequest method/body forwarding</title>
<updated>2026-06-24T17:30:20+00:00</updated>
<author>
<name>Gary Beihl</name>
<email>garybeihl@microsoft.com</email>
</author>
<published>2026-06-23T14:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=cb070b8dae84ed54013ca8a22f543e7d4f2c642c'/>
<id>urn:sha1:cb070b8dae84ed54013ca8a22f543e7d4f2c642c</id>
<content type='text'>
The aggregator forwards every method (GET, POST, PATCH, DELETE) to a
singular satellite resource, as described in the "Aggregating a
Resource" section of docs/AGGREGATION.md. createNewRequest() builds
the request that is forwarded, so it must preserve the original
method, target, and body -- otherwise Actions (e.g.
ComputerSystem.Reset) and PATCH updates would not reach the owning
satellite intact. It must also drop the client's X-Auth-Token while
keeping Host/Content-Type and setting Accept.

createNewRequest() had no unit-test coverage. Add tests that pin down
this contract:
 - a non-GET (POST) request preserves method, target, and body
 - a PATCH request preserves its body
 - the client X-Auth-Token is filtered out while Host and
   Content-Type are forwarded and Accept is set

No functional change.

Tested: clean build + full unit-test suite pass in the official
openbmc/ubuntu-unit-test container; the createNewRequest tests added
here pass (3/3).

Signed-off-by: Gary Beihl &lt;garybeihl@microsoft.com&gt;
Change-Id: If82cffe0f47523fc05af8e36892629e273ba865e
</content>
</entry>
<entry>
<title>sensor: add charge type support</title>
<updated>2026-06-12T00:07:56+00:00</updated>
<author>
<name>Jagpal Singh Gill</name>
<email>paligill@gmail.com</email>
</author>
<published>2026-06-08T22:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=dbc915a65b3fb0ddd07f9bcac83a154179debbd5'/>
<id>urn:sha1:dbc915a65b3fb0ddd07f9bcac83a154179debbd5</id>
<content type='text'>
Add ChargeAh ReadingType and Ah units mapping for
charge sensors exposed under /sensors/charge/ D-Bus
path. This enables battery backup unit remaining and
full charge sensors to appear in Redfish. Unit test
added for charge sensor type.

Tested:
1. Sensor Query using curl -
```
{
  "@odata.id": "/redfish/v1/Chassis/BBU_SHELF_1/Sensors/charge_BBU_SHELF_1_BBU5_REMAINING_CHARGE_AH",
  "@odata.type": "#Sensor.v1_11_1.Sensor",
  "Id": "charge_BBU_SHELF_1_BBU5_REMAINING_CHARGE_AH",
  "Name": "BBU SHELF 1 BBU5 REMAINING CHARGE AH",
  "Reading": 10477.0,
  "ReadingType": "ChargeAh",
  "ReadingUnits": "Ah",
  "Status": {
    "Health": "OK",
    "State": "Enabled"
  },
...
}
```

2. Redfish Validation passed using Redfish Validator.

Signed-off-by: Jagpal Singh Gill &lt;paligill@gmail.com&gt;
Change-Id: I9b7180cb8597378a1b42f9da73335ca96b20d55a
</content>
</entry>
<entry>
<title>Add helper function for Location and `LocationType`</title>
<updated>2026-04-21T17:59:46+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2021-12-29T05:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=54406f74d01d5045345e3c6cbe5fb9cae1518a53'/>
<id>urn:sha1:54406f74d01d5045345e3c6cbe5fb9cae1518a53</id>
<content type='text'>
The location_util::getLocation is used to find the `LocationCode`
interface used for `ServiceLabel`. Also added logic to look for the
Inventory.Connector.X interfaces to populate `LocationType`.

The helper function is added to serve as the common location helper
and remove the same method call in each individual resource files.

For example, `Inventory.Connector.Embedded` means LocationType of
Embedded type.

Currently only support LocationType of
- Slot
- Embedded

Tested: No changes to redfish tree yet
Added unit tests

Change-Id: I7f2a8d6172e37dd72881fbfb5a9dfeaf83b2db09
Signed-off-by: Zhenwei Chen &lt;zhenweichen0207@gmail.com&gt;
Signed-off-by: Willy Tu &lt;wltu@google.com&gt;
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Remove static variables</title>
<updated>2026-04-20T22:36:58+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-04-13T18:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=aa2dfd26a514e063d2b62ec32f562cbcd43a21b4'/>
<id>urn:sha1:aa2dfd26a514e063d2b62ec32f562cbcd43a21b4</id>
<content type='text'>
These static variables have the potential to cause reentrancy issues.
In practice, the conditions to cause issues would require someone to
basically write incorrect code, but it makes sense to wrap this into a
state tracker anyway to clean up the code.  While we're here, convert to
using std::chrono.

Note, this changes the behavior such that the values produced are now no
longer dependent on timezone.  Functionally, Redfish only recently got
the ability to set a timezone, so this is not expected to have any user
facing impact, even though the unit tests need to change.

Tested: RSV Passes

Change-Id: Icb7cff1d289ae23790a5fb1db6604abd73dd68fd
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Remove time_t</title>
<updated>2026-04-20T22:36:58+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-04-20T17:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=bb9aae17eeb22ae44f573fd4d33303f65760b5ad'/>
<id>urn:sha1:bb9aae17eeb22ae44f573fd4d33303f65760b5ad</id>
<content type='text'>
time_t is less specific than using the equivalents in std::chono.  In
practice, most of the time we end up converting the time_t to some
std::chrono class anyway.  Avoid the intermediate conversion and just
use the std::chrono version of time.

Tested: Unit tests pass.  Good Coverage

Change-Id: I2e3eca78760e158feaaf4b91793631343e417f15
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
</feed>
