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