bb456a6d | 15-Mar-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove the last memcpy
This is the last memcpy in bmcweb. Remove it in leui of std::bit_cast
Tested: Need help.
Change-Id: Ibd6fbc1a8fa9e80cd7e7edf356f8a45448c16189 Signed-off-by: Ed Tanous <etan
Remove the last memcpy
This is the last memcpy in bmcweb. Remove it in leui of std::bit_cast
Tested: Need help.
Change-Id: Ibd6fbc1a8fa9e80cd7e7edf356f8a45448c16189 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
fda37f9b | 21-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix inotify
We don't need the global variable here. Cleanup is handled by the stream_descriptor. Also check error codes per the documentation, not just on == -1
Tested: Created log file manually
Fix inotify
We don't need the global variable here. Cleanup is handled by the stream_descriptor. Also check error codes per the documentation, not just on == -1
Tested: Created log file manually with redfish-event-listener enabled Saw log was sent to consumer.
Change-Id: I27f13c7aedfdfe642128b7129f622047dd933380 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
3c9e6b1c | 11-Jan-2025 |
Chandramohan Harkude <chandramohan.harkude@gmail.com> |
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path separated by / example
curl -k -u root:0penBmc https://<IP>/redfish/v1/Systems/ Baseboard/LogServices/FaultLog/Entries?$filter=CPER/Oem/ OEM/IpSignature eq 'DRAM-CHANNELS'
Results having 'DRAM-CHANNELS' in nested path "CPER/Oem/ OEM/IpSignature" are listed.
Change-Id: Ie6cf796026a29ec7a3e8a0366bbfd0c658d0ac7e Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
show more ...
|
a93e9c77 | 18-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverag
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverage)
Change-Id: Ia6dc50d16bf2967e647a3c7437ba13bd7ab7ca3c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
6c038f26 | 14-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's time to roll it out.
Tested: Message registries generate successfully on GET. Redfish service validator passes.
Change-Id: I7aca2d0a7fac6d530511421b667ff732617df61e Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
0309c216 | 10-Jan-2025 |
Igor Kanyuka <ifelmail@gmail.com> |
Improve subscriptions logging
If the event is not sent to the destination it was supposed to be sent to, it's hard to find out why it was not sent, and what was the message content the code was work
Improve subscriptions logging
If the event is not sent to the destination it was supposed to be sent to, it's hard to find out why it was not sent, and what was the message content the code was working with. Having additional logging (mostly debug) helps with troubleshooting.
Tested: Built an image with these changes, ran in QEMU, enabled debug logging, setup subscription: ``` { "@odata.id": "/redfish/v1/EventService/Subscriptions/3489160873", "@odata.type": "#EventDestination.v1_14_1.EventDestination", "Context": "127.0.0.1", "DeliveryRetryPolicy": "RetryForever", "Destination": "http://127.0.0.1:8888/events", "EventFormatType": "Event", "HeartbeatIntervalMinutes": 10, "HttpHeaders": [], "Id": "3489160873", "MessageIds": [], "MetricReportDefinitions": [], "Name": "Event Destination 3489160873", "Protocol": "Redfish", "RegistryPrefixes": [], "ResourceTypes": [], "SendHeartbeat": false, "SubscriptionType": "RedfishEvent", "VerifyCertificate": true } ```
and sent a message: ``` root@bmc:~# 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
o "/xyz/openbmc_project/logging/entry/16" ```
Got this in the log: ``` Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:65] Handling new DBus Event Log Entry Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Peer Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Introspectable Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Properties Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Common.FilePath Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Software.Version Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Association.Definitions Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Object.Delete Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Logging.Entry Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:59] Found Event Log Entry Id=16, Timestamp=, Message= Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:283] Processing logEntry: 16, '' Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG event_log.cpp:134] formatEventLogEntry: could not find messageID '' for log entry 16 in registry Jan 13 04:13:13 bmc bmcwebd[823]: [WARNING subscription.cpp:292] Read eventLog entry failed Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:317] No log entries available to be transferred. ```
Change-Id: I5cc8d48a0258f2419a7bd4f726f185abbd628110 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
show more ...
|
56431b29 | 03-Dec-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObj
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObjectsType.
Tested: Unit tests pass.
Change-Id: I2e23147190be33192d41176413c16cd98c7bfd81 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
546d0785 | 10-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscription: add MessageId
Use dbus property 'Message' for the redfish Message Id.
The dbus property is not documented to be used for this purpose in the interface definition [1] but th
dbus event subscription: add MessageId
Use dbus property 'Message' for the redfish Message Id.
The dbus property is not documented to be used for this purpose in the interface definition [1] but the design [3] uses it. If there is no valid MessageId, the event filtering code will drop the event anyways.
Tested: The code was already tested in this form in [2] but found to perhaps not be compliant to the redfish specification
References: [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Logging/Entry.interface.yaml[2] 6c58a03e1f6818c3cd0a521466f69ef9e869bf25 [3] https://github.com/openbmc/docs/blob/d886ce89fe66c128b3ab492e530ad48fa0c1b4eb/designs/event-logging.md?plain=1#L448
Change-Id: I4dfe0194e02dc657403d3c0c7162528ec7a597c2 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
4a7a15c2 | 03-Dec-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscription: add timestamp
Get the timestamp from dbus xyz.openbmc_project.Logging.Entry 'Timestamp' property.
This is then transformed into 'EventTimestamp' property.
Tested: Manually
dbus event subscription: add timestamp
Get the timestamp from dbus xyz.openbmc_project.Logging.Entry 'Timestamp' property.
This is then transformed into 'EventTimestamp' property.
Tested: Manually tested [1]
This is already done in this way for the polling api, in log_services.hpp
1455 objectToFillOut["Created"] = 1456 redfish::time_utils::getDateTimeUintMs(entry.Timestamp);
using the same function. So there is nothing new here.
[1] https://discord.com/channels/775381525260664832/1285909954095616050/1327330501937205382
Change-Id: I49670b13d609ac54a5c9d21da9ff1697c7524b5d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
f2656d1b | 13-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
ci: fix ci ubasan failure
remove an unused std::shared_ptr<Subscription>& from void Subscription::resHandler(...)
Since it was just a reference, it was non-owning anyways and removing it should not
ci: fix ci ubasan failure
remove an unused std::shared_ptr<Subscription>& from void Subscription::resHandler(...)
Since it was just a reference, it was non-owning anyways and removing it should not have any impact to the lifetime of the managed object.
Tested: Inspection only.
Change-Id: Iab57e456d5a7ae32305e1a38ddcc37c0f0156ed4 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
4ac78946 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Add content type to HTTP events
Some receiving servers require that content-type be sent. The Redfish specification does not clarify whether or not content-type should be specified, but the HTTP RF
Add content type to HTTP events
Some receiving servers require that content-type be sent. The Redfish specification does not clarify whether or not content-type should be specified, but the HTTP RFC makees it clear, as does security guidelines.
Tested: Set up Redfish-Event-Listener and modify to print headers. Observe that application/json header is now set when events are submitted to the server.
Change-Id: Idc96848e04f185743b14bd345d46418d38f5f5b1 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
a8a5bc1b | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc655966669
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc6559666691f1feb71af08e856d5c80 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
847deee3 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate resource event
Generate Resource event registry
Tested: On last patch of series. No behavior changes.
Change-Id: I924919db0e7fbde8ed698de6b59b86f788de9708 Signed-off-by: Ed Tanous <etano
Generate resource event
Generate Resource event registry
Tested: On last patch of series. No behavior changes.
Change-Id: I924919db0e7fbde8ed698de6b59b86f788de9708 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
f175c280 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate task event
Generate the task event registry.
Tested: on last patch of series
Change-Id: I55b7914978f7a1d637cad6dfae398949af0a7107 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
0f441f09 | 18-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Reformat for clang-19
Change-Id: I6d677b16219482db16c64d5d8412ca557142a597 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
67b2e53b | 11-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix clang-tidy for gcc-14
We use these pragmas, that we must've been getting transitively through chrono in the past. Now we need to include them explicitly.
Change-Id: Iee4c0a8866981b91adaa17bee0
Fix clang-tidy for gcc-14
We use these pragmas, that we must've been getting transitively through chrono in the past. Now we need to include them explicitly.
Change-Id: Iee4c0a8866981b91adaa17bee0678b2c10e65ea9 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
ea20bc66 | 22-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out long lambda in filesystem events
This lambda is very large. Break it out into a smaller method.
Tested: Last patch in series.
Change-Id: Id80de2296fb6301fa26eba0c38bab3570bf82a35 Signed
Break out long lambda in filesystem events
This lambda is very large. Break it out into a smaller method.
Tested: Last patch in series.
Change-Id: Id80de2296fb6301fa26eba0c38bab3570bf82a35 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 ...
|