schemas: legacy: extract ChassisIntrusionSensor
This allows to remove some properties from 'Aggregate' schema which are
no longer needed, since there is now a more specific schema to use.
Tested: Schema Validator Pass
Change-Id: I0c1d0fe3b1feee23de4dc2630e3d49fda195cd4f
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index ccf41e6..c1b618d 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -52,6 +52,9 @@
"$ref": "legacy.json#/$defs/PURedundancy"
},
{
+ "$ref": "legacy.json#/$defs/ChassisIntrusionSensor"
+ },
+ {
"$ref": "virtual_sensor.json#/$defs/VirtualSensor"
},
{
diff --git a/schemas/legacy.json b/schemas/legacy.json
index 9aea8fe..5567309 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -112,6 +112,36 @@
"required": ["RedundantCount", "Name", "Type"],
"type": "object"
},
+ "ChassisIntrusionSensor": {
+ "description": "implemented in dbus-sensors: ChassisIntrusionSensor",
+ "additionalProperties": false,
+ "properties": {
+ "Address": {
+ "$ref": "#/$defs/Types/Address"
+ },
+ "Bus": {
+ "$ref": "#/$defs/Types/Bus"
+ },
+ "Class": {
+ "$ref": "#/$defs/Types/Class"
+ },
+ "GpioPolarity": {
+ "$ref": "#/$defs/Types/GpioPolarity"
+ },
+ "Rearm": {
+ "enum": ["Automatic", "Manual"]
+ },
+ "Name": {
+ "$ref": "#/$defs/Types/Name"
+ },
+ "Type": {
+ "type": "string",
+ "const": "ChassisIntrusionSensor"
+ }
+ },
+ "required": ["Name", "Type", "Class"],
+ "type": "object"
+ },
"Aggregate": {
"description": "Don't add additional properties to this schema. Consult README.schema for instructions on adding new Exposes element sub-schema.",
"additionalProperties": false,
@@ -199,9 +229,6 @@
"GpioPins": {
"$ref": "#/$defs/Types/GpioPins"
},
- "GpioPolarity": {
- "$ref": "#/$defs/Types/GpioPolarity"
- },
"Index": {
"$ref": "#/$defs/Types/Index"
},
@@ -253,9 +280,6 @@
"Pwm": {
"$ref": "#/$defs/Types/Pwm"
},
- "Rearm": {
- "$ref": "#/$defs/Types/Rearm"
- },
"ScaleFactor": {
"$ref": "#/$defs/Types/ScaleFactor"
},
@@ -488,9 +512,6 @@
"QMin": {
"type": "number"
},
- "Rearm": {
- "enum": ["Automatic", "Manual"]
- },
"RedundantCount": {
"type": "number"
},
@@ -654,7 +675,6 @@
"IntelHsbpTempSensor",
"GenericSMBusMux",
"cffps",
- "ChassisIntrusionSensor",
"ExternalSensor",
"NMSensor",
"PCA9543Mux",