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