History log of /openbmc/bmcweb/features/redfish/lib/systems_logservices_postcodes.hpp (Results 1 – 11 of 11)
Revision Date Author Comments
# 08fad5d9 31-Jul-2025 Corey Ethington <cethington@coreweave.com>

Add check to omit `DateTime` from etag calculation

Ignores any json property named `DateTime` when calculating
the etag value of an HTTP response as per the updated
Redfish Spec (section 6.5: ETags)

Add check to omit `DateTime` from etag calculation

Ignores any json property named `DateTime` when calculating
the etag value of an HTTP response as per the updated
Redfish Spec (section 6.5: ETags)

Tested:
- Redfish Service Validator passes
- Tested on romulus:
1. GET resource with a "DateTime" field
```
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \
--etag-save ./etag.txt -v
...
< etag: "6A4CE897"
...
{
"@odata.id": "/redfish/v1/TaskService",
"@odata.type": "#TaskService.v1_1_4.TaskService",
"CompletedTaskOverWritePolicy": "Oldest",
"DateTime": "2025-07-23T17:08:20+00:00",
"Id": "TaskService",
"LifeCycleEventOnTaskStateChange": true,
"Name": "Task Service",
"ServiceEnabled": true,
"Status": {
"State": "Enabled"
},
"Tasks": {
"@odata.id": "/redfish/v1/TaskService/Tasks"
}
```

2. GET same resource again later, etag is same as before
```
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \
--etag-save ./etag.txt -v
...
< etag: "6A4CE897"
...
{
"@odata.id": "/redfish/v1/TaskService",
"@odata.type": "#TaskService.v1_1_4.TaskService",
"CompletedTaskOverWritePolicy": "Oldest",
"DateTime": "2025-07-23T17:10:48+00:00",
"Id": "TaskService",
"LifeCycleEventOnTaskStateChange": true,
"Name": "Task Service",
"ServiceEnabled": true,
"Status": {
"State": "Enabled"
},
"Tasks": {
"@odata.id": "/redfish/v1/TaskService/Tasks"
}
```
"DateTime" is the only value to have changed, but since
it is ignored the etag did not change

3. GET with if-none-match returns 304
```
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \
--etag-save ./etag.txt --etag-compare ./etag.txt -v
...
> if-none-match: "6A4CE897"
...
< HTTP/2 304
< allow: GET
< odata-version: 4.0
< strict-transport-security: max-age=31536000; includeSubdomains
< pragma: no-cache
< cache-control: no-store, max-age=0
< x-content-type-options: nosniff
< etag: "6A4CE897"
< date: Wed, 23 Jul 2025 17:14:39 GMT
< content-length: 0
<
...
```

Change-Id: I51f7668e75719c69c55535e4a1e48c8bae7c9488
Signed-off-by: Corey Ethington <cethington@coreweave.com>

show more ...


# fff6a4d3 21-Jul-2021 Abhishek Patel <Abhishek.Patel@ibm.com>

Add SubordinateOverrides & Fix Log_services privileges

SubordinateOverrides:
This commit automates the creation of SubordinateOverrides privileges
structures from the redfish privilege registry.

Add SubordinateOverrides & Fix Log_services privileges

SubordinateOverrides:
This commit automates the creation of SubordinateOverrides privileges
structures from the redfish privilege registry. In addition, it
enhances the function of parse_registries.py.

It reads SubordinateOverrides privilege registry from DMTF and
generates const defines SubordinateOverrides for all the privilege
registry entries in the same format that the Privileges struct
accepts.

Moreover, it generates unique const defines for all
SubordinateOverrides target levels.
Ex: EthernetInterface SubordinateOverrides has two "Targets":
["Manager", "EthernetInterfaceCollection"]. So
parse_registries.py generates two unique const

1) Subordinate override for Manager -> EthernetInterface
2) Subordinate override for Manager ->
EthernetInterfaceCollection -> EthernetInterface

Note: if SubordinateOverrides privilege gets changed, then it
automatically updates that route privilege, but if
SubordinateOverrides target gets changed, then the user needs to
update that manually.

Fix Log_services privileges:
In Log_services, some of the privileges not following the
Redfish_1.1.0_PrivilegeRegistry registry.

This commit contains the following LogServices privileges.

1) POST method
```
ComputerSystem -> LogServiceCollection -> LogService
- POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/
- POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/
- POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/
- POST /LogServices/PostCodes/Actions/LogService.ClearLog/
```

2) DELETE method
```
ComputerSystem -> LogServiceCollection -> LogService -> LogEntryCollection -> LogEntry
- DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/
```

This commit also changes the current privilege

1) ConfigureManager to ConfigureComponents.

```
DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>
```

2) ConfigureCompnents -> ConfigureManager

```
POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/
POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/
POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/
```

Tested: manually tested on Witherspoon system, there is no change in
output. Run Redfish validator, with all different Privileges;
Error Get: UUID: String '' does not match pattern ''
this commit doesn't affect UUID

Email sent to openbmc list:
https://lists.ozlabs.org/pipermail/openbmc/2021-August/027232.html

Change-Id: I37d8a2882f1cfaa59a482083f180fdd0805e2e7d
Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...


# 177612aa 14-Feb-2025 Ed Tanous <etanous@nvidia.com>

Add async_method_call to utility

