user73636
user73636

Reputation: 79

Redfish structure implementation

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 !!!

Upvotes: 1

Views: 732

Answers (1)

Andrew Geissler
Andrew Geissler

Reputation: 136

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;

Upvotes: 1

Related Questions