History log of /openbmc/bmcweb/features/redfish/include/event_service_manager.hpp (Results 101 – 125 of 163)
Revision Date Author Comments
# fffb8c1f 08-Feb-2022 Ed Tanous <edtanous@google.com>

Change message_registries namespace to registries

The message_registries namespace is overly wordy, and results in very
long defines. Doing this one minor change reduces the code by 50 lines.
This

Change message_registries namespace to registries

The message_registries namespace is overly wordy, and results in very
long defines. Doing this one minor change reduces the code by 50 lines.
This seems worthwhile.

Tested: Unit tests pass. Namespace change only.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib1401580b3fa47596eb56cdc86e60eeeb1c2f952

show more ...


# 11baefe4 09-Feb-2022 Ed Tanous <edtanous@google.com>

Move validateAndSplitUri to common utility header

This function in practice looks like it has another use where the code
is essentially the same. Move it to a header so it can be used by other
thin

Move validateAndSplitUri to common utility header

This function in practice looks like it has another use where the code
is essentially the same. Move it to a header so it can be used by other
things. And add unit tests to ensure it stays reliable.

Tested: Unit tests pass.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3343ba1aa9c0dd542fbb98628b7628cb0704fb3b

show more ...


# dbb59d4d 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-uppercase-literal-suffix

We only had a few violations of this; Fix them and enable the check.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I159e774fd0169a91a092218e

Enable readability-uppercase-literal-suffix

We only had a few violations of this; Fix them and enable the check.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I159e774fd0169a91a092218ec8dc896ba9edebf4

show more ...


# e662eae8 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series thro

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1ca0be980d136bd4e5474341f4fd62f2f6bbdbae

show more ...


# c5ba4c27 07-Feb-2022 Ed Tanous <edtanous@google.com>

Abstract fillMessageArgs and unit test it

EventService has a routine for taking a message registry entry and
populate it with data. This ideally should be part of the message
registry namespace, no

Abstract fillMessageArgs and unit test it

EventService has a routine for taking a message registry entry and
populate it with data. This ideally should be part of the message
registry namespace, not EventService, as it could be useful to later
patchsets. So break out the method, and write some unit tests to ensure
that it can be relied upon in the future.

Tested: Unit tests ran and passing.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I052d9492f306b63fb72cbf78286370ed0c477430

show more ...


# e05aec50 25-Jan-2022 Ed Tanous <edtanous@google.com>

Add readability-redundant-* checks

There's a number of redundancies in our code that clang can sanitize
out. Fix the existing problems, and enable the checks.

Signed-off-by: Ed Tanous <edtanous@go

Add readability-redundant-* checks

There's a number of redundancies in our code that clang can sanitize
out. Fix the existing problems, and enable the checks.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie63d7b7f0777b702fbf1b23a24e1bed7b4f5183b

show more ...


# 9eb808c1 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-avoid-const-params-in-decls

This check involves explicitly declaring variables const when they're
declared auto, which helps in readability, and makes it more clear that
the varia

Enable readability-avoid-const-params-in-decls

This check involves explicitly declaring variables const when they're
declared auto, which helps in readability, and makes it more clear that
the variables are const.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I71198ea03850384a389a56ad26f2c4a48c75b148

show more ...


# 6ba8c82e 06-Jul-2021 sunharis_in <sunharis@in.ibm.com>

Send push-style event only if EventService enabled

As per DMTF Redfish, if the event service is disabled, events are not
expected to be posted to the existing subscribers

This commit adds validatio

Send push-style event only if EventService enabled

As per DMTF Redfish, if the event service is disabled, events are not
expected to be posted to the existing subscribers

This commit adds validation to check "ServiceEnabled" property while
sending events. An additional check is made not to attempt sending
events if there are no event subscribers at BMC

Tested by:
Using DMTF Redfish-Event-Listener script with some local modification
to support the latest event subscription specifications

1. With a Push-style event subscriber setup, set "ServiceEnabled" to
false
PATCH /redfish/v1/EventService -d '{"ServiceEnabled":false}'
2. Generate events and check no events are posted to subscriber
2. Set "ServiceEnabled" to true. BMC should resume sending further
events
3. Check if BMC attempts to send events by forming the eventRecords
when there are no subscriptions made - Verified with traces that
events are not sent out
4. With "ServiceEnabled" set to false, verified the SubmitTestEvent
fails

Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: Icbe7c25ba12bbfb73e59639c484fccdf384ebecf

show more ...


# dcf2ebc0 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-redundant-control-flow checks

These checks are a nice addition to our static analysis, as they
simplify code quite a bit, as can be seen by this diff being negative
lines.

Signed

