History log of /openbmc/bmcweb/redfish-core/ (Results 1 – 25 of 1897)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
9008975e20-Nov-2024 Ed Tanous <etanous@nvidia.com>

Fix regression on metadata uri

e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this
that can be seen from the find and replace. Unfortunately service
validator doesn't catch this, b

Fix regression on metadata uri

e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this
that can be seen from the find and replace. Unfortunately service
validator doesn't catch this, but protocol validator does.

Tested: Run redfish protocol validator and see this test is now passing.

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

show more ...

a877074017-Nov-2024 Ed Tanous <etanous@nvidia.com>

Enable gcc-14 builds

gcc-14 enables the std::chrono features we need for doing lots of time
conversions. For whatever reason, std::chrono accepts a an hour of 60,
whereas date.h didn't. This test

Enable gcc-14 builds

gcc-14 enables the std::chrono features we need for doing lots of time
conversions. For whatever reason, std::chrono accepts a an hour of 60,
whereas date.h didn't. This test case is really just a corner case, so
accept either answer.

Tested: Unit tests pass. Good coverage.

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

show more ...

d109e2b618-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Id0912f6581637bb4117e67b138122c355256b561
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

b80ba2e418-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace.

No functional changes have been made to the code.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Ia0bf658b8b46f92aede059d46e8de48f160e073e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

6a42dc6116-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 ...

9f892fa612-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example,

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example, in case the flash_bios feature is not enabled, the
populateSoftwareInformation shouldn't return an error.

Tested -
Before Fix: Redfish Validator failed with errors -

1 err.Bios.Bios errors in /redfish/v1/Systems/system
1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system
2 failProp errors in /redfish/v1/Systems/system
2 fails errors in /redfish/v1/Systems/system
1 failGet errors in /redfish/v1/Systems/system/Bios
1 fails errors in /redfish/v1/Systems/system/Bios

err.Bios.Bios: 1
err.Collection(Manager.Manager): 3
err.Collection(Resource.Item): 1

Validation has failed: 16 problems found

After Fix: Redfish Validator Passed -

Metadata: Namespaces missing from $metadata: set()

Elapsed time: 0:00:33
missingRedfishAlias: 1
pass: 4343
passAction: 16
passGet: 217
passRedfishUri: 208
skipNoSchema: 3
skipOptional: 4001
unvalidated: 1
unverifiedAdditional.complex: 1
warnDeprecated: 5
warningPresent: 6
warnings: 4
Validation has succeeded.

Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

02c1e29f15-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: break up event_service_manager.hpp

'class Subscription' can be extracted into a separate file.

No changes have been made to the code.

Tested:

- Using Redfish Event Listener, test subscr

Refactor: break up event_service_manager.hpp

'class Subscription' can be extracted into a separate file.

No changes have been made to the code.

Tested:

- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Id0076ef617e36cbb85629a386a4511a4fdb5e4da
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

fa800c8a13-Nov-2024 Gunnar Mills <gmills@us.ibm.com>

Manager: Remove SerialConsole and TODO

In 2020, the OCP Profile moved to accept SerialConsole in either
Manager or System.[1]

That was the reason of still having this code. SerialConsole was
deprec

Manager: Remove SerialConsole and TODO

In 2020, the OCP Profile moved to accept SerialConsole in either
Manager or System.[1]

That was the reason of still having this code. SerialConsole was
deprecated in Manager v1_10_0. v1_19_2 is the latest Manager
version[2].

SerialConsole was added to System in 2021[3]. In 2023, SerialConsole was
enhanced to get the status not just hardcode to enabled.

[1]: https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/issues/23
[2]: https://redfish.dmtf.org/schemas/v1/Manager.v1_19_2.json
[3]: https://github.com/openbmc/bmcweb/commit/0e8ac5e706c531d2a3e2fc8390d9a31b90a91eb1
[4]: https://github.com/openbmc/bmcweb/commit/5c3e927283e32e1633ccd409f34ee17fab626ca1

