Name Date Size #Lines LOC

..Today-

README.mdH A D07-Dec-20223.1 KiB7454

global.jsonH A D09-Nov-20247.8 KiB162161

ibm.jsonH A D12-Sep-20245.4 KiB110109

intel.jsonH A D12-Sep-2024779 3029

legacy.jsonH A D12-Oct-202457.7 KiB1,9461,945

openbmc-dbus.jsonH A D13-Nov-20246.9 KiB172171

pid.jsonH A D12-Sep-20243.5 KiB124123

pid_zone.jsonH A D12-Sep-2024996 3635

satellite_controller.jsonH A D12-Sep-20241.2 KiB3433

stepwise.jsonH A D12-Sep-20242.2 KiB8281

virtual_sensor.jsonH A D20-Sep-20242.4 KiB5958

README.md

1# Entity manager configuration file schema
2
3Entity manager configuration files are JSON documents and can be validated with
4a [JSON schema][1]. This document provides an overview of the general structure
5of an entity manager configuration file.
6
7An entity manager configuration file consists of one or more entity manager
8configurations. This provides flexibility for system designers - the
9configuration data for an entire platform or set of platforms can be expressed
10in a single file, or can be organized into several smaller files. Thus, the top
11most schema describes a single object or an array of objects.
12
13To remain consistent with the OpenBMC CPP source code file name guidelines,
14entity manager configuration file and schema file names must be
15`lower_snake_case`.
16
17## A single entity manager configuration
18
19At its core entity manager simply exports objects onto DBus when a specific
20event occurs. As such, an entity manager configuration provides a syntax for
21describing the dbus interfaces to export, the object paths on which to add the
22interfaces and the event that should trigger the export. This is accomplished
23with four properties.
24
25## Type
26
27The type property identifies the type of the configuration. When exported,
28configuration data will be instantiated as grandchildren of
29`/xyz/openbmc_project/inventory/system/<Type>`. For a comprehensive list of
30supported types, consult the schema (global.json).
31
32## Name
33
34The name property identifies the name of the configuration. When exported,
35configuration data will be instantiated as children of
36`/xyz/openbmc_project/inventory/system/<Type>/<Name>`. Additionally, any DBus
37interfaces listed in openbmc-dbus.json will be added on
38`/xyz/openbmc_project/inventory/system/<Type>/<Name>`.
39
40## Probe
41
42The probe property describes the event which will cause entity manager to export
43the configuration to DBus, making it available to other applications.
44
45## Exposes
46
47The exposes property describes the configuration data at its most specific
48level. The exposes property is an array of heterogeneous configuration data.
49Each exposes element has its own schema which is outlined by the subschemas in
50the schemas directory. Each schema must require a type and name (not to be
51confused with the Type and Name properties of the parent JSON object) property
52since entity manager will construct the Dbus interface name and object path
53based on those properties:
54
55`/xyz/openbmc_project/inventory/system/Board/RiserCard1/<Name>`:
56`xyz.openbmc_project.Configuration.<Type>`:
57`<remaining properties defined by exposes subschema>`
58
59## Adding new exposes property subschema
60
61New subschema for the exposes property must be added to the schema directory,
62and then referenced from global.json at /definitions/EMExposesElement. Exposes
63element subschema must require a type and name property (the validator will fail
64otherwise) and should explicitly enumerate all properties and use
65additionalProperties so mistakes can be found during validation.
66
67## Adding new Dbus interfaces
68
69To export new interfaces on the configuration parent object e.g.:
70/xyz/openbmc_project/inventory/system/Board/RiserCard1 add additional subschema
71to openbmc-dbus.json.
72
73[1]: https://json-schema.org/
74