Enable readability-redundant-control-flow checks

These checks are a nice addition to our static analysis, as they
simplify code quite a bit, as can be seen by this diff being negative
lines.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I60ede4ad23d7e5337e811d70ddcab24bf8986891

show more ...


# 26f6976f 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-container-size-empty tests

This one is a little trivial, but it does help in readability.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5366d4eec8af2f781b3bad804131a

Enable readability-container-size-empty tests

This one is a little trivial, but it does help in readability.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5366d4eec8af2f781b3bad804131ae2eb806e3aa

show more ...


# d3a9e084 07-Jan-2022 Ed Tanous <edtanous@google.com>

Enforce variable init

There were a few places we weren't initting our variables per cpp core
guidelines. Fix all of them, and enable checks for this.

Signed-off-by: Ed Tanous <edtanous@google.com>

Enforce variable init

There were a few places we weren't initting our variables per cpp core
guidelines. Fix all of them, and enable checks for this.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iba09924beb9fb26f597ff94d1cecbd6d6b1af912

show more ...


# ecd6a3a2 07-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-special-member-functions checks

Part of enforcing cpp core guidelines involves explicitly including all
constructors required on a non-trivial class. We were missing quite

Enable cppcoreguidelines-special-member-functions checks

Part of enforcing cpp core guidelines involves explicitly including all
constructors required on a non-trivial class. We were missing quite a
few. In all cases, the copy/move/and operator= methods are simply
deleted.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie8d6e8bf2bc311fa21a9ae48b0d61ee5c1940999

show more ...


# 248d0230 04-Jan-2022 Ed Tanous <edtanous@google.com>

Make code compile with clang

One minor shadowed variable that needed it's name changed, and a missing
inline statement.

Tested: Code now builds in clang-13

Signed-off-by: Ed Tanous <edtanous@googl

Make code compile with clang

One minor shadowed variable that needed it's name changed, and a missing
inline statement.

Tested: Code now builds in clang-13

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I83b662a2818e1469dfeb29b818338346e40cb832

show more ...


# 1e1e598d 11-Jun-2021 Jonathan Doman <jonathan.doman@intel.com>

Using sdbusplus::asio::getProperty

It simplifies a lot of code and after changing sdbusplus implementation
slightly reduces binary size if used together with:

https://gerrit.openbmc-project.xyz/c/o

Using sdbusplus::asio::getProperty

It simplifies a lot of code and after changing sdbusplus implementation
slightly reduces binary size if used together with:

https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/49467

* Uncompressed size: 3033148 -> 3012164, -20984 B
* gzip compressed size: 1220586 -> 1214625, -5961 B

Tested:
- Redfish validator output is the same before and after the change

Change-Id: Ibe3227d3f4230de2363ba3d9396e51130c8240a5
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 168e20c1 13-Dec-2021 Ed Tanous <edtanous@google.com>

Move to common variant

This saves approximately 34kB in the compressed binary size of bmcweb
due to reduced template instantiations. This amounts to a 2.5%
reduction in the overall size.

Note, the

Move to common variant

This saves approximately 34kB in the compressed binary size of bmcweb
due to reduced template instantiations. This amounts to a 2.5%
reduction in the overall size.

Note, there were a few places where we broke const-correctness in the
form of pulling a non-const reference out of a const variant. This
new variant now requires const correctness, so some consts are
added where required.

Tested: Code compiles.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I6a60c8881c1268627eedb4ffddf16689dc5f6ed2

show more ...


# 2558979c 24-Jun-2021 P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>

Restructure Redfish EventLog Transmit code flow

In the current implementation:
1. When Event service is disabled and enabled back after a while,
all the logs during this time span between disab

Restructure Redfish EventLog Transmit code flow

In the current implementation:
1. When Event service is disabled and enabled back after a while,
all the logs during this time span between disable to enable
are dumped to the Event listener.
2. When two(or more) events occur very close (in terms of
microseconds) and they trigger multiple iNotify events,
the listener receives all of these events with the same
Event ID.

This occurs as the last log timestamp read from redfish file
and previous time stamp used to generate Event ID's are not
being updated continuously.

This commit fixes this issue by tweaking the logic to continuously
update the time stamp values (even when Event Service is disabled),
and also replaces multiple string operations with file operations.
i.e. Instead of looping through the entire Redfish file until last
timestamp read is reached, this fix makes use of seekg to get to
the last read position.

Tested:
- Subscribed to an event and successfully received Event Logs.
- No Event Logs were received when Event Service was disabled.
- No Dump of past Events after Event Service was enabled.
- Redfish Validator passed