Tested: Covered by automated tests.

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

show more ...

d27c31e915-Oct-2024 Jagpal Singh Gill <paligill@gmail.com>

update service name for UPDATESERVICE_USE_DBUS

Update the Dbus service name and path for
BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation
the new BMC code updater daemon name

update service name for UPDATESERVICE_USE_DBUS

Update the Dbus service name and path for
BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation
the new BMC code updater daemon name is
xyz.openbmc_project.Software.Manager, update setActiveImage and
FactoryReset flows to reflect so.

Tested:
```
> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X POST https://${bmc}/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults -d '{"ResetType": "ResetAll"}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.19.0.Success",
"MessageSeverity": "OK",
"Resolution": "None."
}
]
}

> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH https://${bmc}/redfish/v1/Managers/bmc -d '{"Links": {"ActiveSoftwareImage": {"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/70f4c0cb"}}}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.19.0.Success",
"MessageSeverity": "OK",
"Resolution": "None."
}
]
}
```

Change-Id: I42ef2485fa119474b7fd12ea94dd654c3432c067
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

5fe4ef3519-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Make UserSubscription as shared_ptr in Subscription

Currently UserSubscription are used as value in Subscription. This
causes the copy of the object between subscriptionsMap and
subscriptionConfigMa

Make UserSubscription as shared_ptr in Subscription

Currently UserSubscription are used as value in Subscription. This
causes the copy of the object between subscriptionsMap and
subscriptionConfigMap when doing PATCH.

Using a shared_ptr for UserSubscription avoids the memory copy of it.

Tested:

- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

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

show more ...

b07942e331-Oct-2024 George Liu <liuxiwei@ieisystem.com>

Fix snmp port out of range

SNMP out of range port doesn't works, it should throw HTTPS 400 error
It went ahead and configures it, with default port which is not the
correct behavior.

Tested: If the

Fix snmp port out of range

SNMP out of range port doesn't works, it should throw HTTPS 400 error
It went ahead and configures it, with default port which is not the
correct behavior.

Tested: If the snmp port is out of range, a 400 error will be thrown.
```
$ curl --header "Content-Type: application/json" X POST -i -k -u root:0penBmc https://{bmc}/redfish/v1/EventService/Subscriptions --data-raw '{"Destination": "snmp://xx.xx.xx.76:65537","SubscriptionType": "SNMPTrap", "Protocol": "SNMPv2c"}' -vv
...

< HTTP/1.1 400 Bad Request
...

{
"Destination@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The value '\"snmp://xx.xx.xx.76:65537\"' for the property Destination is of a different format than the property can accept.",
"MessageArgs": [
"\"snmp://xx.xx.xx.76:65537\"",
"Destination"
],
"MessageId": "Base.1.16.0.PropertyValueFormatError",
"MessageSeverity": "Warning",
"Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
}
]
* Connection #0 to host 127.0.0.1 left intact
}
```

Change-Id: I6e002153ca37b4eb3d4538a64fa61ab35e9dab85
Signed-off-by: George Liu <liuxiwei@ieisystem.com>

show more ...

02ea923f25-Oct-2024 Gunnar Mills <gmills@us.ibm.com>

Remove 2nd incorrect TotalCores

bmcweb has 2 places where it is setting the processor's TotalCores, here
and in the getCpuDataByInterface call[1].

The way being removed of getting TotalCores, assum

Remove 2nd incorrect TotalCores

bmcweb has 2 places where it is setting the processor's TotalCores, here
and in the getCpuDataByInterface call[1].

The way being removed of getting TotalCores, assumes the path of cores
is <processorPath/core*>, it also has some interesting logic for
present.

The getCpuDataByInterface goes out to D-Bus and gets the CoreCount
value, part of the CPU interface[2] in PDI.

IBM isn't using this path way of getting TotalCores. Don't see any
company that is but hard to know. Since this way is wrong, don't think
we should put behind a meson option, instead just remove.

