| commit | 116c184bd30d0d8e0227dac946fa4ea00e2035bf | [log] [tgz] |
|---|---|---|
| author | Krzysztof Grobelny <krzysztof.grobelny@intel.com> | Mon Dec 06 11:56:37 2021 +0100 |
| committer | Ed Tanous <ed@tanous.net> | Tue Dec 07 17:24:07 2021 +0000 |
| tree | 754ee9c93f1bccf7948b78a51a006af38ec0cbab | |
| parent | 597d2b142362bafa90f24fc8c30750afab91f78f [diff] |
fixed errors in EventService
- Initialized boost::circular_buffer_space_optimized<std::string> which
was not initialized. It prevented any event from being send.
- Removed line 'parser->skip(true)' which cause all received responses
to be interpreted as errors. It was triggering retry which resulted in
sensing same event multiple times.
Tested:
POST redfish/v1/EventService/Subscriptions, body:
{
"Destination": "https://127.0.0.1:4042/",
"Protocol": "Redfish",
"EventFormatType": "MetricReport"
}
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The resource has been created successfully",
"MessageArgs": [],
"MessageId": "Base.1.8.1.Created",
"MessageSeverity": "OK",
"Resolution": "None"
}
]
}
POST redfish/v1/TelemetryService/MetricReportDefinitions, body:
{
"Id": "TestReport",
"Metrics": [
{
"MetricId": "TestMetric",
"MetricProperties": [
"/redfish/v1/Chassis/chassis/Thermal#/Temperatures/7/ReadingCelsius"
]
}
],
"MetricReportDefinitionType": "OnRequest",
"ReportActions": [
"RedfishEvent",
"LogToMetricReportsCollection"
]
}
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The resource has been created successfully",
"MessageArgs": [],
"MessageId": "Base.1.8.1.Created",
"MessageSeverity": "OK",
"Resolution": "None"
}
]
}
GET redfish/v1/TelemetryService/MetricReports/TestReport
{
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/TestReport",
"@odata.type": "#MetricReport.v1_3_0.MetricReport",
"Id": "TestReport",
"MetricReportDefinition": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReportDefinitions/TestReport"
},
"MetricValues": [
{
"MetricId": "TestMetric",
"MetricProperty": "/redfish/v1/Chassis/chassis/Thermal#/Temperatures/7/ReadingCelsius",
"MetricValue": "-8388608000.000000",
"Timestamp": "1970-04-12T02:28:53+00:00"
}
],
"Name": "TestReport",
"Timestamp": "1970-04-12T06:08:17+00:00"
}
EVENT RECEIVED
{
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/TestReport",
"@odata.type": "#MetricReport.v1_3_0.MetricReport",
"Id": "TestReport",
"MetricReportDefinition": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReportDefinitions/TestReport"
},
"MetricValues": [
{
"MetricId": "TestMetric",
"MetricProperty": "/redfish/v1/Chassis/chassis/Thermal#/Temperatures/7/ReadingCelsius",
"MetricValue": "-8388608000.000000",
"Timestamp": "1970-04-12T02:28:53+00:00"
}
],
"Name": "TestReport",
"Timestamp": "1970-04-12T06:08:17+00:00"
}
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I4912853c3b59593e7032424d0b48aca7a36889b3
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/meson_options.txt and then compiling. For example, meson <builddir> -Dkvm=disabled ... followed by ninja in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
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.