summaryrefslogtreecommitdiff
path: root/include/openbmc_dbus_rest.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-08-30 00:08:50 +0300
committerEd Tanous <ed@tanous.net>2023-05-26 00:07:05 +0300
commit283860f5fb0e685d6c5e8c149451f0d1be0b9103 (patch)
tree863721bac023263621344c48b15c2921eed455aa /include/openbmc_dbus_rest.hpp
parent25e055a38495ce7d08e551a365e47e6b6c9bf7b1 (diff)
downloadbmcweb-283860f5fb0e685d6c5e8c149451f0d1be0b9103.tar.xz
Don't push non finite numbers to Redfish
Redfish Sensor schema is based around Edm.Number, which doesn't have an allowance for things like infinity, -infinity, or NAN. Because these are theoretically possible in the dbus interfaces, we need to omit the properties if they are set to anything that Redfish doesn't support. Because the DBus sensor Value interface relies on NAN to represent unavailable, this is explicitly set to null in the json response. This behavior was discussed with DMTF in a forum meeting, and is the protocol-correct behavior for handling unavailable numbers. All other number-assigning dbus properties are omitted from the response, to show that they are "not supported" if they produce out-of-range values. Tested: Unclear if there are any implementations that do this to test against. Code inspection only. Redfish-service-validator passes (on previous patchset). Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ia3dde24cd604b0bb5dc596e7b8a6461a4b339b71
Diffstat (limited to 'include/openbmc_dbus_rest.hpp')
0 files changed, 0 insertions, 0 deletions