Change-Id: Id8407ff7e9fc48e7810c9193ef43f707b9615c36
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Signed-off-by: Ankita Vilas Gawade <ankita.gawade@intel.com>

show more ...


# 26702d01 03-Nov-2021 Ed Tanous <edtanous@google.com>

/s/boost::beast::span/std::span

std::span is now available in c++ 20 builds, and should be a drop in
replacement for boost::span we were using previously. This commit sed
replaces it, and changes r

/s/boost::beast::span/std::span

std::span is now available in c++ 20 builds, and should be a drop in
replacement for boost::span we were using previously. This commit sed
replaces it, and changes reference to cbegin and cend to begin and end
respectively.

Tested:
Ran redfish-service-validator. No new failures, and all nodes within
/redfish/v1/Registries that would be effected by this change respond
with 200 and the same content as previously.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iace89473b7c20f32106eae9d872c16cfae5f17f6

show more ...


# c0353249 15-Dec-2020 Wludzik, Jozef <jozef.wludzik@intel.com>

Sync Telmetry service with EventService

Synced the latest changes in Telemetry service with Event Service
code. Now assembling MetricReport is covered in single place in
code. Updated method of fetc

Sync Telmetry service with EventService

Synced the latest changes in Telemetry service with Event Service
code. Now assembling MetricReport is covered in single place in
code. Updated method of fetching Readings from Telemetry by
Event Service. Using ReportUpdate signal is no longer
supported. Now Event Service monitors for PropertiesChanged signal
from /xyz/openbmc_project/Telemetry/Reports path.

Tested:
- Verified that EventListener received MetricReport response from
Event Service in insecure http push style eventing mode

Change-Id: I2fc1841a6c9259a8bff30b34bddc0d4aabd41912
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

show more ...


# 7adb85ac 26-Oct-2021 Sunitha Harish <sunharis@in.ibm.com>

EventService: Pass httpHeaders to subscriber

Custom http headers provided by the subscriber was not passed on
to the http client request header

This commit passes the http headers to the Subscriber

EventService: Pass httpHeaders to subscriber

Custom http headers provided by the subscriber was not passed on
to the http client request header

This commit passes the http headers to the Subscriber constructor

Tested by:
Subscribe to events with custom headers
Verify the event request packet sending the custom header to the
subscriber
Verified persistency of the subscription

Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: I9a4f59b6e9477fae96b380565885f4ac51e2a628

show more ...


# 4da04455 08-Sep-2021 Ed Tanous <edtanous@google.com>

Only generate headers once in EventService

This patchset builds on
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/45761 and moves
the header generation into the constructor, rather than attem

Only generate headers once in EventService

This patchset builds on
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/45761 and moves
the header generation into the constructor, rather than attempting to
repurpose addHeaders().

Tested:
Per Appu:
"Did basic check and its initialized to default as before."

Per Sunitha:
"Tested the basic event notification scenario with this commit. Works
fine"

https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46703/2

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia9e8b89574c7e0137f0d93f08378e45c2fcf5376

show more ...


# 601c71ae 08-Sep-2021 Ed Tanous <edtanous@google.com>

Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation f

Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c

show more ...


# abb93cdd 02-Sep-2021 Ed Tanous <edtanous@google.com>

Make code pass clang-tidy-13

clang-tidy-13 appears to have improved its "use brace initialization"
checker to handle more cases, and now correctly fails a couple cases
that we posses. This commit s

Make code pass clang-tidy-13

clang-tidy-13 appears to have improved its "use brace initialization"
checker to handle more cases, and now correctly fails a couple cases
that we posses. This commit simply makes the very mechanical changes to
make this function.

Tested:
Ran previous commits checks to run ninja clang-tidy, and observed that
clang-tidy now passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I665a7f3e71d25af93703e6b31af0f1eb12a44527

show more ...


# 28afb49c 24-Feb-2021 JunLin Chen <Jun-Lin.Chen@quantatw.com>

EventService: Move subscription persistent data

This commit resolves https://github.com/openbmc/bmcweb/issues/168
Current store mechanism makes it very difficult to keep in sync with
the existing fi

EventService: Move subscription persistent data

This commit resolves https://github.com/openbmc/bmcweb/issues/168
Current store mechanism makes it very difficult to keep in sync with
the existing files, and has caused several bugs because the path it
uses different than the existing bmcweb_persistent_data.json, and it's
missing several error checks.

If there has old config in /var/lib/bmcweb/eventservice_config.json.
Restart bmcweb will move old config to bmcweb_presistent_data.json and
delete the old config.


Tested:
- Create new Subscription via POST
https://${bmc}/redfish/v1/EventService/Subscriptions/

The subscription is successfully created and GET succussfully.
Restart bmcweb or reboot.
The subscription will restore.

