xref: /openbmc/bmcweb/OEM_SCHEMAS.md (revision 4e338b23)
1# Redfish OEM Schemas
2
3The Redfish specification allows for OEM resources and properties to be
4implemented by OEMs. bmcweb does not expose a stable API for adding OEM
5properties in a backward API compatible way for code that has not been merged to
6master.
7
8## OEM Compatibility and authority
9
10Generally, a single individual or group of senior individuals in a corporate
11organization is responsible for maintaining that company's OEM namespace. They
12ensure that it remains correct, doesn't duplicate functionality found elsewhere,
13and can be maintained forever. Within OpenBMC, we have no such group of
14individuals with that authority, knowledge, willpower, and scope that covers the
15entire project.
16
17Because of that, OEM properties in an open-source project pose many problems
18when compared to their closed source brethren.
19
20OpenBMC's external Redfish API aims to be as compatible between systems as
21possible. Adding machine-specific resources, properties, and types defeats a
22large amount of reuse, as clients must implement machine-specific APIs, some of
23which are likely to overlap, which increases the amount of code overall. OpenBMC
24also has very little visibility into clients that might interface with Redfish,
25and therefore needs to take care when adding new, non-standard APIs, given the
26lack of compatibility rules in such a case.
27
28In the experience of the project, OEM resources trend toward a lower level of
29quality and testing than their spec-driven alternatives, given the lack of
30available systems to test on, and the limited audience of both producers and
31consumers. This poses a problem for maintenance, as it is very difficult to make
32a breaking change to an external API, given that clients are likely to be
33implemented in projects that OpenBMC isn't aware of.
34
35If a given feature eventually becomes standardized, OpenBMC OEM endpoints now
36have to break an API boundary to move to the standard implementation. Given the
37effort it takes to break an API, it is much simpler to wait for the standard to
38be completed before merging the OEM code to master.
39
40DMTF has many more Redfish experts than OpenBMC. While the bmcweb maintainers do
41their best to stay current on the evolving Redfish ecosystem, we have
42significantly limited scope, knowledge, and influence over the standard when
43compared to the experts within DMTF. Getting a DMTF opinion almost always leads
44to positive API design changes up front, which increases the usefulness of the
45code we write within the industry.
46
47In the current implementation, OEM schemas for all namespaces are shipped on all
48systems. It's undesirable to have another company's, possibly a competitor, name
49show up in the public facing API as it exports a level of support that doesn't
50exist on those systems.
51
52## How do I write an OEM schema?
53
54If you've read the above, and still think an OEM property is warranted, please
55take the following steps.
56
571. Read all the relevant documentation on OEM schema technical implementation
58   present in the Redfish specification. This includes examples of schemas that
59   can be used as a template.
602. Present the new feature and use case to DMTF either through the
61   [Redfish forum](https://www.redfishforum.com), or at a DMTF meeting. If
62   possible, message the new feature through the normal openbmc communications
63   channels to ensure OpenBMC is properly represented in the meeting/forum.
643. If DMTF is interested in the proposal, proceed using their documented process
65   for change requests, and get your schema changes standardized; While OpenBMC
66   does not merge new schemas that have not been ratified by DMTF, feel free to
67   push them to gerrit. Maintainers are tasked with doing their best to
68   accommodate active development; OEM schemas are no different. If the DMTF
69   feedback is documented as something to the effect of "this use case is unique
70   to OpenBMC", proceed to write an OpenBMC design document about the new
71   feature you intend to implement as OEM, under the OpenBMC (generic to all
72   platforms) OEM namespace.
734. If OpenBMC feedback is that this feature is specific to a single OEM or ODM,
74   and is unlikely to be used across platforms, then engage with bmcweb
75   maintainers, and they will walk you through how to develop the feature under
76   an OEM/ODM specific namespace.
77
78Regardless of the OEM namespace being used, implementations should plan to
79implement all appropriate CSDL and OpenAPI schemas for their given OEM
80resources, should pass the redfish service validator, should pass the csdl
81validator and should follow redfish API design practices. We require OEM to have
82the same level of quality as non-OEM.
83
84bmcweb maintainers retain the final approval on OEM schemas.
85
86The OpenBMC project maintains OEM schemas within the OpenBMC namespace, which,
87from section 9.8.1 of the Redfish specification states:
88
89''' There are organizations for which DMTF has a working relationship, and have
90registered their OEM namespace directly in the specification to allow extensions
91of the ICANN domain name requirements above. The following organization OEM
92namespaces shall be considered reserved: OpenBMC '''
93
94To avoid versioning complications with clients, schemas within the OpenBMC
95namespace should not be modified without appropriate versioning information.
96Given the nature of semantic versioning, Redfish does not directly have support
97for schema branching within a namespace, therefore, if a system intends to ship
98a version of the schemas that have been modified from the version available at
99<https://github.com/openbmc/bmcweb/tree/master/static/redfish/v1/schema>, the
100Redfish specification _requires_ that the namespace be changed to avoid
101collisions.
102