History log of /openbmc/bmcweb/features/redfish/include/event_service_manager.hpp (Results 1 – 25 of 163)
Revision Date Author Comments
# f86cdd7d 12-Aug-2025 Ed Tanous <etanous@nvidia.com>

Move common structures

It's ideal if the various BMCWEB_ROUTE lib calls do not call from one
another. This reduces the amount of code that's compiled each time
separately.

Tested: Code compiles.

Move common structures

It's ideal if the various BMCWEB_ROUTE lib calls do not call from one
another. This reduces the amount of code that's compiled each time
separately.

Tested: Code compiles.

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

show more ...


# 3577e446 19-Aug-2025 Ed Tanous <ed@tanous.net>

Fix includes

Our includes haven't been enforced by tidy in a while. Run the script,
check in the result, minus the false positives.

Change-Id: I6a6da26f5ba5082d9b4aa17cdc9f55ebd8cd41a6
Signed-off-

Fix includes

Our includes haven't been enforced by tidy in a while. Run the script,
check in the result, minus the false positives.

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

show more ...


# 82b286fb 06-May-2025 Ed Tanous <ed@tanous.net>

Remove implicit conversions

Since 2020, nlohmann has recognized that implicit conversions to and
from json are an issue. Many bugs have been caused at both development
time and runtime due to unexp

Remove implicit conversions

Since 2020, nlohmann has recognized that implicit conversions to and
from json are an issue. Many bugs have been caused at both development
time and runtime due to unexpected implicit conversions from json to
std::string/int/bool. This commit disables implicit conversions using
JSON_USE_IMPLICIT_CONVERSIONS [1]. This option will become the default
in the future. That comment was written 3 years ago at this point, so
we should prepare.

Tested:
Redfish service validator passes.

[1] https://json.nlohmann.me/api/macros/json_use_implicit_conversions/
Change-Id: Id6cc47b9bbf8889e4777fd6d77ec992f3139962c
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 449df807 27-May-2025 Ed Tanous <ed@tanous.net>

Remove old load config

This was created to port configurations forward from old systems 4 years
ago. If there are systems that haven't been incermentally moved forward
at this point, they are few a

Remove old load config

This was created to port configurations forward from old systems 4 years
ago. If there are systems that haven't been incermentally moved forward
at this point, they are few and far between, and likely will never
update.

Remove the functionality.

For reference, the original commit adding this was
28afb49c480790e763b8491be0b5a8e35964dbc9

Tested: bmcweb boots. Basic functions (GET /redfish/v1) work properly.

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

show more ...


# 6136e852 14-May-2025 Myung Bae <myungbae@us.ibm.com>

Fix inconsistent persistent subscription load

When BMC reboots or bmcweb restarts, the persistent subscriptions may
not be loaded properly but they may still be in the file.

Later on if BMC reboots

Fix inconsistent persistent subscription load

When BMC reboots or bmcweb restarts, the persistent subscriptions may
not be loaded properly but they may still be in the file.

Later on if BMC reboots or bmcweb restarts, those unloaded subscriptions
may potentially and unexpectedly cause the reload into the active
subscriptions.

The key cause is due to the compiler evaluation order for the function
arguments where the last argument is evaluated and pushed into the stack
first. As the result, the first argument `newSub->id` may already be
invalid after the last argument `std::make_shared<>(std::move(*newSub))`
is evaluated and pushed into the parameter stack [1].
This may cause the failure of `subscriptionsConfigMap.emplace()` and
results in the missing instantiation of the persistent subscriptions.

Tested:
- Create many subscriptions
- GET subscriptions
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions
{
"@odata.id": "/redfish/v1/EventService/Subscriptions",
"@odata.type": "#EventDestinationCollection.EventDestinationCollection",
"Members": [
{
"@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741"
},
...
{
"@odata.id": "/redfish/v1/EventService/Subscriptions/949306789"
}
],
"Members@odata.count": 6,
"Name": "Event Destination Collections"
}
```
- Restart bmcweb
- GET subscriptions again and check whether they are the same.
- Sometimes, none or only a few may be instantiated like

```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions
{
"@odata.id": "/redfish/v1/EventService/Subscriptions",
"@odata.type": "#EventDestinationCollection.EventDestinationCollection",
"Members": [
{
"@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741"
}
],
"Members@odata.count": 1,
"Name": "Event Destination Collections"
}
```
- However, the file `/home/root/bmcweb_persistent_data.json` still has
the old entries.

- Also verify Redfish Service Validator to pass

[1] https://github.com/openbmc/bmcweb/blob/0c814aa604b36cff01b495f9c335f981c7be83be/include/persistent_data.hpp#L184

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

show more ...


# 4a19a7b5 27-Jan-2025 Ed Tanous <etanous@nvidia.com>

Deduplicate event ids

Redfish specification states:
```
The value of the id field shall be the same as the Id property in the
event payload. The value of the Id property in the event payload should

