blob: 86236b3e8023a48679ddcabc1e31fa8c4ded60fb [file] [log] [blame]
James Feist1e3e6982018-08-03 16:09:28 -07001{
Brad Bishop64d7cec2020-05-01 10:00:23 -04002 "$schema": "http://json-schema.org/draft-07/schema#",
Brad Bishop8e659b52020-05-07 17:31:04 -04003 "definitions": {
Brad Bishopada40c52020-05-07 19:32:05 -04004 "EMExposesElement": {
5 "description": [
6 "The exposes property element schema. An element of the exposes ",
7 "property is always an array where elements are of type exposes ",
8 "entry."
9 ],
10 "oneOf": [
11 {
Brad Bishopdc108282020-09-24 19:01:28 -040012 "$ref": "Intel.json#/definitions/IntelFanConnector"
13 },
14 {
Brad Bishop4fa1d392020-05-07 20:27:15 -040015 "$ref": "Pid.json#/definitions/Pid"
16 },
17 {
18 "$ref": "Pid.Zone.json#/definitions/PidZone"
19 },
20 {
21 "$ref": "Stepwise.json#/definitions/Stepwise"
22 },
23 {
Brad Bishopada40c52020-05-07 19:32:05 -040024 "$ref": "legacy.json#/definitions/Aggregate"
25 },
26 {
27 "description": [
28 "Ensure the parent oneOf schema does not validate ",
29 "when an element does not define a type property."
30 ],
31 "not": {
32 "required": [
33 "Type"
34 ]
35 },
36 "title": "Missing Type"
37 },
38 {
39 "description": [
40 "Ensure the parent oneOf schema does not validate ",
41 "when an element does not define a name property."
42 ],
43 "not": {
44 "required": [
45 "Name"
46 ]
47 },
48 "title": "Missing Name"
49 }
50 ],
51 "title": "Exposes Property Element"
52 },
Brad Bishop8e659b52020-05-07 17:31:04 -040053 "EMConfig": {
Brad Bishop2189d612020-05-07 19:27:44 -040054 "title": "Entity Manager Configuration",
55 "description": [
56 "The schema for an entity manager configuration. An entity ",
57 "manager configuration describes an association between a ",
58 "match condition, also known as a probe, and an array of ",
59 "heterogeneous configuration data. When a probe match ",
60 "occurs, the configuration data is exported to DBus."
61 ],
Brad Bishop9453a682020-05-07 19:12:46 -040062 "additionalProperties": false,
James Feist1e3e6982018-08-03 16:09:28 -070063 "type": "object",
64 "properties": {
Brad Bishop9453a682020-05-07 19:12:46 -040065 "Bus": {
66 "type": "string"
67 },
James Feist1e3e6982018-08-03 16:09:28 -070068 "Exposes": {
Brad Bishop2189d612020-05-07 19:27:44 -040069 "description": [
70 "The schema for the exposes property. The exposes ",
71 "property must be an array where elements are of ",
72 "type EMExposesElement. The exposes property is the ",
73 "heterogeneous configuration data exported to DBus ",
74 "upon a probe match."
75 ],
James Feist1e3e6982018-08-03 16:09:28 -070076 "type": "array",
77 "items": {
Brad Bishopada40c52020-05-07 19:32:05 -040078 "$ref": "#/definitions/EMExposesElement"
James Feist1e3e6982018-08-03 16:09:28 -070079 }
80 },
Brad Bishop9453a682020-05-07 19:12:46 -040081 "Logging": {
82 "enum": [
83 "Off"
84 ]
85 },
James Feist1e3e6982018-08-03 16:09:28 -070086 "Name": {
Brad Bishop2189d612020-05-07 19:27:44 -040087 "description": [
88 "The schema for the name property. The name property ",
89 "identifies the configuration. When exported, the ",
90 "configuration will be instantiated at: ",
91 "/xyz/openbmc_project/configuration/<Type>/<Name>"
92 ],
James Feist1e3e6982018-08-03 16:09:28 -070093 "type": "string"
94 },
95 "Probe": {
Brad Bishop2189d612020-05-07 19:27:44 -040096 "description": [
97 "The schema for an entity manager probe statement. ",
98 "Probes can be a single string or an array. Probes ",
99 "describe a match condition, for example when a DBus ",
100 "property has a specific value. When the match condition",
101 " occurs, the information described by the Exposes ",
102 "property is exported onto the DBus."
103 ],
James Feist1e3e6982018-08-03 16:09:28 -0700104 "anyOf": [
105 {
106 "type": "string"
107 },
108 {
109 "type": "array",
110 "items": {
111 "type": "string"
112 }
113 }
114 ]
115 },
James Feist60d93d22019-07-10 15:08:35 -0700116 "Type": {
Brad Bishop2189d612020-05-07 19:27:44 -0400117 "title": "Configuration Type",
118 "description": [
119 "The schema for the type property. The type property",
120 "identifies the type of the configuration. When exported,",
121 "configurations will be instantiated as children of: ",
122 "/xyz/openbmc_project/configuration/<Type>"
123 ],
Brad Bishop45d42a52020-05-07 19:19:49 -0400124 "enum": [
125 "Board",
126 "Chassis",
127 "NVMe",
128 "PowerSupply"
129 ]
James Feist60d93d22019-07-10 15:08:35 -0700130 },
James Feist1e3e6982018-08-03 16:09:28 -0700131 "xyz.openbmc_project.Inventory.Decorator.Asset": {
Brad Bishopb9809912020-05-07 17:15:31 -0400132 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/Asset"
James Feist1e3e6982018-08-03 16:09:28 -0700133 },
James Feist60d93d22019-07-10 15:08:35 -0700134 "ProductId": {
135 "type": "number"
136 },
137 "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
Brad Bishopb9809912020-05-07 17:15:31 -0400138 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/AssetTag"
James Feist60d93d22019-07-10 15:08:35 -0700139 },
Brad Bishop9453a682020-05-07 19:12:46 -0400140 "xyz.openbmc_project.Inventory.Item.Board.Motherboard": {
141 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Board/Motherboard"
142 },
143 "xyz.openbmc_project.Inventory.Item.Chassis": {
144 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Chassis"
145 },
146 "xyz.openbmc_project.Inventory.Item.Panel": {
147 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Panel"
148 },
James Feist60d93d22019-07-10 15:08:35 -0700149 "xyz.openbmc_project.Inventory.Item.System": {
Brad Bishopb9809912020-05-07 17:15:31 -0400150 "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/System"
James Feist1e3e6982018-08-03 16:09:28 -0700151 }
152 },
153 "required": [
154 "Exposes",
155 "Name",
Brad Bishop45d42a52020-05-07 19:19:49 -0400156 "Probe",
157 "Type"
James Feist1e3e6982018-08-03 16:09:28 -0700158 ]
159 }
Brad Bishop8e659b52020-05-07 17:31:04 -0400160 },
Brad Bishop2189d612020-05-07 19:27:44 -0400161 "title": "Entity Manager Configuration File",
162 "description": [
163 "The schema for an entity manager configuration file. An entity ",
164 "mananger configuration file can consist of a single object, or an ",
165 "array of objects. Objects must be of type EMConfig."
166 ],
Brad Bishop8e659b52020-05-07 17:31:04 -0400167 "anyOf": [
168 {
169 "type": "array",
170 "items": {
171 "$ref": "#/definitions/EMConfig"
172 }
173 },
174 {
175 "$ref": "#/definitions/EMConfig"
176 }
James Feist1e3e6982018-08-03 16:09:28 -0700177 ]
178}