Implement Ethernet Interface Properties
Ed Tanous
ed at tanous.net
Tue Jan 25 07:37:46 AEDT 2022
On Thu, Jan 20, 2022 at 12:44 AM Spencer Ku (古世瑜)
<Spencer.Ku at quantatw.com> wrote:
>
> Hi All,
>
> We finally decide to implement six properties to Ethernet interface:
> RxPackets, TxPackets, RxBytes, TxBytes, RxDropped, and TxDropped.
>
> Those information come from Ethernet statistics and we can read the file
> to get the property value directly. (under /sys/class/net/<Ethernet name>/statistics)
>
> For the suitable property in EthernetInterface model, we got the feedback
> form Redfish forum and they said OEM properties would be the only other
> option at this time. For more discussion detail:
>From their reply
"We may need to open discussions further for how to model these sorts
of metrics purely under EthernetInterface"
I think you've misinterpreted the response. They asked for further
discussion on how to model it, and that OEM would be the alternative
if you weren't able to discuss. Given our rules around OEM schemas,
please continue the discussion with the Redfish forum around this
topic to determine the right way to model this in the standard without
OEM. There is nothing unique about OpenBMC with regards to these
telemetries, so it should be generic. This might be a good candidate
for the newly formed "DiagnosticData" resource model, which is
initially exposing basically this same telemetry, but for i2c lanes
instead of network lanes.
> https://redfishforum.com/thread/579/additional-information-ethernet-interface
>
> The following output is the result of my currently OEM implement:
> https://${bmc}/redfish/v1/Managers/bmc/EhernetInterfaces/eth0
> {
> "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
> ...
> "Oem": {
> "Statistics": [
> {
> "RxBytes": 48244026,
> "RxDropped": 222856,
> "RxPackets": 484315,
> "TxBytes": 825845,
> "TxDropped": 0,
> "TxPackets": 5472
> }
> ]
> },
> "SpeedMbps": 100,
> ...
> }
>
> But it cannot pass the Redfish validator, and here is the error messages:
> ERROR - This complex object RxBytes should be a dictionary or None, but it's of type ...
> ERROR - RxBytes: Could not finish check on this property ('int' object is not iterable)
>
> Is there anything I didn't notice? Or has there any spec or example that I can follow to implement?
>
> I had already push the implementation to gerrit and mark as WIP. Here is the link:
> https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50522
You haven't modeled your schema properly in the above. This is one of
the reasons we try to avoid OEM schemas, as they're difficult to get
right without help from the standards body. Please continue to engage
with them to get this in a standard interface.
>
> We are willing to see any suggestions and alternatives as well. Thanks!
>
> Sincerely,
> Spencer Ku
More information about the openbmc
mailing list