| commit | 10693fa500d4406c362ef0703f25d5caea226728 | [log] [tgz] |
|---|---|---|
| author | Asmitha Karunanithi <asmitk01@in.ibm.com> | Mon Jul 27 02:27:49 2020 -0500 |
| committer | Asmitha Karunanithi <asmitk01@in.ibm.com> | Wed Aug 05 04:28:46 2020 +0000 |
| tree | bcc95b6882e906790a1c1f8bb61368ac4e4a46f7 | |
| parent | 5a7e877e5fd7da96022d3959fbfec84bfa3d0f7f [diff] |
EventService : Send event for ConfigFile updation
The commit implements the sending of push style events to the IBM's management client
when a configFile is updated.
Tested-By:
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. Update an existing 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 the following example:
bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceChanged",
"MemberId":0,
"Message" :"One or more resource properties have changed.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceChanged",
"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: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I785c2a5a6e4e721cf722e94693db3a832f69fa50
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D flags that correspond to options in bmcweb/CMakeLists.txt and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ... followed by make. The option names become C++ preprocessor symbols that control which code is compiled into the program.
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1 algorithm. The certificate
C=US, O=OpenBMC, CN=testhost,SHA-256 algorithm.