James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 1 | { |
Brad Bishop | 64d7cec | 2020-05-01 10:00:23 -0400 | [diff] [blame] | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
Brad Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 3 | "definitions": { |
Brad Bishop | ada40c5 | 2020-05-07 19:32:05 -0400 | [diff] [blame] | 4 | "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 Bishop | dc10828 | 2020-09-24 19:01:28 -0400 | [diff] [blame^] | 12 | "$ref": "Intel.json#/definitions/IntelFanConnector" |
| 13 | }, |
| 14 | { |
Brad Bishop | 4fa1d39 | 2020-05-07 20:27:15 -0400 | [diff] [blame] | 15 | "$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 Bishop | ada40c5 | 2020-05-07 19:32:05 -0400 | [diff] [blame] | 24 | "$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 Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 53 | "EMConfig": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 54 | "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 Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 62 | "additionalProperties": false, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 63 | "type": "object", |
| 64 | "properties": { |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 65 | "Bus": { |
| 66 | "type": "string" |
| 67 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 68 | "Exposes": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 69 | "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 Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 76 | "type": "array", |
| 77 | "items": { |
Brad Bishop | ada40c5 | 2020-05-07 19:32:05 -0400 | [diff] [blame] | 78 | "$ref": "#/definitions/EMExposesElement" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 79 | } |
| 80 | }, |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 81 | "Logging": { |
| 82 | "enum": [ |
| 83 | "Off" |
| 84 | ] |
| 85 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 86 | "Name": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 87 | "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 Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 93 | "type": "string" |
| 94 | }, |
| 95 | "Probe": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 96 | "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 Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 104 | "anyOf": [ |
| 105 | { |
| 106 | "type": "string" |
| 107 | }, |
| 108 | { |
| 109 | "type": "array", |
| 110 | "items": { |
| 111 | "type": "string" |
| 112 | } |
| 113 | } |
| 114 | ] |
| 115 | }, |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 116 | "Type": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 117 | "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 Bishop | 45d42a5 | 2020-05-07 19:19:49 -0400 | [diff] [blame] | 124 | "enum": [ |
| 125 | "Board", |
| 126 | "Chassis", |
| 127 | "NVMe", |
| 128 | "PowerSupply" |
| 129 | ] |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 130 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 131 | "xyz.openbmc_project.Inventory.Decorator.Asset": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 132 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/Asset" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 133 | }, |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 134 | "ProductId": { |
| 135 | "type": "number" |
| 136 | }, |
| 137 | "xyz.openbmc_project.Inventory.Decorator.AssetTag": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 138 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/AssetTag" |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 139 | }, |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 140 | "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 Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 149 | "xyz.openbmc_project.Inventory.Item.System": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 150 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/System" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 151 | } |
| 152 | }, |
| 153 | "required": [ |
| 154 | "Exposes", |
| 155 | "Name", |
Brad Bishop | 45d42a5 | 2020-05-07 19:19:49 -0400 | [diff] [blame] | 156 | "Probe", |
| 157 | "Type" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 158 | ] |
| 159 | } |
Brad Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 160 | }, |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 161 | "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 Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 167 | "anyOf": [ |
| 168 | { |
| 169 | "type": "array", |
| 170 | "items": { |
| 171 | "$ref": "#/definitions/EMConfig" |
| 172 | } |
| 173 | }, |
| 174 | { |
| 175 | "$ref": "#/definitions/EMConfig" |
| 176 | } |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 177 | ] |
| 178 | } |