blob: 53efee155dc495ca259f2f57757121c3afe6a526 [file] [log] [blame]
Bob Kingdcb4b3b2019-12-17 18:07:06 +08001{
2 "$schema": "http://json-schema.org/schema#",
3 "title": "JSON schema for the phosphor-regulators config file",
4 "$id": "https://github.com/openbmc/phosphor-power/tree/master/phosphor-regulators/schema/config_schema.json",
5 "description": "This schema describes the JSON format for the phosphor-regulators configuration file.",
6 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -06007 "properties": {
8 "comments": { "$ref": "#/definitions/comments" },
9 "rules": { "$ref": "#/definitions/rules" },
10 "chassis": { "$ref": "#/definitions/chassis" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +080011 },
Bob Kingdcb4b3b2019-12-17 18:07:06 +080012 "required": ["chassis"],
13 "additionalProperties": false,
Patrick Williams0dbce562022-12-12 10:43:31 -060014 "definitions": {
15 "rule": {
Shawn McCarney4dc9a302021-08-14 10:52:47 -050016 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -060017 "properties": {
18 "comments": { "$ref": "#/definitions/comments" },
19 "id": { "$ref": "#/definitions/id" },
20 "actions": { "$ref": "#/definitions/actions" }
Shawn McCarney4dc9a302021-08-14 10:52:47 -050021 },
22 "required": ["id", "actions"],
23 "additionalProperties": false
24 },
25
Patrick Williams0dbce562022-12-12 10:43:31 -060026 "rules": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +080027 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -060028 "items": { "$ref": "#/definitions/rule" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +080029 "minItems": 1
30 },
31
Patrick Williams0dbce562022-12-12 10:43:31 -060032 "comments": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +080033 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -060034 "items": { "type": "string" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +080035 "minItems": 1
36 },
37
Patrick Williams0dbce562022-12-12 10:43:31 -060038 "id": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +080039 "type": "string",
40 "pattern": "^[A-Za-z0-9_]+$"
41 },
42
Patrick Williams0dbce562022-12-12 10:43:31 -060043 "action": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +080044 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -060045 "properties": {
46 "comments": { "$ref": "#/definitions/comments" },
47 "and": { "$ref": "#/definitions/actions" },
48 "compare_presence": {
49 "$ref": "#/definitions/compare_presence"
50 },
51 "compare_vpd": { "$ref": "#/definitions/compare_vpd" },
52 "i2c_capture_bytes": {
53 "$ref": "#/definitions/i2c_capture_bytes"
54 },
55 "i2c_compare_bit": { "$ref": "#/definitions/i2c_bit" },
56 "i2c_compare_byte": { "$ref": "#/definitions/i2c_byte" },
57 "i2c_compare_bytes": { "$ref": "#/definitions/i2c_bytes" },
58 "i2c_write_bit": { "$ref": "#/definitions/i2c_bit" },
59 "i2c_write_byte": { "$ref": "#/definitions/i2c_byte" },
60 "i2c_write_bytes": { "$ref": "#/definitions/i2c_bytes" },
61 "if": { "$ref": "#/definitions/if" },
62 "log_phase_fault": { "$ref": "#/definitions/log_phase_fault" },
63 "not": { "$ref": "#/definitions/action" },
64 "or": { "$ref": "#/definitions/actions" },
65 "pmbus_read_sensor": {
66 "$ref": "#/definitions/pmbus_read_sensor"
67 },
68 "pmbus_write_vout_command": {
69 "$ref": "#/definitions/pmbus_write_vout_command"
70 },
71 "run_rule": { "$ref": "#/definitions/id" },
72 "set_device": { "$ref": "#/definitions/id" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +080073 },
74 "additionalProperties": false,
75 "oneOf": [
Patrick Williams0dbce562022-12-12 10:43:31 -060076 { "required": ["and"] },
77 { "required": ["compare_presence"] },
78 { "required": ["compare_vpd"] },
79 { "required": ["i2c_capture_bytes"] },
80 { "required": ["i2c_compare_bit"] },
81 { "required": ["i2c_compare_byte"] },
82 { "required": ["i2c_compare_bytes"] },
83 { "required": ["i2c_write_bit"] },
84 { "required": ["i2c_write_byte"] },
85 { "required": ["i2c_write_bytes"] },
86 { "required": ["if"] },
87 { "required": ["log_phase_fault"] },
88 { "required": ["not"] },
89 { "required": ["or"] },
90 { "required": ["pmbus_write_vout_command"] },
91 { "required": ["pmbus_read_sensor"] },
92 { "required": ["run_rule"] },
93 { "required": ["set_device"] }
Bob Kingdcb4b3b2019-12-17 18:07:06 +080094 ]
95 },
96
Patrick Williams0dbce562022-12-12 10:43:31 -060097 "actions": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +080098 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -060099 "items": { "$ref": "#/definitions/action" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800100 "minItems": 1
101 },
102
Patrick Williams0dbce562022-12-12 10:43:31 -0600103 "compare_presence": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800104 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600105 "properties": {
106 "fru": { "$ref": "#/definitions/inventory_path" },
107 "value": { "$ref": "#/definitions/boolean_value" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800108 },
109 "required": ["fru", "value"],
110 "additionalProperties": false
111 },
112
Patrick Williams0dbce562022-12-12 10:43:31 -0600113 "inventory_path": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800114 "type": "string",
115 "minLength": 1
116 },
117
Patrick Williams0dbce562022-12-12 10:43:31 -0600118 "boolean_value": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800119 "type": "boolean"
120 },
121
Patrick Williams0dbce562022-12-12 10:43:31 -0600122 "compare_vpd": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800123 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600124 "properties": {
125 "fru": { "$ref": "#/definitions/inventory_path" },
126 "keyword": { "$ref": "#/definitions/keyword" },
127 "value": { "$ref": "#/definitions/string_value" },
128 "byte_values": { "$ref": "#/definitions/byte_values_min0" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800129 },
Matt Spinleraacc2aa2021-05-25 09:31:35 -0600130 "required": ["fru", "keyword"],
131 "oneOf": [
Patrick Williams0dbce562022-12-12 10:43:31 -0600132 { "required": ["value"] },
133 { "required": ["byte_values"] }
Matt Spinleraacc2aa2021-05-25 09:31:35 -0600134 ],
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800135 "additionalProperties": false
136 },
137
Patrick Williams0dbce562022-12-12 10:43:31 -0600138 "keyword": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800139 "type": "string",
Matt Spinleraacc2aa2021-05-25 09:31:35 -0600140 "enum": ["CCIN", "Manufacturer", "Model", "PartNumber", "HW"]
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800141 },
142
Patrick Williams0dbce562022-12-12 10:43:31 -0600143 "string_value": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800144 "type": "string"
145 },
146
Patrick Williams0dbce562022-12-12 10:43:31 -0600147 "i2c_capture_bytes": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500148 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600149 "properties": {
150 "register": { "$ref": "#/definitions/register" },
151 "count": { "$ref": "#/definitions/byte_count" }
Shawn McCarney846dde52021-08-14 12:47:44 -0500152 },
153 "required": ["register", "count"],
154 "additionalProperties": false
155 },
156
Patrick Williams0dbce562022-12-12 10:43:31 -0600157 "i2c_bit": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800158 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600159 "properties": {
160 "register": { "$ref": "#/definitions/register" },
161 "position": { "$ref": "#/definitions/position" },
162 "value": { "$ref": "#/definitions/bit_value" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800163 },
Patrick Williams0dbce562022-12-12 10:43:31 -0600164 "required": ["register", "position", "value"],
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800165 "additionalProperties": false
166 },
167
Patrick Williams0dbce562022-12-12 10:43:31 -0600168 "register": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800169 "type": "string",
170 "pattern": "^0x[0-9A-Fa-f]{2}$"
171 },
172
Patrick Williams0dbce562022-12-12 10:43:31 -0600173 "position": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800174 "type": "integer",
175 "minimum": 0,
176 "maximum": 7
177 },
178
Patrick Williams0dbce562022-12-12 10:43:31 -0600179 "bit_value": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800180 "type": "integer",
181 "minimum": 0,
182 "maximum": 1
183 },
184
Patrick Williams0dbce562022-12-12 10:43:31 -0600185 "i2c_byte": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800186 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600187 "properties": {
188 "register": { "$ref": "#/definitions/register" },
189 "value": { "$ref": "#/definitions/byte_value" },
190 "mask": { "$ref": "#/definitions/byte_mask" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800191 },
192 "required": ["register", "value"],
193 "additionalProperties": false
194 },
195
Patrick Williams0dbce562022-12-12 10:43:31 -0600196 "byte_value": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800197 "type": "string",
198 "pattern": "^0x[0-9A-Fa-f]{2}$"
199 },
200
Patrick Williams0dbce562022-12-12 10:43:31 -0600201 "byte_mask": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800202 "type": "string",
203 "pattern": "^0x[0-9A-Fa-f]{2}$"
204 },
205
Patrick Williams0dbce562022-12-12 10:43:31 -0600206 "byte_count": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500207 "type": "integer",
208 "minimum": 1
209 },
210
Patrick Williams0dbce562022-12-12 10:43:31 -0600211 "i2c_bytes": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800212 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600213 "properties": {
214 "register": { "$ref": "#/definitions/register" },
215 "values": { "$ref": "#/definitions/byte_values" },
216 "masks": { "$ref": "#/definitions/byte_masks" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800217 },
218 "required": ["register", "values"],
219 "additionalProperties": false
220 },
221
Patrick Williams0dbce562022-12-12 10:43:31 -0600222 "byte_values": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800223 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600224 "items": { "$ref": "#/definitions/byte_value" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800225 "minItems": 1
226 },
227
Patrick Williams0dbce562022-12-12 10:43:31 -0600228 "byte_values_min0": {
Shawn McCarneya2a830b2021-10-30 14:24:31 -0500229 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600230 "items": { "$ref": "#/definitions/byte_value" },
Shawn McCarneya2a830b2021-10-30 14:24:31 -0500231 "minItems": 0
232 },
233
Patrick Williams0dbce562022-12-12 10:43:31 -0600234 "byte_masks": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800235 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600236 "items": { "$ref": "#/definitions/byte_mask" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800237 "minItems": 1
238 },
239
Patrick Williams0dbce562022-12-12 10:43:31 -0600240 "if": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800241 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600242 "properties": {
243 "condition": { "$ref": "#/definitions/action" },
244 "then": { "$ref": "#/definitions/actions" },
245 "else": { "$ref": "#/definitions/actions" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800246 },
247 "required": ["condition", "then"],
248 "additionalProperties": false
249 },
250
Patrick Williams0dbce562022-12-12 10:43:31 -0600251 "log_phase_fault": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500252 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600253 "properties": {
254 "type": { "$ref": "#/definitions/phase_fault_type" }
Shawn McCarney846dde52021-08-14 12:47:44 -0500255 },
256 "required": ["type"],
257 "additionalProperties": false
258 },
259
Patrick Williams0dbce562022-12-12 10:43:31 -0600260 "phase_fault_type": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500261 "type": "string",
262 "enum": ["n+1", "n"]
263 },
264
Patrick Williams0dbce562022-12-12 10:43:31 -0600265 "pmbus_write_vout_command": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800266 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600267 "properties": {
268 "volts": { "$ref": "#/definitions/volts" },
269 "format": { "$ref": "#/definitions/write_vout_format" },
270 "exponent": { "$ref": "#/definitions/exponent" },
271 "is_verified": { "$ref": "#/definitions/is_verified" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800272 },
273 "required": ["format"],
274 "additionalProperties": false
275 },
276
Patrick Williams0dbce562022-12-12 10:43:31 -0600277 "volts": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800278 "type": "number"
279 },
280
Patrick Williams0dbce562022-12-12 10:43:31 -0600281 "write_vout_format": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800282 "type": "string",
283 "enum": ["linear"]
284 },
285
Patrick Williams0dbce562022-12-12 10:43:31 -0600286 "exponent": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800287 "type": "integer"
288 },
289
Patrick Williams0dbce562022-12-12 10:43:31 -0600290 "is_verified": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800291 "type": "boolean"
292 },
293
Patrick Williams0dbce562022-12-12 10:43:31 -0600294 "pmbus_read_sensor": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800295 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600296 "properties": {
297 "type": { "$ref": "#/definitions/pmbus_read_sensor_type" },
298 "command": {
299 "$ref": "#/definitions/pmbus_read_sensor_command"
300 },
301 "format": { "$ref": "#/definitions/read_sensor_format" },
302 "exponent": { "$ref": "#/definitions/exponent" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800303 },
304 "required": ["type", "command", "format"],
305 "additionalProperties": false
306 },
307
Patrick Williams0dbce562022-12-12 10:43:31 -0600308 "pmbus_read_sensor_type": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800309 "type": "string",
Patrick Williams0dbce562022-12-12 10:43:31 -0600310 "enum": [
311 "iout",
312 "iout_peak",
313 "iout_valley",
314 "pout",
315 "temperature",
316 "temperature_peak",
317 "vout",
318 "vout_peak",
319 "vout_valley"
320 ]
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800321 },
322
Patrick Williams0dbce562022-12-12 10:43:31 -0600323 "pmbus_read_sensor_command": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800324 "type": "string",
325 "pattern": "^0x[0-9a-fA-F]{2}$"
326 },
327
Patrick Williams0dbce562022-12-12 10:43:31 -0600328 "read_sensor_format": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800329 "type": "string",
330 "enum": ["linear_11", "linear_16"]
331 },
332
Patrick Williams0dbce562022-12-12 10:43:31 -0600333 "chassis_object": {
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500334 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600335 "properties": {
336 "comments": { "$ref": "#/definitions/comments" },
337 "number": { "$ref": "#/definitions/number" },
338 "inventory_path": { "$ref": "#/definitions/inventory_path" },
339 "devices": { "$ref": "#/definitions/devices" }
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500340 },
Shawn McCarney4c88a4c2021-09-21 15:29:24 -0500341 "required": ["number", "inventory_path"],
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500342 "additionalProperties": false
343 },
344
Patrick Williams0dbce562022-12-12 10:43:31 -0600345 "chassis": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800346 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600347 "items": { "$ref": "#/definitions/chassis_object" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800348 "minItems": 1
349 },
350
Patrick Williams0dbce562022-12-12 10:43:31 -0600351 "number": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800352 "type": "integer",
353 "minimum": 1
354 },
355
Patrick Williams0dbce562022-12-12 10:43:31 -0600356 "device": {
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500357 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600358 "properties": {
359 "comments": { "$ref": "#/definitions/comments" },
360 "id": { "$ref": "#/definitions/id" },
361 "is_regulator": { "$ref": "#/definitions/is_regulator" },
362 "fru": { "$ref": "#/definitions/inventory_path" },
363 "i2c_interface": { "$ref": "#/definitions/i2c_interface" },
364 "presence_detection": {
365 "$ref": "#/definitions/presence_detection"
366 },
367 "configuration": { "$ref": "#/definitions/configuration" },
368 "phase_fault_detection": {
369 "$ref": "#/definitions/phase_fault_detection"
370 },
371 "rails": { "$ref": "#/definitions/rails" }
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500372 },
373 "required": ["id", "is_regulator", "fru", "i2c_interface"],
Patrick Williams0dbce562022-12-12 10:43:31 -0600374 "if": {
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500375 "properties": { "is_regulator": { "const": false } }
376 },
Patrick Williams0dbce562022-12-12 10:43:31 -0600377 "then": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500378 "not": {
379 "anyOf": [
380 { "required": ["phase_fault_detection"] },
381 { "required": ["rails"] }
382 ]
383 }
Shawn McCarney4dc9a302021-08-14 10:52:47 -0500384 },
385 "additionalProperties": false
386 },
387
Patrick Williams0dbce562022-12-12 10:43:31 -0600388 "devices": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800389 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600390 "items": { "$ref": "#/definitions/device" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800391 "minItems": 1
392 },
393
Patrick Williams0dbce562022-12-12 10:43:31 -0600394 "is_regulator": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800395 "type": "boolean"
396 },
397
Patrick Williams0dbce562022-12-12 10:43:31 -0600398 "i2c_interface": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800399 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600400 "properties": {
401 "bus": { "$ref": "#/definitions/bus" },
402 "address": { "$ref": "#/definitions/address" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800403 },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800404 "required": ["bus", "address"],
405 "additionalProperties": false
406 },
407
Patrick Williams0dbce562022-12-12 10:43:31 -0600408 "bus": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800409 "type": "integer",
410 "minimum": 0
411 },
412
Patrick Williams0dbce562022-12-12 10:43:31 -0600413 "address": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800414 "type": "string",
415 "pattern": "^0x[0-9A-Fa-f]{2}$"
416 },
417
Patrick Williams0dbce562022-12-12 10:43:31 -0600418 "presence_detection": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800419 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600420 "properties": {
421 "comments": { "$ref": "#/definitions/comments" },
422 "rule_id": { "$ref": "#/definitions/id" },
423 "actions": { "$ref": "#/definitions/actions" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800424 },
425 "additionalProperties": false,
Patrick Williams0dbce562022-12-12 10:43:31 -0600426 "oneOf": [{ "required": ["rule_id"] }, { "required": ["actions"] }]
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800427 },
428
Patrick Williams0dbce562022-12-12 10:43:31 -0600429 "configuration": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800430 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600431 "properties": {
432 "comments": { "$ref": "#/definitions/comments" },
433 "volts": { "$ref": "#/definitions/volts" },
434 "rule_id": { "$ref": "#/definitions/id" },
435 "actions": { "$ref": "#/definitions/actions" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800436 },
437 "additionalProperties": false,
Patrick Williams0dbce562022-12-12 10:43:31 -0600438 "oneOf": [{ "required": ["rule_id"] }, { "required": ["actions"] }]
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800439 },
440
Patrick Williams0dbce562022-12-12 10:43:31 -0600441 "phase_fault_detection": {
Shawn McCarney846dde52021-08-14 12:47:44 -0500442 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600443 "properties": {
444 "comments": { "$ref": "#/definitions/comments" },
445 "device_id": { "$ref": "#/definitions/id" },
446 "rule_id": { "$ref": "#/definitions/id" },
447 "actions": { "$ref": "#/definitions/actions" }
Shawn McCarney846dde52021-08-14 12:47:44 -0500448 },
449 "additionalProperties": false,
Patrick Williams0dbce562022-12-12 10:43:31 -0600450 "oneOf": [{ "required": ["rule_id"] }, { "required": ["actions"] }]
Shawn McCarney846dde52021-08-14 12:47:44 -0500451 },
452
Patrick Williams0dbce562022-12-12 10:43:31 -0600453 "rail": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800454 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600455 "properties": {
456 "comments": { "$ref": "#/definitions/comments" },
457 "id": { "$ref": "#/definitions/id" },
458 "configuration": { "$ref": "#/definitions/configuration" },
459 "sensor_monitoring": {
460 "$ref": "#/definitions/sensor_monitoring"
461 }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800462 },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800463 "required": ["id"],
464 "additionalProperties": false
465 },
466
Patrick Williams0dbce562022-12-12 10:43:31 -0600467 "rails": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800468 "type": "array",
Patrick Williams0dbce562022-12-12 10:43:31 -0600469 "items": { "$ref": "#/definitions/rail" },
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800470 "minItems": 1
471 },
472
Patrick Williams0dbce562022-12-12 10:43:31 -0600473 "sensor_monitoring": {
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800474 "type": "object",
Patrick Williams0dbce562022-12-12 10:43:31 -0600475 "properties": {
476 "comments": { "$ref": "#/definitions/comments" },
477 "rule_id": { "$ref": "#/definitions/id" },
478 "actions": { "$ref": "#/definitions/actions" }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800479 },
480 "additionalProperties": false,
Patrick Williams0dbce562022-12-12 10:43:31 -0600481 "oneOf": [{ "required": ["rule_id"] }, { "required": ["actions"] }]
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800482 }
Bob Kingdcb4b3b2019-12-17 18:07:06 +0800483 }
484}