Redfish结构实现

Redfish structure implementation

如何在redfish中添加一个新结构或API,例如:

redfish/v1/System/1 redfish/v1/System/2 redfish/v1/System/3

需要修改bmcweb中的代码吗?

我找不到与之相关的优秀文档,或者任何指针都非常有价值。谢谢!!!

是的,您将修改 bmcweb 代码以增加 return 个成员。

https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/systems.hpp#L1373 像这样:

res.jsonValue["Members"] = {
            {{"@odata.id", "/redfish/v1/Systems/system"},{"@odata.id", "/redfish/v1/Systems/system2"}}};
res.jsonValue["Members@odata.count"] = 2;