History log of /openbmc/bmcweb/features/redfish/include/event_service_manager.hpp (Results 126 – 150 of 163)
Revision Date Author Comments
# 4a0bf539 21-Apr-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Change the word TS to Time Stamp & add time unit

- The Message argument in the BIOSPOSTCode Message Entry
uses short form wording for TS (Time Stamp) & without any time unit.

- As the Message

Change the word TS to Time Stamp & add time unit

- The Message argument in the BIOSPOSTCode Message Entry
uses short form wording for TS (Time Stamp) & without any time unit.

- As the Message argument is directly displayed on OpenBMC GUI
as it is, word "TS" would create customer confusion due to it
not being a well known acronym. Also a field like this that
captures a physical quantity(time) should have units.

- Redfish clients should not be parsing the message argument, so
changing this wording should not break them.

- Also, this commit changes ":" to ";" in the Message argument to
makes things look consistent.

- As we changed the content of Message in the Message Entry, we had to
bump up the minor version of the Message registry.

Tested By:

1. Redfish Validator Passed.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I17924c2dfdcf34563f8f8cd325011e13cb70e476

show more ...


# 4642bf8f 13-Apr-2021 George Liu <liuxiwei@inspur.com>

Fix publish a registry to verify messageId

- Base on the b304bd7965 commit, there is a potential bug here.