History:
Aug, 2019: IBM added getting "TotalCores" by assuming this core path[3]
Aug, 2020: Intel added CPU properties including corecount to PDI[4]
Sept, 2020: Intel adds using this D-Bus property[5]

Long term, it would be good to model the cores, the cores and processor
have an association,[6] the bmcweb review for the cores is using this
association[7].

[1]: https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/processor.hpp#L133
[2]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/73c931fb942daa714bfff17e950b9d5622a25842/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml#L46
[3]: https://github.com/openbmc/bmcweb/commit/ec8faf9243b6f6320daeb3ba6a94d1f257034506
[4]: https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e0c40b287d9ea79f77db1654da47161340
[5]: https://github.com/openbmc/bmcweb/commit/029cc1f4106968f7e871d17a8bcb71a303a12ffa
[6]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/56395
[7]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38570

Tested: It builds. TotalCores is still there.

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

show more ...

f712565323-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Remove SubscriptionId get and set functions

There are places to get or set subscription id differently like
`userSub.id` directly, or via `get/setSubscriptionId()` functions.

However, those aux fun

Remove SubscriptionId get and set functions

There are places to get or set subscription id differently like
`userSub.id` directly, or via `get/setSubscriptionId()` functions.

However, those aux functions are used only once and can be replaced to
access `userSub.id` directly.

Tested:
- Complies good
- Subscription GET and PATCH work correctly

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

show more ...

a0969c7019-Sep-2024 Myung Bae <myungbae@us.ibm.com>

Remove subscription for TerminateAfterRetries policy

Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2]
specify that the subscription is terminated under the following policy
an

Remove subscription for TerminateAfterRetries policy

Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2]
specify that the subscription is terminated under the following policy
and the conditions.

DeliveryRetryPolicy:
- `TerminateAfterRetries`:
```
This value shall indicate the subscription is terminated after the
maximum number of retries is reached, specified by the
DeliveryRetryAttempts property in the event service.
```

This implements this policy to delete subscription of the stale client
connections after trying `DeliveryRetryAttempts` when
`DeliveryRetryPolicy == TerminateAfterRetries`.

Tested:
1) Subscription with blocked communication between bmcweb and listener

- Run Redfish Event Listener [3] to subscribe events with
`DeliveryRetryPolicy == TerminateAfterRetries`

