xref: /openbmc/bmcweb/OEM_SCHEMAS.md (revision 1a0866ca04200ba2682c06682969413dfd146f42)
12ec5b14dSEd Tanous# Redfish OEM Schemas
22d5fe9d0SEd Tanous
32d5fe9d0SEd TanousThe Redfish specification allows for OEM resources and properties to be
42ec5b14dSEd Tanousimplemented by OEMs. bmcweb does not expose a stable API for adding OEM
52ec5b14dSEd Tanousproperties in a backward API compatible way for code that has not been merged to
62ec5b14dSEd Tanousmaster.
72d5fe9d0SEd Tanous
82ec5b14dSEd Tanous## OEM Compatibility and authority
9dfa3fdc3SPatrick Williams
102ec5b14dSEd TanousGenerally, a single individual or group of senior individuals in a corporate
112ec5b14dSEd Tanousorganization is responsible for maintaining that company's OEM namespace. They
122ec5b14dSEd Tanousensure that it remains correct, doesn't duplicate functionality found elsewhere,
132ec5b14dSEd Tanousand can be maintained forever. Within OpenBMC, we have no such group of
142ec5b14dSEd Tanousindividuals with that authority, knowledge, willpower, and scope that covers the
152ec5b14dSEd Tanousentire project.
162d5fe9d0SEd Tanous
172ec5b14dSEd TanousBecause of that, OEM properties in an open-source project pose many problems
182ec5b14dSEd Tanouswhen compared to their closed source brethren.
192d5fe9d0SEd Tanous
202ec5b14dSEd TanousOpenBMC's external Redfish API aims to be as compatible between systems as
212ec5b14dSEd Tanouspossible. Adding machine-specific resources, properties, and types defeats a
222ec5b14dSEd Tanouslarge amount of reuse, as clients must implement machine-specific APIs, some of
232ec5b14dSEd Tanouswhich are likely to overlap, which increases the amount of code overall. OpenBMC
242ec5b14dSEd Tanousalso has very little visibility into clients that might interface with Redfish,
252ec5b14dSEd Tanousand therefore needs to take care when adding new, non-standard APIs, given the
262ec5b14dSEd Tanouslack of compatibility rules in such a case.
272ec5b14dSEd Tanous
282ec5b14dSEd TanousIn the experience of the project, OEM resources trend toward a lower level of
292ec5b14dSEd Tanousquality and testing than their spec-driven alternatives, given the lack of
302ec5b14dSEd Tanousavailable systems to test on, and the limited audience of both producers and
312ec5b14dSEd Tanousconsumers. This poses a problem for maintenance, as it is very difficult to make
322ec5b14dSEd Tanousa breaking change to an external API, given that clients are likely to be
332d5fe9d0SEd Tanousimplemented in projects that OpenBMC isn't aware of.
342d5fe9d0SEd Tanous
352ec5b14dSEd TanousIf a given feature eventually becomes standardized, OpenBMC OEM endpoints now
362ec5b14dSEd Tanoushave to break an API boundary to move to the standard implementation. Given the
372ec5b14dSEd Tanouseffort it takes to break an API, it is much simpler to wait for the standard to
382ec5b14dSEd Tanousbe completed before merging the OEM code to master.
392d5fe9d0SEd Tanous
402ec5b14dSEd TanousDMTF has many more Redfish experts than OpenBMC. While the bmcweb maintainers do
412ec5b14dSEd Tanoustheir best to stay current on the evolving Redfish ecosystem, we have
42dfa3fdc3SPatrick Williamssignificantly limited scope, knowledge, and influence over the standard when
432ec5b14dSEd Tanouscompared to the experts within DMTF. Getting a DMTF opinion almost always leads
442ec5b14dSEd Tanousto positive API design changes up front, which increases the usefulness of the
452ec5b14dSEd Tanouscode we write within the industry.
462d5fe9d0SEd Tanous
472ec5b14dSEd TanousIn the current implementation, OEM schemas for all namespaces are shipped on all
482ec5b14dSEd Tanoussystems. It's undesirable to have another company's, possibly a competitor, name
492ec5b14dSEd Tanousshow up in the public facing API as it exports a level of support that doesn't
502ec5b14dSEd Tanousexist on those systems.
512ec5b14dSEd Tanous
522ec5b14dSEd Tanous## How do I write an OEM schema?
532d5fe9d0SEd Tanous
542d5fe9d0SEd TanousIf you've read the above, and still think an OEM property is warranted, please
552d5fe9d0SEd Tanoustake the following steps.
562d5fe9d0SEd Tanous
572ec5b14dSEd Tanous1. Read all the relevant documentation on OEM schema technical implementation
582ec5b14dSEd Tanous   present in the Redfish specification. This includes examples of schemas that
592ec5b14dSEd Tanous   can be used as a template.
602ec5b14dSEd Tanous2. Present the new feature and use case to DMTF either through the
61dfa3fdc3SPatrick Williams   [Redfish forum](https://www.redfishforum.com), or at a DMTF meeting. If
62dfa3fdc3SPatrick Williams   possible, message the new feature through the normal openbmc communications
63dfa3fdc3SPatrick Williams   channels to ensure OpenBMC is properly represented in the meeting/forum.
642ec5b14dSEd Tanous3. If DMTF is interested in the proposal, proceed using their documented process
652d5fe9d0SEd Tanous   for change requests, and get your schema changes standardized; While OpenBMC
662d5fe9d0SEd Tanous   does not merge new schemas that have not been ratified by DMTF, feel free to
672ec5b14dSEd Tanous   push them to gerrit. Maintainers are tasked with doing their best to
682ec5b14dSEd Tanous   accommodate active development; OEM schemas are no different. If the DMTF
692ec5b14dSEd Tanous   feedback is documented as something to the effect of "this use case is unique
702ec5b14dSEd Tanous   to OpenBMC", proceed to write an OpenBMC design document about the new
712ec5b14dSEd Tanous   feature you intend to implement as OEM, under the OpenBMC (generic to all
722ec5b14dSEd Tanous   platforms) OEM namespace.
732ec5b14dSEd Tanous4. If OpenBMC feedback is that this feature is specific to a single OEM or ODM,
742ec5b14dSEd Tanous   and is unlikely to be used across platforms, then engage with bmcweb
752ec5b14dSEd Tanous   maintainers, and they will walk you through how to develop the feature under
762ec5b14dSEd Tanous   an OEM/ODM specific namespace.
772d5fe9d0SEd Tanous
782d5fe9d0SEd TanousRegardless of the OEM namespace being used, implementations should plan to
792d5fe9d0SEd Tanousimplement all appropriate CSDL and OpenAPI schemas for their given OEM
802ec5b14dSEd Tanousresources, should pass the redfish service validator, should pass the csdl
812ec5b14dSEd Tanousvalidator and should follow redfish API design practices. We require OEM to have
822ec5b14dSEd Tanousthe same level of quality as non-OEM.
832d5fe9d0SEd Tanous
842d5fe9d0SEd Tanousbmcweb maintainers retain the final approval on OEM schemas.
852ec5b14dSEd Tanous
862ec5b14dSEd TanousThe OpenBMC project maintains OEM schemas within the OpenBMC namespace, which,
872ec5b14dSEd Tanousfrom section 9.8.1 of the Redfish specification states:
882ec5b14dSEd Tanous
892ec5b14dSEd Tanous''' There are organizations for which DMTF has a working relationship, and have
902ec5b14dSEd Tanousregistered their OEM namespace directly in the specification to allow extensions
912ec5b14dSEd Tanousof the ICANN domain name requirements above. The following organization OEM
922ec5b14dSEd Tanousnamespaces shall be considered reserved: OpenBMC '''
932ec5b14dSEd Tanous
942ec5b14dSEd TanousTo avoid versioning complications with clients, schemas within the OpenBMC
952ec5b14dSEd Tanousnamespace should not be modified without appropriate versioning information.
962ec5b14dSEd TanousGiven the nature of semantic versioning, Redfish does not directly have support
972ec5b14dSEd Tanousfor schema branching within a namespace, therefore, if a system intends to ship
982ec5b14dSEd Tanousa version of the schemas that have been modified from the version available at
99*1a0866caSEd Tanous<https://github.com/openbmc/bmcweb/tree/master/static/redfish/v1/schema>, the
1002ec5b14dSEd TanousRedfish specification _requires_ that the namespace be changed to avoid
1012ec5b14dSEd Tanouscollisions.
102