xref: /openbmc/bmcweb/DBUS_USAGE.md (revision 1b8b02a4)
1# dbus usage
2
3The following are guidelines for bmcweb's use of DBus to construct Redfish
4schemas:
5
6- Do not require (ie set 500 internal error on) an implementation present a
7  property that wasn't in the first commit of the interface unless it can be
8  verified that _all_ OpenBMC implementers of the interface support that
9  property.
10- If an implementation presents a property that doesn't match the type specified
11  by the interface at any version, it shall be repored as a 500 error.
12- If the DBus interface definition has an "unknown" or "unspecified" value,
13  detecting these will omit the property from the Redfish tree, in line with the
14  Redfish specification.
15- All DBus interfaces on all object paths are optional. An object missing an
16  interface is never an error, and shall simply omit the relevant properties
17  and/or actions from that Redfish Resource.
18- bmcweb will code to the DBus interface itself. This means that daemons are
19  expected to handle functionally bad, but DBus-correct input in their own
20  process, and return appropriate return codes. This is done to reduce the
21  duplication in input processing between the various user-facing daemons.
22- There are interfaces for which there is an expectation that there will only
23  ever be one producer in the project (ex bmc networking, user management). In
24  these cases, it is desirable to call the daemon by well known name directly.
25  Bmcweb APIs should call the mapper in cases where it's reasonably expected
26  that multiple implementations exist (ex, CPU management, Sensors).
27