- Check the subscription creation
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/
```

- Generate an event and check the delivery to the listener.
For example,
```
curl -k -X POST https://${bmc}/redfish/v1/EventService/Actions/EventService.SubmitTestEvent
```

- Block the communication between bmcweb and listener
(or modify the listener not to delete the subscription at its exit, and
kill the listener so that its subscription is still alive)

- If the above task is already finished, generate more events and wait
for the sufficient time till `DeliveryRetryAttempts`.

- bmcweb journal log may contain the entries like
```
Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR http_client.hpp:444] Maximum number of retries reached. https://9.3.62.209:8080/Redfish-Event-Listener
Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR event_service_manager.hpp:1459] Subscription 590587653 is deleted after MaxRetryAttempts
```

- Check the subscription again if the subscription is deleted.

2) Redfish Validator passes

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2024.3.html
[2] https://github.com/openbmc/bmcweb/blob/878edd599b1706ec8ffe6c3d81ba7cb3534f6393/redfish-core/schema/dmtf/csdl/EventDestination_v1.xml#L857
[3] https://github.com/DMTF/Redfish-Event-Listener

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

show more ...

56ba386d10-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Fix Persistent Subscription PATCH

The `RedfishEvent` subscription is expected to be persistent over bmc
reboot or bmcweb restart. However, the properties on PATCH are
currently not persistent after

Fix Persistent Subscription PATCH

The `RedfishEvent` subscription is expected to be persistent over bmc
reboot or bmcweb restart. However, the properties on PATCH are
currently not persistent after reboot or bmcweb restart.

This commit is to sync those properties to the persistent store after
PATCH.

In addition, this commit fixes a missing `id` copy when a new
UserSubscription is created in [1] (introduced by [2]). As a result, it
may cause the following messages during bmcweb start after subscription
POST or PATCH like
```
Oct 16 14:37:34 p10bmc systemd[1]: Started Start bmcwebd server.
Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR event_service_store.hpp:253] Subscription missing required field information, refusing to restore
Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR persistent_data.hpp:166] Problem reading subscription from persistent store
```
After this, those subscriptions become lost.

Tested:

1. Subscription PATCH

- Create a subscription (e.g. use Redfish-Service-Validator).

- GET subscription and check the properties
```
SUBID=<id>
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID}
```

- PATCH subscription with a different value.
```
curl -k -X PATCH https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} \
-H "Content-Type: application/json" -d '{"DeliveryRetryPolicy":"RetryForever"}'
```

- Reboot BMC or restart bmcweb

- GET subscription and check the properties
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID}
````

Before the fix, the property values are the same as before PATCH.
After the fix, the last patched property values will be kept.

2. Redfish Service Validator passes

[1] https://github.com/openbmc/bmcweb/blob/21a94d5cd4be74a85c978c0cd63e4c633093c531/redfish-core/include/event_service_manager.hpp#L812
[2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65720

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

show more ...

7585b76017-Oct-2024 Jishnu CM <jishnunambiarcm@duck.com>

Adds redfish error for GenerateSecretKeyRequired

This commit contains the redfish error to be returned when it finds
that MFA is enabled and the user has to generate secret key to proceed
further.

Adds redfish error for GenerateSecretKeyRequired

This commit contains the redfish error to be returned when it finds
that MFA is enabled and the user has to generate secret key to proceed
further.

Used and tested in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74938.

Change-Id: If13b96729510fc7b165aa792f1e1d23a811ca733
Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>

show more ...

340d74c812-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Handling of OutOfRange in ReadJson

Currently readJsonPatch returns `PropertValueNotInList` in case when an
input integer is out of range. This change is to return
`PropertyValueOutOfRange` for the

Handling of OutOfRange in ReadJson

Currently readJsonPatch returns `PropertValueNotInList` in case when an
input integer is out of range. This change is to return
`PropertyValueOutOfRange` for the case out-of-range integer input.

Tested:

- Verify PATCH with an out-of-value integer. e.g.
```
$ curl -k -X PATCH https://${bmc}/redfish/v1/EventService/ -H "Content-Type: application/json" -d '{ "DeliveryRetryIntervalSeconds" : 4294967296}'
```

Before the change, its `MessageId` is `PropertyValueNotInList`.
```
"Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the list of acceptable values.",
"MessageId": "Base.1.19.0.PropertyValueNotInList",
"MessageSeverity": "Warning",
"Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed."
```

After the change, its `MessageId` will be `PropertyValueOutOfRange`.

```
"Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the supported range of acceptable values.",
"MessageId": "Base.1.19.0.PropertyValueOutOfRange",
"MessageSeverity": "Warning",
"Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
```

- Redfish Service Validator passes

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

show more ...

788b091b14-Oct-2024 Igor Kanyuka <ifelmail@gmail.com>

Event: Change MemberId type to string

The type of the MemberId according to the schema
https://redfish.dmtf.org/schemas/v1/Event.v1_4_0.json is string
and not int. This prevents the request from be

Event: Change MemberId type to string

The type of the MemberId according to the schema
https://redfish.dmtf.org/schemas/v1/Event.v1_4_0.json is string
and not int. This prevents the request from being deserialized
by clients written in typed languages.

Change-Id: Ic1a00044fdb71e20cb96d4256e935f59bf79da8f
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>

show more ...

5900d4c310-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

clang-tidy: add misc-include-cleaner fixes

Fix the following clang-tidy errors:
```
../redfish-core/src/filter_expr_executor.cpp:102:21: error: no header providing "nlohmann::json" is directly inclu

clang-tidy: add misc-include-cleaner fixes