Deduplicate event ids

Redfish specification states:
```
The value of the id field shall be the same as the Id property in the
event payload. The value of the Id property in the event payload should
be the same as the EventId property of the last event record in the
Events array. The value of the EventId property for an event record
should be a positive integer value and should be generated in a
sequential manner.
```

The event service code did not implement that correctly. So:
1. Add ID fields for all events.
2. Remove the per-sse connection id field and rely solely on
EventServiceManager.
3. Make sure all paths, (including metric report) are generating an
event id that's based on the eventservice event id

Tested: Redfish event listener now sees events populated.
LastEventId when sent to the SSE socket now sees a contiguous id.

```
uri=$(curl -s --user "root:0penBmc" -k "https://192.168.7.2/redfish/v1/EventService" | jq -r .ServerSentEventUri)
curl -u root:0penBmc -vvv -k -N -H "Accept: text/event-stream" -H "Last-Event-Id: 0" "https://192.168.7.2$uri"
```

Change-Id: Ic32e036f40a53a9b2715639ae384d7891c768260
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 ...


# 9838eb20 29-Jan-2025 Ed Tanous <etanous@nvidia.com>

Move io context to singleton

The way we pass around io contexts is somewhat odd. Boost maintainers
in slack recommended that we just have a method that returns an io
context, and from there we can

Move io context to singleton

The way we pass around io contexts is somewhat odd. Boost maintainers
in slack recommended that we just have a method that returns an io
context, and from there we can control this (context link lost years
ago).

The new version of clang claims the singleton pattern of passing in an
io_context pattern is a potential nullptr dereference. It's technically
correct, as calling the singleton without immediately initializing the
io context will lead to a crash.

This commit implements what the boost maintainers suggested, having a
single method that returns "the context" that should be used. This also
helps to maintain isolation, as some pieces are no longer tied directly
to dbus to get their reactor.

Tested: WIP

Change-Id: Ifaa11335ae00a3d092ecfdfb26a38380227e8576
Signed-off-by: Ed Tanous <etanous@nvidia.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 ...


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


# 1c588de9 09-Jan-2025 Abiola Asojo <abiola.asojo@ibm.com>

Fix --buildtype=debug build error message

Fixes error:
.../bmcweb/redfish-core/include/event_service_manager.hpp:175:34:
...
potential null pointer dereference [-Werror=null-dereference]

Tested: No

Fix --buildtype=debug build error message

Fixes error:
.../bmcweb/redfish-core/include/event_service_manager.hpp:175:34:
...
potential null pointer dereference [-Werror=null-dereference]

Tested: No longer see this error with buildtype debug

Change-Id: Id245e09267eb52e8eac2bf4eb0e94489409eac2e
Signed-off-by: Abiola Asojo <abiola.asojo@ibm.com>

show more ...


# 81ee0e74 20-Dec-2024 Chandramohan Harkude <Chandramohan.harkude@gmail.com>

Update Submit Test event feature to send custom data

Changes Added : Updated the submit test event feature to send test
data as per spec

https://www.dmtf.org/sites/default/files/standards/documents

Update Submit Test event feature to send custom data

Changes Added : Updated the submit test event feature to send test
data as per spec

https://www.dmtf.org/sites/default/files/standards/documents/
DSP2046_2019.1.pdf


Testing :

Tested sending custom test data
and same data received at the event listener
Change-Id: I2c2363a676aafd39c121c9fe4e16402c0f5961e2
Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>

show more ...


# 21c0ba6e 04-Dec-2024 Myung Bae <myungbae@us.ibm.com>

Make eventId increment per event

Currently, eventId is incremented for each subscriber even for the same
event. So, this is to increment eventId per event.

Tested:
- Run multiple instance of event

Make eventId increment per event

Currently, eventId is incremented for each subscriber even for the same
event. So, this is to increment eventId per event.

Tested:
- Run multiple instance of event listeners
- Generate an event like
```
curl -k -H "X-Auth-Token: $bmc_token" -H "Content-Type: application/json" \
-X POST https://${bmc}/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData \
-d '{"DiagnosticDataType":"Manager"}'
```

