|
Post by feplooptest on Aug 11, 2021 18:19:36 GMT
Hi I am new to Redfish and trying to compose my first Redfish Schema. After reading of following document, www.dmtf.org/sites/default/files/standards/documents/DSP2055_1.0.0.pdfthe process seems to be: 1. Compose a set of CSDL files for each URI that your device will produce. 2. Convert CSDL file to JSON file using cddl-to-json.py tools on GitHub. 3. Feed your JSON files to Redfish-interface-Emulator on Github to simulate your device behavior. Is my understanding correct? As for composing my own CSDL file, is it just taking official schema definition and remove any item that I don't plan to implement in my device? I notice in official schema CSDL file like chassis_v1.xml, it elaborates many versions from v1_0_0 to v1_9_6 which in turns generate one json file per version. I wonder if that is necessary for a new project? I assume they include it in official schema for the sake of compatibility? Thanks for your help Jack
|
|
|
Post by mraineri on Aug 13, 2021 12:27:57 GMT
This really is going to depend on what your intent is. If you need to create OEM-defined resources that are not covered by the DMTF, then yes, you should follow that guide for crafting CSDL files. The JSON file produced in step 2 is not the same as the JSON file the interface emulator uses; the CSDL to JSON tool creates JSON Schema files, whereas the interface emulator uses JSON objects that represent payloads.
However, some of your comments make me think you might be trying to take existing schema files and use them in your implementation. If this is the case, you do not need to follow the DSP2055 guide, or do any sort of schema conversions. You can simply reference (or download copies of) the published DMTF schemas and use them as-is.
As a note about our versioning, many users have the expectation that the standard supports errata publications going back to the very first schema publication. That in turn creates many JSON Schema files. As an implementer, you do not need to support all of those versions; if you have a particular version of the Chassis resource you need to support, you just need that one JSON Schema file that represents that version. Having them all won't do any harm though, but it's certainly unnecessary.
|
|
|
Post by feplooptest on Aug 18, 2021 18:45:55 GMT
Thank you for the responses.
|
|