Fix the following clang-tidy errors:
```
../redfish-core/src/filter_expr_executor.cpp:102:21: error: no header providing "nlohmann::json" is directly included [misc-include-cleaner,-warnings-as-errors]
7 | const nlohmann::json& body;
```

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

show more ...

21a94d5c14-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Fix coredump during subscription

Commit 4b712a29debc1a0860cc04850b262203cad402a5 [1] a bug on missing the
subscription copy from user persistent data when subscription object is
created, and it may

Fix coredump during subscription

Commit 4b712a29debc1a0860cc04850b262203cad402a5 [1] a bug on missing the
subscription copy from user persistent data when subscription object is
created, and it may cause a bmcweb crash.

Tested:

- Create subscription (e.g. Redfish Event Listener)

- Create a dump
```
curl -k -X POST "https://${bmc}/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData" \
-H "Content-Type: application/json" -d '{"DiagnosticDataType": "Manager"}'

curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
```

BMC journal will contain like
```
Oct 14 21:49:20 p10bmc bmcwebd[287]: terminate called after throwing an instance of 'std::bad_weak_ptr'
Oct 14 21:49:20 p10bmc bmcwebd[287]: what(): bad_weak_ptr
Oct 14 21:49:21 p10bmc systemd[1]: bmcweb.service: Main process exited, code=dumped, status=6/ABRT
Oct 14 21:49:21 p10bmc systemd[1]: bmcweb.service: Failed with result 'core-dump'

```
[1] 4b712a29debc1a0860cc04850b262203cad402a5

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

show more ...

afc474ae09-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Format readjson

clang-format may potentially reformat the readJson calls if they may
have more keys or key names are longer. This makes formatting in a way
that's readable by forcing to break a line

Format readjson

clang-format may potentially reformat the readJson calls if they may
have more keys or key names are longer. This makes formatting in a way
that's readable by forcing to break a line for each key using an
empty-comment (`//`) each line.

It also allows trivially alphabetizing the list such that new additions
are less likely to have merge conflicts.

Tested:
- Check whitespace only.
- Code compiles.
- Redfish Service Validator with the same results before this

Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

6fe8751c20-Jul-2023 George Liu <liuxiwei@inspur.com>

Implement TemperatureReadingsCelsius property for ThermalMetrics

The ThermalMetrics schema[1] provides for efficient thermal metric
gathering for thermal sensors. The schema allows retrieving just t

Implement TemperatureReadingsCelsius property for ThermalMetrics

The ThermalMetrics schema[1] provides for efficient thermal metric
gathering for thermal sensors. The schema allows retrieving just the
thermal metrics with one Redfish URI. This prevents the additional work
required when returning all the sensor data, or multiple Redfish URI
calls to retrieve the properties for all of the thermal sensors.

This commit implements the TemperatureReadingsCelsius property of
ThermalMetrics[1]. ThermalMetrics is a property of ThermalSubsystem[2].
TemperatureReadingsCelsius is a SensorArrayExcerpt[3].

[1] https://redfish.dmtf.org/schemas/v1/ThermalMetrics.v1_0_1.json
[2] https://redfish.dmtf.org/schemas/v1/ThermalSubsystem.v1_3_2.json
[3] http://redfish.dmtf.org/schemas/v1/Sensor.v1_9_0.json#/definitions/SensorArrayExcerpt

The temperature sensors are found by finding 'all_sensors' endpoints for
specific chassis of D-Bus service
/xyz/openbmc_project/sensors/temperature. An entry of SensorArrayExcerpt
is built for each temperature sensor retrieved.

Implementation Notes:
- Common function sensor_utils::objectPropertiesToJson() is used to
fill in sensor excerpt properties. Currently the only excerpt
ChassisSubNode is ThermalMetrics. However there are others excerpts
defined by Redfish. Right now mostly this is just skipping things,
but I'm expecting when other sensor excerpts are implemented that
some of the other properties may be added for excerpts as well. I'm
expecting the combination of the chassisSubNode and the sensorType
will be used to determine which properties are included for a
particular call to build a sensor Json representation.
- New sensor_utils::objectExcerptToJson() function created. This wraps
sensor_utils::objectPropertiesToJson() and builds DataSourceUri for a
sensor excerpt.
- New sensor_utils::getAllSensorObjects() function created. This builds
list of 'all_sensors' association endpoints for specified D-Bus path
with specified D-Bus interfaces. Callback function is called with
list for handling sensors.

