Hello,
I want to create a RESTful Redfish compliant service for a device where I work. (Python and Flask)
I write a little about my understanding about the whole service and then towards the end, are a few questions.
DISCLAIMER: I am new to creating a backend service, this is my first time doing it.
Not aware if some things are obvious for everyone, so please forgive and/or
point me to the right direction.
I have briefly used Redfish services from a client perspective for Rack-mounted Servers so I understand some of the
resources mentioned under the specification.
However, I do not understand the use of schemas, for both the client as well as the vendor that's providing the service.
Going through the schemas I do understand that they define what the client should ask for; and for those requests,
what a service might respond with. As a client, I used the service to get information from very few resources,
I didn't necessarily had to deal with these schemas.
But now, as I have to implement one, I think schemas play a big part in designing a service.
How the really common ResourceCollections (Managers, Systems, Chassis etc.) and Services (SessionService, AccountService, etc.)
are mandatory, and there are other ResourceCollections and Resources that a vendor might use as per their discretion.
Q1: There are schemas for various resources under the Redfish Specification, does a vendor have to include them all?
For example, my system is not a Blade Server, do I still have to use that Resource as a part of my Redfish
implementation? Or I can pick and choose, which resources I need and then for those resources, I provide information
for each property?
Q2: Do I have to use the schemas JUST AS A REFERENCE for creating this service?
To better understand the Service, I used
Redfish-Mockup-Creator on the Rack-mounter Server I talked about
earlier. This created a recursive directory under redfish/ with index.json for each REST endpoint that the Mockup-Creator hit.
I then used
Redfish-Profile-Simulator to host a Python-Flask based server pointing to the directory
I obtained earlier. I was able to get the Resource information from each REST endpoint. This was the index.json content
Q3: How do I create a Redfish Service? Do I maintain a similar recursive folder structure for each Resource I implement?
I read the entire document -
Redfish API Specification Nowhere is it mentioned how a schema is tied to a resource apart from using it as a guideline when creating a Service.
Q4: If It is done that way, and I decide to add some OEM properties or Resources, I would have to maintain my source-code
and the schema separately. I guess my concern was If there's a way to dynamically create a schema from a resource or
the other way around.
Thank you for reading through. Any help is appreciated.
Best,
Chinmay