Redfish structure implementation

591 Views Asked by At

How to add a a new structure or a API in redfish, for example:

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

Do I need to do modify the code in bmcweb?

I could not find a fine document related to it, or any pointer is highly valuable. Thanks !!!

1

There are 1 best solutions below

7
On BEST ANSWER

Yes, you would modify bmcweb code to return additional members.

https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/systems.hpp#L1373 Something like this:

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