- Check the EventId whether it is incremented per event
```
"@odata.type": "#Event.v1_4_0.Event",
"Events": [
{
...
"MessageId": "TaskEvent.1.0.3.TaskStarted",
"MessageSeverity": "OK",
"OriginOfCondition": "/redfish/v1/TaskService/Tasks/0",
"Resolution": "None."
}
],
"Id": 2, <===
"Name": "Event Log"
}
```

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

show more ...


# fb546105 29-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Implement Subscription Heartbeat Logic

This implements the subscription heartbeat logic which will send the
message `RedfishServiceFunctional` periodically with the interval of
`HeartbeatIntervalMin

Implement Subscription Heartbeat Logic

This implements the subscription heartbeat logic which will send the
message `RedfishServiceFunctional` periodically with the interval of
`HeartbeatIntervalMinutes` specified in subscription property [1][2], if
`SendHeartbeat` is enabled..

Note the heartbeat enablement is per event destination as DMTF specifies
[3] like
```
... This message shall only be sent if specifically requested by an event
destination during the creation of a subscription...
```

This also add `HeartbeatEvent` to supported registry prefixes like
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/
{
...
"RegistryPrefixes": [
"Base",
"OpenBMC",
"TaskEvent",
"HeartbeatEvent"
],
"ResourceTypes": [
"Task",
"Heartbeat"
],
```

Tested:

1) A single subscription and heartbeat via Redfish Event Listener

- Create a subscription via Redfish Event Listener
- PATCH `SendHeartbeat=true` and `HeartbeatIntervalMinutes` like

```
curl -k -X PATCH https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} \
-H "Content-Type: application/json" \
-d '{"SendHeartbeat":true, "HeartbeatIntervalMinutes":1}'
```

- Monitor the Redfish Event Listener and check the following heartbeat
messages periodically (per HeartbeatIntervalMinutes)

```
response_type: POST
headers: {'Host': '9.3.62.209', 'Content-Length': '230'}

response={
"@odata.type": "#Event.v1_4_0.Event",
"Events": [
{
"@odata.type": "#Message.v1_1_1.Message",
"EventId": "HeartbeatId",
"EventTimestamp": "2024-11-21T12:21:47+00:00",
"MemberId": "0",
"Message": "Redfish service is functional.",
"MessageArgs": [],
"MessageId": "HeartbeatEvent.1.0.1.RedfishServiceFunctional",
"MessageSeverity": "OK",
"OriginOfCondition": "/redfish/v1/EventService/Subscriptions/1521743607",
"Resolution": "None."
}
],
"Id": "HeartbeatId",
"Name": "Event Log"
}
```

- Change `SendHeartbeat` to false and see whether the heartbeat message
is stopped.

2) Multiple sbscribers with the different heartbeat setups

- create 2 event listeners with 2 different destinations (e.g., port
8080 and 8081).
- Patch sendheartbeat=true to only one subscriber.
- Check whether the only subscriber that enables `SendHeartbeat` is
receiving the heartbeat messages.

3) Redfish Service Validator passes

[1] https://github.com/openbmc/bmcweb/blob/02ea923f13de196726ac2f022766a6f80bee1c0a/redfish-core/schema/dmtf/json-schema/EventDestination.v1_15_0.json#L356
[2] https://redfish.dmtf.org/registries/HeartbeatEvent.1.0.1.json
[3] https://github.com/DMTF/Redfish/blob/d9e54fc8393d8930bd42e8b134741f5051a2680f/registries/HeartbeatEvent.1.0.1.json#L14

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

show more ...


# 6c58a03e 21-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

event service: dbus log: enable event subscription

enable the event subscriptions

/redfish/v1/EventService/Subscriptions/

to work for the dbus event log.

So if you are enabling redfish-dbus-log o

event service: dbus log: enable event subscription

enable the event subscriptions

/redfish/v1/EventService/Subscriptions/

to work for the dbus event log.

So if you are enabling redfish-dbus-log option,
event subscriptions should work similar to when
this option is disabled, with one difference:

- 'MessageArgs' property is currently not implemented and cannot be
found in the returned json.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Manual Test below with the Redfish Event Listener:

1. Created a maximal Event Log Subscription