- Delete the Subscription via DELETE
https://${bmc}/redfish/v1/EventService/Subscriptions/${subscription_id}

The subscription is successfully delete.
bmcweb_persistent_data.json will delete subscription content.

- Modify EventService config via PATCH
https://{{bmc}}/redfish/v1/EventService

GET https://{{bmc}}/redfish/v1/EventService and the changes applied.
bmcweb_persistent_data.json will apply modification after PATCH.
Restart bmcweb or reboot
The config maintains the changed.

Signed-off-by: JunLin Chen <Jun-Lin.Chen@quantatw.com>
Change-Id: Ic29385ea8231ba976bbf415af2803df2d30cb10a

show more ...


# 7c8c4058 04-Jun-2021 Tejas Patil <tejaspp@ami.com>

Add DateTime & Offset in Managers & LogServices

This commit adds the support for "DateTimeLocalOffset" property under
"/redfish/v1/Managers/bmc/" Redfish URI.
And it also adds the support for "DateT

Add DateTime & Offset in Managers & LogServices

This commit adds the support for "DateTimeLocalOffset" property under
"/redfish/v1/Managers/bmc/" Redfish URI.
And it also adds the support for "DateTime" & "DateTimeLocalOffset"
properties under "/redfish/v1/Systems/system/LogServices/<id>/" &
"/redfish/v1/Managers/bmc/LogServices/<id>/" Redfish URI's.

These properties shows the current Date, Time & the UTC offset that the
current DateTime property value contains.

Tested:

- Redfish Validator Test passed.

curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Managers/bmc/
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_11_0.Manager",
"Actions": {
"#Manager.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Managers/bmc/ResetActionInfo",
"target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
},
"#Manager.ResetToDefaults": {
"ResetType@Redfish.AllowableValues": [
"ResetAll"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults"
}
},
"DateTime": "2021-06-04T12:18:28+00:00",
"DateTimeLocalOffset": "+00:00",
"Description": "Baseboard Management Controller",
"EthernetInterfaces": {
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces"
},
"FirmwareVersion": "2.11.0-dev-114-gc1989599d",
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"MaxConcurrentSessions": 4,
"ServiceEnabled": true
},
"Id": "bmc",
"LastResetTime": "2021-06-04T12:07:02+00:00",
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb"
},
"ManagerForServers": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagerForServers@odata.count": 1,
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb"
}
],
"SoftwareImages@odata.count": 1
},
"LogServices": {
"@odata.id": "/redfish/v1/Managers/bmc/LogServices"
},
"ManagerType": "BMC",
"Model": "OpenBmc",
"Name": "OpenBmc Manager",
"NetworkProtocol": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol"
},
"Oem": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem",
"@odata.type": "#OemManager.Oem",
"OpenBmc": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc",
"@odata.type": "#OemManager.OpenBmc",
"Certificates": {
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates"
}
}
},
"PowerState": "On",
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"MaxConcurrentSessions": 15,
"ServiceEnabled": true
},
"ServiceEntryPointUUID": "1832ebbb-0b54-44e9-90d7-b49108f6863c",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"UUID": "7fe3d13d-4ae7-4a4f-add1-2d60308124b4"
}

curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog",
"@odata.type": "#LogService.v1_1_0.LogService",
"Actions": {
"#LogService.ClearLog": {
"target": "/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog"
}
},
"DateTime": "2021-06-04T12:11:10+00:00",
"DateTimeLocalOffset": "+00:00",
"Description": "System Event Log Service",
"Entries": {
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries"
},
"Id": "EventLog",
"Name": "Event Log Service",
"OverWritePolicy": "WrapsWhenFull"
}

Signed-off-by: Tejas Patil <tejaspp@ami.com>
Change-Id: I416d13ae11e236cf4552f817a9bd69b48f9b5afb

show more ...


# b282a438 03-Jun-2021 Ed Tanous <edtanous@google.com>

Remove the Node class

Fixes #181

Lots of specific details around why the node class have been removed are
in the previous patchsets. This commit actually does the deed and makes
it go away entirel

Remove the Node class

Fixes #181

Lots of specific details around why the node class have been removed are
in the previous patchsets. This commit actually does the deed and makes
it go away entirely.

Now that this is finally done, we can compare binary size. Surprisingly
enough, this series saves a full 72KB of compressed binary size, which
amounts to about 6.4% of the total code size.

Before: 1197632 bytes
After: 1124688 bytes

This IMO makes it worth it, considering we've significantly reduced the
amount of code at the same time.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3c8688715f933b381cad0be75a079ccfd72c3130

show more ...


1234567