Adding async_method_call in dbus utility gives us a place where we can
intercept method call requests from dbus to potentially add
logging/caching.

An example of lo

Add async_method_call to utility

Adding async_method_call in dbus utility gives us a place where we can
intercept method call requests from dbus to potentially add
logging/caching.

An example of logging is in the later commit:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/78265/

We already do this for setProperty, this moves the method calls to
follow a similar pattern.

Tested: Redfish service validator passes.

Change-Id: I6d2c96e2b6b6a023ed2138106a55faebca161592
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 504af5a0 03-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# d7857201 28-Jan-2025 Ed Tanous <etanous@nvidia.com>

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.

Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.

Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 40e9b92e 10-Sep-2024 Ed Tanous <etanous@nvidia.com>

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This pa

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This patchset does not intend to modify any intent on any existing
copyrights or licenses, only to standardize their inclusion.

[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects

Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# deae6a78 11-Nov-2024 Ed Tanous <etanous@nvidia.com>

Move getProperty calls to utility

Having all dbus calls run through the same utility reduces the amount of
generated code, and more importantly, gives us a place where we can log
the requests and re

Move getProperty calls to utility

Having all dbus calls run through the same utility reduces the amount of
generated code, and more importantly, gives us a place where we can log
the requests and responses to help with debugging.

Tested: Redfish service validator passes.

Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 6a42dc61 16-Sep-2024 Potin Lai <potin.lai@quantatw.com>

Change primary postcode interface to byte array

At least one processor implementation currently uses 9 byte post codes,
which does not fit nicely into any standard types. The backends are
changing

Change primary postcode interface to byte array

At least one processor implementation currently uses 9 byte post codes,
which does not fit nicely into any standard types. The backends are
changing dbus interface to be two arrays rather than a {uint64, array},
which will allow arbitrary sized postcodes[1].

[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74633

Tested:
- Test with 9 bytes postcode system
```
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries",
"@odata.type": "#LogEntryCollection.LogEntryCollection",
"Description": "Collection of POST Code Log Entries",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.180760+00:00",
"EntryType": "Event",
"Id": "B1-1",
"Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x01000000000001C000",
"MessageArgs": [
"1",
"0.0000",
"0x01000000000001C000"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.282429+00:00",
"EntryType": "Event",
"Id": "B1-2",
"Message": "Boot Count: 1; Time Stamp Offset: 0.1017 seconds; POST Code: 0x01000000020001C100",
"MessageArgs": [
"1",
"0.1017",
"0x01000000020001C100"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-3",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.654501+00:00",
"EntryType": "Event",
"Id": "B1-3",
"Message": "Boot Count: 1; Time Stamp Offset: 0.4737 seconds; POST Code: 0x01000000010001C000",
"MessageArgs": [
"1",
"0.4737",
"0x01000000010001C000"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
......
}
```

- Test attachment (secondary postcode) with maunul feed postcode
- promary: 0x010203040506070809
- secondary: 0x090807060504030201
```
root@bmc:~# busctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '(ayay)' 9 1 2 3 4 5 6 7 8 9 9 9 8 7 6 5 4 3 2 1
root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment",
"Created": "2024-10-15T00:52:38.408819+00:00",
"EntryType": "Event",
"Id": "B1-1",
"Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x010203040506070809",
"MessageArgs": [
"1",
"0.0000",
"0x010203040506070809"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
}
root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment
CQgHBgUEAwIB
```

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Id5e8779b191e733e6be32294d21a0a1775c48db4

show more ...


# 9d62d126 04-Sep-2024 Gunnar Mills <gmills@us.ibm.com>

Correct comment to reflect PrivilegeRegistry

Looking at
https://redfish.dmtf.org/registries/Redfish_1.5.0_PrivilegeRegistry.json
a "Entity": "LogService", is

"POST": [

Correct comment to reflect PrivilegeRegistry

Looking at
https://redfish.dmtf.org/registries/Redfish_1.5.0_PrivilegeRegistry.json
a "Entity": "LogService", is

"POST": [
{
"Privilege": [
"ConfigureManager"

below it is a SubordinateOverrides for
"Targets": [
"ComputerSystem",

with

"POST": [
{
"Privilege": [
"ConfigureComponents"

which is what this LogService is. Update the comment to reflect the
ConfigureComponents is correct.

Found in review on https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74272/

Tested: Inspection only. Comment change only.

Change-Id: I4ffc7d973bb7146c78a8762dde1a42f4c4203a3c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 34fe470a 03-Sep-2024 Ed Tanous <etanous@nvidia.com>

Break out post codes into separate functions

Similar to what we've done other places, break out long inline lambdas
into individual functions.

Tested: Refactor. Code compiles.

Change-Id: I55b53dd

Break out post codes into separate functions

Similar to what we've done other places, break out long inline lambdas
into individual functions.

Tested: Refactor. Code compiles.

Change-Id: I55b53dd018a18f4d4d431ac471acd1f6c5e5e6d9
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 8d2f868c 03-Sep-2024 Ed Tanous <etanous@nvidia.com>

Break out post codes

Similar to other patches, break out the post codes log services into
their own file. log_services.hpp is far too large.

Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8
Si

Break out post codes

Similar to other patches, break out the post codes log services into
their own file. log_services.hpp is far too large.

Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...