| commit | a0ec28b671391473a6dbe1258fb5216311861396 | [log] [tgz] |
|---|---|---|
| author | Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> | Fri Apr 10 14:47:28 2020 +0200 |
| committer | Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> | Fri Jun 26 14:49:26 2020 +0000 |
| tree | bb500f2387b784f728a0b06006c1a115a677202b | |
| parent | 4bf2b03324acbacce3eb948e6b00a7c8f1f2d756 [diff] |
Enable retrieving mapping of Redfish URI to D-Bus sensor path
Background:
Change is necessary to support TelemetryService implementation.
TelemetryService specifies its own resource type for data - MetricDefinition.
In principle - MetricDefinition might point to Redfish Sensor in the system.
Each MetricDefinition requires MetricProperty - URI to specific property in
resource wih the value. This change allows retrieving such data alongside
corresponding D-Bus sensor to be used as source of Metrics value.
This change:
Function was implemented to allow retrieving mapping of Redfish URI paths
to D-Bus sensors in the system. Some minor refactoring in regards to
SensorsAsyncResponse were also introduced to enhance code locality. Idea for the
changes was to be the least intrusive if possible, as retrieving sensors in the
system requires lots of processing.
Existing logic was used and left intact. Utilizing existing logic required to
'fake' a HTTP request to traverse the sensors in the system and build the
response. It's crucial to use exact logic of building Redfish nodes
representation, as goal of the function is to retrieve exact Redfish URI for
sensor value.
Extra parameter was introduced to SensorsAsyncResp - callback to be called when
sensor data will be fully determined. After processing is complete caller is
notified with the outcome (success or failure) and map<URI:D-Bus sensor>.
Testing:
- all positive cases (3 chassis, 3 subnodes) in the system,
one of obtained mappings looked like the following:
{ /redfish/v1/Chassis/WP_Baseboard/Power#/Voltages/3/ReadingVolts :
/xyz/openbmc_project/sensors/voltage/P1V8_PCH }
- negative cases (wrong chassis, wrong subnode) - callback with error status
was called
- RedfishServiceValidator passed
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: I4389eb3df275126974168d1bb9af33dbf5cdb5b7
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.