#
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 ...
|
#
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 ...
|
#
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 ...
|