Tested:
1. Redfish Service Validator passed.
2. doGet method:
```
curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics",
"@odata.type": "#ThermalMetrics.v1_0_1.ThermalMetrics",
"Id": "ThermalMetrics",
"Name": "Thermal Metrics",
"TemperatureReadingsCelsius": [
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp0",
"Reading": -131072000.0
},
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp1",
"Reading": -131072000.0
},
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp2",
"Reading": -131072000.0
},
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0",
"Reading": -131072000.0
},
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp1",
"Reading": -131072000.0
},
{
"DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp2",
"Reading": -131072000.0
}
],
"TemperatureReadingsCelsius@odata.count": 6
}
```

3. Verification of DataSourceUri:
```
curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0
{
"@odata.id": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0",
"@odata.type": "#Sensor.v1_2_0.Sensor",
"Id": "temperature_ps1_temp0",
"Name": "ps1 temp0",
"Reading": -131072000.0,
"ReadingType": "Temperature",
"ReadingUnits": "Cel",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
```

4. A bad chassis ID:
```
curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassisBAD/ThermalSubsystem/ThermalMetrics
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis named 'chassisBAD' was not found.",
"MessageArgs": [
"Chassis",
"chassisBAD"
],
"MessageId": "Base.1.18.1.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier and resubmit the request."
}
],
"code": "Base.1.18.1.ResourceNotFound",
"message": "The requested resource of type Chassis named 'chassisBAD' was not found."
}
}
```

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I6e4ed1f281fd5371c978983b6cc5666badd3752c
Signed-off-by: Janet Adkins <janeta@us.ibm.com>

show more ...

d3a48a1425-Sep-2024 Ed Tanous <etanous@nvidia.com>

Refactor eventMatchesFilter

eventMatchesFilter no longer needs to be a member of the Subscription
class, because it no longer uses subscription data. Refactor so it can
be in its own file, with its

Refactor eventMatchesFilter

eventMatchesFilter no longer needs to be a member of the Subscription
class, because it no longer uses subscription data. Refactor so it can
be in its own file, with its own set of unit tests.

Tested: Unit Tests pass.

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

show more ...

4b712a2902-Aug-2023 Ed Tanous <edtanous@google.com>

Move UserSubscription to composition

This allows for two very important simplifying changes. First, we can
use the default copy operators on the UserSubscription class, which is
far less error pron

Move UserSubscription to composition

This allows for two very important simplifying changes. First, we can
use the default copy operators on the UserSubscription class, which is
far less error prone than writing it manually, which we have two copies
of in code already.

Second, it allows the Subscription class to move to using values rather
than shared_ptr everywhere, which cleans up a significant amount of
code.

Tested:
Ran Redfish-Event-Listener, subscription created and destroyed
correctly.
Calling POST SubmitTestEvent showed events propagating to server.

Change-Id: I6d258cfe3594edddf3960ae2d4559d70acca1bf8
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

41868c6609-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Reformat with Never-AlignTrailingComments style

clang-format currently formats the codes to align the trailing comments
of the consecutive lines via `AlignTrailingComments/Kind` as `Always` in
`.cla

Reformat with Never-AlignTrailingComments style

clang-format currently formats the codes to align the trailing comments
of the consecutive lines via `AlignTrailingComments/Kind` as `Always` in
`.clang-format` file.

This could shift the comment lines by the neighboring code changes and
also potentially mislead the `diff` of code changes.

This commit is to keep the existing trailing comments as they were.

Tested:
- Check whitespace only
- Code compiles & CI passes.

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

show more ...

12345678910>>...76