redfish
{
"@odata.id": "/redfish/v1/EventService/Subscriptions/2023893979",
"@odata.type": "#EventDestination.v1_8_0.EventDestination",
"Context": "EventLogSubscription",
"DeliveryRetryPolicy": "TerminateAfterRetries",
"Destination": "http://${ip}:5000/event-receiver",
"EventFormatType": "Event",
"HttpHeaders": [],
"Id": "2023893979",
"MessageIds": [],
"MetricReportDefinitions": [],
"Name": "Event Destination 2023893979",
"Protocol": "Redfish",
"RegistryPrefixes": [],
"ResourceTypes": [],
"SubscriptionType": "RedfishEvent",
"VerifyCertificate": true
}

which matches on all registries and all message ids.

2. created a new phosphor-logging entry

busctl call xyz.openbmc_project.Logging \
/xyz/openbmc_project/logging \
xyz.openbmc_project.Logging.Create \
Create 'ssa{ss}' \
OpenBMC.0.1.PowerButtonPressed \
xyz.openbmc_project.Logging.Entry.Level.Error 0

3. bmcweb picks up this new entry via the dbus match, this can be
verified by putting bmcweb in debug logging mode.

4. the event log entry makes it through the filtering code

5. the POST request is sent to the subscribed server as expected,
and contains the same properties as with the file-based backend.

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

show more ...


# 7b669723 21-Nov-2024 Ed Tanous <etanous@nvidia.com>

Break out Filesystem events into classes

EventServiceManager is already too large. Implement the TODO from run
that these should be classes, and fix the issue where events are being
registered on s

Break out Filesystem events into classes

EventServiceManager is already too large. Implement the TODO from run
that these should be classes, and fix the issue where events are being
registered on startup, not on a subscription being created.

To accomplish this, this patch takes global state and breaks them out
into RAII classes from EventServiceManager, one for monitoring DBus
matches, and one for monitoring filesystem log events using inotify.
Each of these connect to static methods on EventService that can send
the relevant events to the user.

Fundamentally, no code within the two new classes is changed, and the
only changes to event service are made to support creation and
destruction of the RAII classes.

Tested: WIP
No TelemetryService tests exist in Redfish.

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

show more ...


# 3433b03a 27-Nov-2024 Ed Tanous <etanous@nvidia.com>

Break out SendEventToSubs

Breaking out this small function allows for rolling large parts of this
class into an RAII class in the next patch.

Tested: In the next patch.

Change-Id: I66916dcfd716f99

Break out SendEventToSubs

Breaking out this small function allows for rolling large parts of this
class into an RAII class in the next patch.

Tested: In the next patch.

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

show more ...


# 2ac69850 22-Nov-2024 Ed Tanous <etanous@nvidia.com>

Break out Dbus events into class

EventServiceManager is already too large. Implement the TODO from run
that these should be classes, and fix the issue where events are being
registered on startup,

Break out Dbus events into class

EventServiceManager is already too large. Implement the TODO from run
that these should be classes, and fix the issue where events are being
registered on startup, not on a subscription being created.

To accomplish this, this patch takes global state and breaks them out
into RAII classes from EventServiceManager, one for monitoring DBus
matches, and one for monitoring filesystem log events using inotify.
Each of these connect to static methods on EventService that can send
the relevant events to the user.

Fundamentally, no code within the two new classes is changed, and the
only changes to event service are made to support creation and
destruction of the RAII classes.

There are a number of call sites, like cacheRedfishLogFile, that are
obsoleted when the class is raii. The file will be re-cached on
creation.

Tested: WIP
No TelemetryService tests exist in Redfish.

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

show more ...


# b26ff34d 22-Nov-2024 Ed Tanous <etanous@nvidia.com>

Break out dbus telemetry watcher

EventServiceManager is too large. Make it smaller by breaking out the
dbus log watching mechanisims into a class.

No changes are made, with the exception of the ad

Break out dbus telemetry watcher

EventServiceManager is too large. Make it smaller by breaking out the
dbus log watching mechanisims into a class.

No changes are made, with the exception of the addition of
sendTelemetryReportToSubs to allow sending events from outside the
class, without needing the subscription list, which should be private.

Tested: On last patch in series.

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

show more ...


# 2185ddea 22-Nov-2024 Ed Tanous <etanous@nvidia.com>

Break out filesystem watcher into separate file

EventServiceManager is very large. Break out two of the functions, and
the global variables into a separate compile unit.

Code is copied as-is, with

Break out filesystem watcher into separate file

EventServiceManager is very large. Break out two of the functions, and
the global variables into a separate compile unit.

Code is copied as-is, with no improvements made in this patch.

Tested: At end of series.

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

show more ...


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


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


# 02c1e29f 15-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 ...


# 5fe4ef35 19-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 ...


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


1234567