mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-28 09:36:41 +00:00
ee35fba8bf
A bmc may keep its sensor data records on the sensor device instead of in a repository, and this one does, so it had no sensors, no health and only a partial inventory over ipmi. The records themselves are identical, version 0x51 and the same types, so everything that decodes them is reused as is. Only the fetching differs: a command of its own, a reservation of its own, and records held per lun rather than in one place. The luns to ask, and a change indicator to cache on, come from Get Device SDR Info. The fetch is written out rather than shared with the repository one. The loops are alike, but nothing available here has a repository to test against, and the price of factoring them together is that a mistake would land on every bmc that works today rather than only on those that do not work at all. Records are cached in memory and on disk exactly as repository records are, keyed on the change indicator, and a device that offers no such indicator is read afresh each time rather than cached wrongly. Names are stripped of the nulls that pad a fixed width field. This bmc pads every name out to sixteen bytes, and a name carrying them cannot be matched by a caller asking for a sensor by name. On the bmc this was written for: 163 sensors and 9 frus, against the 163 the device reports it has. The 54 temperatures and 36 fans it now reads match what the same machine reports over redfish, to within the precision each side gives.