- Currently, the registry is only published when
`BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES

Fix publish a registry to verify messageId

- Base on the b304bd7965 commit, there is a potential bug here.

- Currently, the registry is only published when
`BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES` is disabled. In fact,
regardless of whether `BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES` is
enabled or disabled, the registry needs to be published.

Tested: built bmcweb repo successfully and validator passes.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I2e9d96c3b3eef0606e35c146b3d77b5aa2bb066c

show more ...


# b304bd79 29-Jan-2021 P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>

Added Validation on MessageId and RegistryPrefix

Message ID's and Registry prefixes used to subscribe to an event
will be checked against allowed values.
Corrected "Task" registry prefix to "TaskEve

Added Validation on MessageId and RegistryPrefix

Message ID's and Registry prefixes used to subscribe to an event
will be checked against allowed values.
Corrected "Task" registry prefix to "TaskEvent".

Tested:
- Validated POST action with different combinations of
Message id's and Registry Prefix.
- Redfish validator passed.

Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Change-Id: I921cafeca8b2a1813f4aa4c41ecd01c831e3465b

show more ...


# 71f52d96 19-Feb-2021 Ed Tanous <edtanous@google.com>

Fix nlohmann::json::dump calls

The nlohmann::json::dump call needs to be called with specific arguments
to avoid throwing in failure cases. http connection already does this
properly, but a bunch o

Fix nlohmann::json::dump calls

The nlohmann::json::dump call needs to be called with specific arguments
to avoid throwing in failure cases. http connection already does this
properly, but a bunch of code has snuck in (mostly in redfish) that
ignores this, and calls it incorrectly. This can potentially lead to a
crash if the wrong thing throws on invalid UTF8 characters.

This audits the whole codebase, and replaces every dump() call with the
correct dump(2, ' ', true, nlohmann::json::error_handler_t::replace)
call. For correct output, the callers should expect no change, and in
practice, this would require injecting non-utf8 characters into the
BMC.

Tested:
Ran several of the endpoints/error conditions in question, including
some of the error cases. Observed correct responses. I don't know of a
security issue that would allow injecting invalid utf8 into the BMC, but
in theory if it were possible, this would prevent a crash.

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

show more ...


# 6a9f85f9 01-Feb-2021 AppaRao Puli <apparao.puli@linux.intel.com>

Fix wrong check in EventService events

Sending async event logs to event listener is
broken due to commit 23a21a1cbed23ace4174664950e595df961e9e69.
Correct the check to make EventService back to fun

Fix wrong check in EventService events

Sending async event logs to event listener is
broken due to commit 23a21a1cbed23ace4174664950e595df961e9e69.
Correct the check to make EventService back to functional
state.

Tested:
- Redfish event logs are properly sent to subscribers.

Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: If232846a2b0ac694205731a801e55dc4bd5e928a

show more ...


# f23b7296 15-Oct-2020 Ed Tanous <ed@tanous.net>

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Us

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Using std::move on const variables. This does nothing.
2. Passing big variables (like std::string) by value.
3. Using double quotes on a find call, which constructs an intermediate
string, rather than using the character overload.

Tested
Loaded on system, logged in successfully and pulled down webui-vue. No
new errors.

Walked the Redfish tree a bit, and observed no new problems.

Ran redfish service validator. Got no new failures (although there are
a lot of log service deprecation warnings that we should look at).

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

show more ...


# b5a76932 29-Sep-2020 Ed Tanous <ed@tanous.net>

Lots of performance improvements

(In the voice of the kid from sixth sense) I see string copies...

Apparently there are a lot of places we make unnecessary copies. This
fixes all of them.

Not sure

Lots of performance improvements

(In the voice of the kid from sixth sense) I see string copies...

Apparently there are a lot of places we make unnecessary copies. This
fixes all of them.

Not sure how to split this up into smaller patches, or if it even needs
split up. It seems pretty easy to review to me, because basically every
diff is identical.

Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369
Signed-off-by: Ed Tanous <ed@tanous.net>
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>

show more ...


# 3174e4df 07-Oct-2020 Ed Tanous <ed@tanous.net>

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This incl

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.

Tested:
CI only. Unit tests pass.

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

show more ...


# fc76b8ac 28-Sep-2020 Ed Tanous <ed@tanous.net>

Move Openssl Generator

This commit moves the openssl random number generator into its own file,
so it can be used in EventService, and moves it to its own file. Seeding a
random number generator wi

Move Openssl Generator

This commit moves the openssl random number generator into its own file,
so it can be used in EventService, and moves it to its own file. Seeding a
random number generator with time is bad practice in general, so much so
that there's a CERT rule about it as well as a clang-tidy check.
https://clang.llvm.org/extra/clang-tidy/checks/cert-msc51-cpp.html

This doesn't matter much in this case, as we're generating a randomized
int for an ID, but it will matter in other cases, and we'd like to have
the check on to verify that.

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

show more ...


# 9f616dd1 28-Sep-2020 Ed Tanous <ed@tanous.net>

Modernize event service manager and sse

Move static initialization of variables into the variables
themselves and use = default for the destructor.

Also, deleted constructors/destructors/move opera

Modernize event service manager and sse

Move static initialization of variables into the variables
themselves and use = default for the destructor.

Also, deleted constructors/destructors/move operators should be public,
not private.

Tested:
Code builds. No substantial changes.

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

show more ...


# 02379d35 15-Sep-2020 Ed Tanous <ed@tanous.net>

Fix IBM management console to match coding standard

Lots of missing inline definitions, a case where a RVO move is not
guaranteed when returning a variant, and removing the header checks,
which mean

Fix IBM management console to match coding standard

Lots of missing inline definitions, a case where a RVO move is not
guaranteed when returning a variant, and removing the header checks,
which means that these types of build errors wont happen in the future.

Tested:
Should be no impact, but could someone from the IBM team grab these
changes and sanity check them?

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

show more ...


# 23e64207 15-Sep-2020 Ed Tanous <ed@tanous.net>

Fix using namespace

We inherited a "using namespace" crow. Lets fix it.

Tested:
Code compiles. No functional changes.

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

Fix using namespace

We inherited a "using namespace" crow. Lets fix it.

Tested:
Code compiles. No functional changes.

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

show more ...


# 93f5d7c7 24-Jul-2020 Wludzik, Jozef <jozef.wludzik@intel.com>

EventService: Fix type mismatch in MetricReport

Fix the type mismatch in MetricReport data which
is sent to Event Subscribers. Change below properties
type to match with MetricReport schema.
- Time

EventService: Fix type mismatch in MetricReport

Fix the type mismatch in MetricReport data which
is sent to Event Subscribers. Change below properties
type to match with MetricReport schema.
- Timestamp: It should be uint32_t type.
- MetricValue: It should be string type.

Tested:
- Create MetricReport subscription and report contains
correct data types for Timestamp and MetricValue.

Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: I0a52b6963e7bedda89a216256f64764cd8799bf1

show more ...


# 23a21a1c 24-Jul-2020 Ed Tanous <ed@tanous.net>

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variabl

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variables

unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.

Other various warnings were fixed in the best way I was able to come up
with.

Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used. Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction. For now, I have simply fixed all the handlers.

Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf

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

show more ...


# 016761af 02-Aug-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Fix: EventService stops sending events

When redfish log file(/var/log/redfish) is recreated
by rsyslog daemon, EventService stops sending events
to subscribers.

The rsyslog service take redfish log

Fix: EventService stops sending events

When redfish log file(/var/log/redfish) is recreated
by rsyslog daemon, EventService stops sending events
to subscribers.

The rsyslog service take redfish log files to back up
as per design. EventService has inotify on redfish log
file modifications. It needs to be removed from inotify
watcher list and added with new File descriptor.
Corrected code to handle remove & add of new descriptor.
Also corrected code to properly handle last event timestamp.

Tested:
- Ran stress test on redfish log file to create multiple
backup files and events sends to clients properly, in
all switching scenarios.

Change-Id: Ic0378edfc2cae86d1f69f6df4c429d07c2744bdf
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 144b6318 03-Aug-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Fix: MetricReportDefinitions filter not working

The metric reports are not sending when user configures
the MetricReportDefinitions filter. This is of odata json
object type. Corrected code to prope

Fix: MetricReportDefinitions filter not working

The metric reports are not sending when user configures
the MetricReportDefinitions filter. This is of odata json
object type. Corrected code to properly handle odata type
object and store it as string array to make filters faster.

Tested:
- Created metric report EventService subscription type
with MetricReportDefinitions and events properly sent to
Event listener.

Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: If96564219da7d38a2ee5e415b89824ba25cd686d

show more ...


# 5738de59 17-Jul-2020 Asmitha Karunanithi <asmitk01@in.ibm.com>

Handling Broadcast message service

This commit implements the broadcast of the messages from one
connected client to other connected clients via BMC. When the
management console creates a subscripti

Handling Broadcast message service

This commit implements the broadcast of the messages from one
connected client to other connected clients via BMC. When the
management console creates a subscription on the BMC, they will
be provided with the broadcast message service.

Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination":"https://<host:port>","Protocol":"Redfish"}'

2. Send the message
POST https://${bmc}/ibm/v1/HMC/BroadcastService -d '{"Message":"<msg>"}'

3. Verify the event is generated and posted to the subscriber:
bodydata: {"Message":"<The message from HMC to be forwarded>",
"Name":"Broadcast Event","OriginOfCondition":
"/ibm/v1/HMC/BroadcastService",
"Timestamp":"2020-07-15T12:03:30+00:00"}

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Ib36b4f25505cf66251adc5aeda282312996c25af

show more ...


# 96330b99 26-Jun-2020 Sunitha Harish <sunithaharish04@gmail.com>

EventService : Send event for the ConfigFile creation

This implements the sendEvent when the IBM management console
creates the ConfigFile at BMC using the PUT operation on the
url /ibm/v1/Host/Conf

EventService : Send event for the ConfigFile creation

This implements the sendEvent when the IBM management console
creates the ConfigFile at BMC using the PUT operation on the
url /ibm/v1/Host/ConfigFiles

Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription by passing "ResourceTypes" as ["IBMConfigFile"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>,"ResourceTypes":["IBMConfigFile"],"Protocol":"Redfish"}'
2. Create a ConfigFile
PUT https://${bmc}/ibm/v1/Host/ConfigFiles/<filename> --data-binary "@<local_path>"
3. Verify the event is generated and posted to the subscriber as below example

bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceAdded",
"MemberId":0,
"Message":"The resource has been created successfully.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceCreated",
"OriginOfCondition":"/ibm/v1/Host/ConfigFiles/<filename>",
"MessageSeverity":"OK"
}
],
"Id":1,
"Name":"Event Log"
}
4. Verified the event is sent to the subscriber when the resourceType list is empty.
5. Verified the client subscribes for other resource - not ConfigFile ; then
the event is not sent to the subscriber.

Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ic9b195266fe2df67a3160197d03d9ac155ef0cd1

show more ...


# e56f254c 22-Jul-2020 Sunitha Harish <sunharis@in.ibm.com>

EventService: Add the parameter ResourceTypes to subscription

This commit supports sending the ResourceTypes list while subscribing
to the events. The "Task" resource is added as a supported type to

EventService: Add the parameter ResourceTypes to subscription

This commit supports sending the ResourceTypes list while subscribing
to the events. The "Task" resource is added as a supported type to receive
the task life cycle events.
For IBM's management console along with the Task resource, the support
is provided to subscribe to the "IBMConfigFile" ResourceType to receive
events while creating/updating the ConfigFiles.

Tested by:
1. GET https://${bmc}/redfish/v1/EventService
2. Create subscription :
POST https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : <>, "Protocol":"Redfish", "ResourceTypes": ["Task"]}'
3. GET https://${bmc}/redfish/v1/EventService/Subscriptions/<id>
3. Redfish validator was run successfully

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

show more ...


# 62de0c68 23-Jul-2020 AppaRao Puli <apparao.puli@linux.intel.com>

EventService: Add nullptr check to avoid crash

Subscribing for events using SSE subscription
type is crashing the bmcweb. Add nullptr check
around the connection object which is created for
'Push St

EventService: Add nullptr check to avoid crash

Subscribing for events using SSE subscription
type is crashing the bmcweb. Add nullptr check
around the connection object which is created for
'Push Style Events', to avoid the crash in case
of SSE.

Tested:
- SSE subscription works fine and crash goes way.
- 'Push style event' works fine.

Change-Id: I8ad5b63ca5a82d7ffe41054eee5f4ab6dcb9d72f
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 4e0453b1 08-Jul-2020 Gunnar Mills <gmills@us.ibm.com>

Codespell redfish-core spelling fixes

These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Top commit (along with this) was built and ran against
val

Codespell redfish-core spelling fixes

These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Top commit (along with this) was built and ran against
validator.
Change-Id: Ic9dce27b1de8567eedf7753164ef564d3aedf8ca
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 07941a88 21-May-2020 Ayushi Smriti <smriti.ayushi@linux.intel.com>

Support the $filter query params for SSE stream

This commit adds the support for $filter query
paramater in the URI for SSE stream.

Method: GET
URI: /redfish/v1/EventService/Subscriptions/SSE?
$fil

Support the $filter query params for SSE stream

This commit adds the support for $filter query
paramater in the URI for SSE stream.

Method: GET
URI: /redfish/v1/EventService/Subscriptions/SSE?
$filter=(MessageIds%20eq%20DCPowerOn) or
(MessageIds%20eq%20DCPowerOn)

Tested:
- From browser sent request using SSE URI along with filter query param
- query params were read and parsed successfully.
- used SubmitTestEvent and could see test events coming to BMC.
- Ran redfish validator successfully.
- Performed GET on Subscription collections and Subscription/<id> URI
and checked for valid data.

Change-Id: Ie18546749495175ede918ab933ff8dd1d65b775f
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 4bbf237f 15-May-2020 AppaRao Puli <apparao.puli@linux.intel.com>

EventService: Support for Server Sent Events(SSE)

Add support for Server Sent Events(SSE)
Filters support is not part of this commit.

Tested:
- GET on URI /redfish/v1/EventService/Subscriptions/SS

EventService: Support for Server Sent Events(SSE)

Add support for Server Sent Events(SSE)
Filters support is not part of this commit.

Tested:
- GET on URI /redfish/v1/EventService/Subscriptions/SSE/
from chrome browser, can see all BMC Events on browser.
- Redfish validator is successful.

Change-Id: Icd10cdad20c4529f64c97b67d46f2e4a7e0c329c
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# fe44eb0b 15-May-2020 Ayushi Smriti <smriti.ayushi@linux.intel.com>

EventService: Add retry configuration support

This commit is to pass configuration parameters: retry attempts,
retry interval secs and retry policy to http client and take
required delivery retry po

EventService: Add retry configuration support

This commit is to pass configuration parameters: retry attempts,
retry interval secs and retry policy to http client and take
required delivery retry policy action.

Also, perform async wait for retryTimeoutInterval before each
retry attempts.

Tested:
- Set and verified config properties by sending PATCH req on
EventService and EventDestination uri.
- Verified the appropriate delivery retry policy action block reached.
- Verified the async_wait logic by triggering retry case depending
failed state of connection.
- could see a wait for timeout interval before next retry.

Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Change-Id: Id1366fca59dc9e6543c553bfe5df95a59f468bc7
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 5e715de6 26-Jun-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Fix: Replace span with vector

The message args in the event service data is
coming empty and also crashing bmcweb when multiple
arguments present. The boost::beast::span has issue
in passing it as r

Fix: Replace span with vector

The message args in the event service data is
coming empty and also crashing bmcweb when multiple
arguments present. The boost::beast::span has issue
in passing it as reference to function for assignment.
Replaced span with std::vector to avoid empty response
to caller function.

Tested:
- All message arguments are working fine and resolved
crash.

Change-Id: I800247cfd0d5dba7698cdb3e60c1290e478bf3ac
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


1234567