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 | 4fa1d39 | 2020-05-07 20:27:15 -0400 | [diff] [blame^] | 12 | "$ref": "Pid.json#/definitions/Pid" |
| 13 | }, |
| 14 | { |
| 15 | "$ref": "Pid.Zone.json#/definitions/PidZone" |
| 16 | }, |
| 17 | { |
| 18 | "$ref": "Stepwise.json#/definitions/Stepwise" |
| 19 | }, |
| 20 | { |
Brad Bishop | ada40c5 | 2020-05-07 19:32:05 -0400 | [diff] [blame] | 21 | "$ref": "legacy.json#/definitions/Aggregate" |
| 22 | }, |
| 23 | { |
| 24 | "description": [ |
| 25 | "Ensure the parent oneOf schema does not validate ", |
| 26 | "when an element does not define a type property." |
| 27 | ], |
| 28 | "not": { |
| 29 | "required": [ |
| 30 | "Type" |
| 31 | ] |
| 32 | }, |
| 33 | "title": "Missing Type" |
| 34 | }, |
| 35 | { |
| 36 | "description": [ |
| 37 | "Ensure the parent oneOf schema does not validate ", |
| 38 | "when an element does not define a name property." |
| 39 | ], |
| 40 | "not": { |
| 41 | "required": [ |
| 42 | "Name" |
| 43 | ] |
| 44 | }, |
| 45 | "title": "Missing Name" |
| 46 | } |
| 47 | ], |
| 48 | "title": "Exposes Property Element" |
| 49 | }, |
Brad Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 50 | "EMConfig": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 51 | "title": "Entity Manager Configuration", |
| 52 | "description": [ |
| 53 | "The schema for an entity manager configuration. An entity ", |
| 54 | "manager configuration describes an association between a ", |
| 55 | "match condition, also known as a probe, and an array of ", |
| 56 | "heterogeneous configuration data. When a probe match ", |
| 57 | "occurs, the configuration data is exported to DBus." |
| 58 | ], |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 59 | "additionalProperties": false, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 60 | "type": "object", |
| 61 | "properties": { |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 62 | "Bus": { |
| 63 | "type": "string" |
| 64 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 65 | "Exposes": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 66 | "description": [ |
| 67 | "The schema for the exposes property. The exposes ", |
| 68 | "property must be an array where elements are of ", |
| 69 | "type EMExposesElement. The exposes property is the ", |
| 70 | "heterogeneous configuration data exported to DBus ", |
| 71 | "upon a probe match." |
| 72 | ], |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 73 | "type": "array", |
| 74 | "items": { |
Brad Bishop | ada40c5 | 2020-05-07 19:32:05 -0400 | [diff] [blame] | 75 | "$ref": "#/definitions/EMExposesElement" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 76 | } |
| 77 | }, |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 78 | "Logging": { |
| 79 | "enum": [ |
| 80 | "Off" |
| 81 | ] |
| 82 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 83 | "Name": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 84 | "description": [ |
| 85 | "The schema for the name property. The name property ", |
| 86 | "identifies the configuration. When exported, the ", |
| 87 | "configuration will be instantiated at: ", |
| 88 | "/xyz/openbmc_project/configuration/<Type>/<Name>" |
| 89 | ], |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 90 | "type": "string" |
| 91 | }, |
| 92 | "Probe": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 93 | "description": [ |
| 94 | "The schema for an entity manager probe statement. ", |
| 95 | "Probes can be a single string or an array. Probes ", |
| 96 | "describe a match condition, for example when a DBus ", |
| 97 | "property has a specific value. When the match condition", |
| 98 | " occurs, the information described by the Exposes ", |
| 99 | "property is exported onto the DBus." |
| 100 | ], |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 101 | "anyOf": [ |
| 102 | { |
| 103 | "type": "string" |
| 104 | }, |
| 105 | { |
| 106 | "type": "array", |
| 107 | "items": { |
| 108 | "type": "string" |
| 109 | } |
| 110 | } |
| 111 | ] |
| 112 | }, |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 113 | "Type": { |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 114 | "title": "Configuration Type", |
| 115 | "description": [ |
| 116 | "The schema for the type property. The type property", |
| 117 | "identifies the type of the configuration. When exported,", |
| 118 | "configurations will be instantiated as children of: ", |
| 119 | "/xyz/openbmc_project/configuration/<Type>" |
| 120 | ], |
Brad Bishop | 45d42a5 | 2020-05-07 19:19:49 -0400 | [diff] [blame] | 121 | "enum": [ |
| 122 | "Board", |
| 123 | "Chassis", |
| 124 | "NVMe", |
| 125 | "PowerSupply" |
| 126 | ] |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 127 | }, |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 128 | "xyz.openbmc_project.Inventory.Decorator.Asset": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 129 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/Asset" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 130 | }, |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 131 | "ProductId": { |
| 132 | "type": "number" |
| 133 | }, |
| 134 | "xyz.openbmc_project.Inventory.Decorator.AssetTag": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 135 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Decorator/AssetTag" |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 136 | }, |
Brad Bishop | 9453a68 | 2020-05-07 19:12:46 -0400 | [diff] [blame] | 137 | "xyz.openbmc_project.Inventory.Item.Board.Motherboard": { |
| 138 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Board/Motherboard" |
| 139 | }, |
| 140 | "xyz.openbmc_project.Inventory.Item.Chassis": { |
| 141 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Chassis" |
| 142 | }, |
| 143 | "xyz.openbmc_project.Inventory.Item.Panel": { |
| 144 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/Panel" |
| 145 | }, |
James Feist | 60d93d2 | 2019-07-10 15:08:35 -0700 | [diff] [blame] | 146 | "xyz.openbmc_project.Inventory.Item.System": { |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 147 | "$ref": "openbmc-dbus.json#/definitions/xyz/openbmc_project/Inventory/Item/System" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 148 | } |
| 149 | }, |
| 150 | "required": [ |
| 151 | "Exposes", |
| 152 | "Name", |
Brad Bishop | 45d42a5 | 2020-05-07 19:19:49 -0400 | [diff] [blame] | 153 | "Probe", |
| 154 | "Type" |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 155 | ] |
| 156 | } |
Brad Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 157 | }, |
Brad Bishop | 2189d61 | 2020-05-07 19:27:44 -0400 | [diff] [blame] | 158 | "title": "Entity Manager Configuration File", |
| 159 | "description": [ |
| 160 | "The schema for an entity manager configuration file. An entity ", |
| 161 | "mananger configuration file can consist of a single object, or an ", |
| 162 | "array of objects. Objects must be of type EMConfig." |
| 163 | ], |
Brad Bishop | 8e659b5 | 2020-05-07 17:31:04 -0400 | [diff] [blame] | 164 | "anyOf": [ |
| 165 | { |
| 166 | "type": "array", |
| 167 | "items": { |
| 168 | "$ref": "#/definitions/EMConfig" |
| 169 | } |
| 170 | }, |
| 171 | { |
| 172 | "$ref": "#/definitions/EMConfig" |
| 173 | } |
James Feist | 1e3e698 | 2018-08-03 16:09:28 -0700 | [diff] [blame] | 174 | ] |
| 175 | } |