schemas: legacy: extract ExternalSensor
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: I31b8a6929ede132c10030a3e416758993e50806a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index ee1c003..c69b5a4 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -85,6 +85,9 @@
"$ref": "legacy.json#/$defs/HostCpuUtilization"
},
{
+ "$ref": "legacy.json#/$defs/ExternalSensor"
+ },
+ {
"$ref": "virtual_sensor.json#/$defs/VirtualSensor"
},
{
diff --git a/schemas/legacy.json b/schemas/legacy.json
index 7a544e8..cf83b31 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -444,6 +444,39 @@
"required": ["Name", "Type", "Polling"],
"type": "object"
},
+ "ExternalSensor": {
+ "description": "implemented in dbus-sensors: ExternalSensor",
+ "additionalProperties": false,
+ "properties": {
+ "Name": {
+ "$ref": "#/$defs/Types/Name"
+ },
+ "Timeout": {
+ "$ref": "#/$defs/Types/Timeout"
+ },
+ "Units": {
+ "$ref": "#/$defs/Types/Units"
+ },
+ "MaxValue": {
+ "$ref": "#/$defs/Types/MaxValue"
+ },
+ "MinValue": {
+ "$ref": "#/$defs/Types/MinValue"
+ },
+ "EntityId": {
+ "$ref": "#/$defs/Types/EntityId"
+ },
+ "EntityInstance": {
+ "$ref": "#/$defs/Types/EntityInstance"
+ },
+ "Type": {
+ "type": "string",
+ "const": "ExternalSensor"
+ }
+ },
+ "required": ["Name", "Type", "Units", "EntityId", "EntityInstance"],
+ "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,
@@ -567,9 +600,6 @@
"Thresholds": {
"$ref": "#/$defs/Types/Thresholds"
},
- "Timeout": {
- "$ref": "#/$defs/Types/Timeout"
- },
"maxiout1_Name": {
"$ref": "#/$defs/Types/Name"
},
@@ -932,7 +962,6 @@
"IntelHsbpTempSensor",
"GenericSMBusMux",
"cffps",
- "ExternalSensor",
"NMSensor",
"PSM7",
"JC42",