Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HW-Isolation: Fix Additional Data Uri #1128

Open
wants to merge 1 commit into
base: 1110
Choose a base branch
from

Conversation

deepakala-k
Copy link
Contributor

The guard records could be associated with hidden or visible PEL. The additional URI for visible pel would be
/redfish/v1/Systems/system/LogServices/EventLog/Entries//attachment and for the hidden ones it has be
/redfish/v1/Systems/system/LogServices/CELog/Entries//attachment

So before adding the AdditionalDataURI, check for the hidden property of the PEL and add the URI accordingly.

Tested and found it works as expected

{
  "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries",
  "@odata.type": "#LogEntryCollection.LogEntryCollection",
  "Description": "Collection of System Hardware Isolation Entries",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/1",
      "@odata.type": "#LogEntry.v1_9_0.LogEntry",
      "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/CELog/Entries/824/attachment",
      "Created": "2025-01-23T12:57:02+00:00",
      "EntryType": "Event",
      "Id": "1",
      "Links": {
        "OriginOfCondition": {
          "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors/core0"
        }
      },
      "Message": "Spare Guard Record core0",
      "MessageArgs": [
        "Spare",
        "core0"
      ],
      "MessageId": "OpenBMC.0.6.GuardRecord",
      "Name": "Hardware Isolation Entry",
      "Severity": "OK"
    },
    {
      "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/3",
      "@odata.type": "#LogEntry.v1_9_0.LogEntry",
      "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/830/attachment",
      "Created": "2025-01-23T13:08:31+00:00",
      "EntryType": "Event",
      "Id": "3",
      "Links": {
        "OriginOfCondition": {
          "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1/SubProcessors/core0"
        }
      },
      "Message": "Spare Guard Record core0",
      "MessageArgs": [
        "Spare",
        "core0"
      ],
      "MessageId": "OpenBMC.0.6.GuardRecord",
      "Name": "Hardware Isolation Entry",
      "Severity": "OK"
    },
}

The guard records could be associated with hidden or visible PEL. The
additional URI for visible pel would be
/redfish/v1/Systems/system/LogServices/EventLog/Entries/<id>/attachment
and for the hidden ones it has be
/redfish/v1/Systems/system/LogServices/CELog/Entries/<id>/attachment

So before adding the AdditionalDataURI, check for the hidden property of
the PEL and add the URI accordingly.

Tested and found it works as expected

```
{
  "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries",
  "@odata.type": "#LogEntryCollection.LogEntryCollection",
  "Description": "Collection of System Hardware Isolation Entries",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/1",
      "@odata.type": "#LogEntry.v1_9_0.LogEntry",
      "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/CELog/Entries/824/attachment",
      "Created": "2025-01-23T12:57:02+00:00",
      "EntryType": "Event",
      "Id": "1",
      "Links": {
        "OriginOfCondition": {
          "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors/core0"
        }
      },
      "Message": "Spare Guard Record core0",
      "MessageArgs": [
        "Spare",
        "core0"
      ],
      "MessageId": "OpenBMC.0.6.GuardRecord",
      "Name": "Hardware Isolation Entry",
      "Severity": "OK"
    },
    {
      "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/3",
      "@odata.type": "#LogEntry.v1_9_0.LogEntry",
      "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/830/attachment",
      "Created": "2025-01-23T13:08:31+00:00",
      "EntryType": "Event",
      "Id": "3",
      "Links": {
        "OriginOfCondition": {
          "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1/SubProcessors/core0"
        }
      },
      "Message": "Spare Guard Record core0",
      "MessageArgs": [
        "Spare",
        "core0"
      ],
      "MessageId": "OpenBMC.0.6.GuardRecord",
      "Name": "Hardware Isolation Entry",
      "Severity": "OK"
    },
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant