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