schemas: legacy: extract IpmbSensor

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: Ic089f7afc1a01952d3d8c6ef63d00da464ecb9b0
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index 9bcbcb1..1985347 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -67,6 +67,9 @@
                             "$ref": "legacy.json#/$defs/XeonCPU"
                         },
                         {
+                            "$ref": "legacy.json#/$defs/IpmbSensor"
+                        },
+                        {
                             "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
                         },
                         {
diff --git a/schemas/legacy.json b/schemas/legacy.json
index 65cb148..f8e3025 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -301,6 +301,44 @@
             "required": ["Name", "Type", "CpuID", "Address"],
             "type": "object"
         },
+        "IpmbSensor": {
+            "additionalProperties": false,
+            "properties": {
+                "Name": {
+                    "$ref": "#/$defs/Types/Name"
+                },
+                "Class": {
+                    "$ref": "#/$defs/Types/Class"
+                },
+                "Address": {
+                    "$ref": "#/$defs/Types/Address"
+                },
+                "Thresholds": {
+                    "$ref": "#/$defs/Types/Thresholds"
+                },
+                "HostSMbusIndex": {
+                    "$ref": "#/$defs/Types/HostSMbusIndex"
+                },
+                "PowerState": {
+                    "$ref": "#/$defs/Types/PowerState"
+                },
+                "SensorType": {
+                    "$ref": "#/$defs/Types/SensorType"
+                },
+                "ScaleValue": {
+                    "$ref": "#/$defs/Types/ScaleValue"
+                },
+                "OffsetValue": {
+                    "$ref": "#/$defs/Types/OffsetValue"
+                },
+                "Type": {
+                    "type": "string",
+                    "const": "IpmbSensor"
+                }
+            },
+            "required": ["Name", "Type", "Address", "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,
@@ -430,12 +468,6 @@
                 "ScaleFactor": {
                     "$ref": "#/$defs/Types/ScaleFactor"
                 },
-                "ScaleValue": {
-                    "$ref": "#/$defs/Types/ScaleValue"
-                },
-                "SensorType": {
-                    "$ref": "#/$defs/Types/SensorType"
-                },
                 "SlotId": {
                     "$ref": "#/$defs/Types/SlotId"
                 },
@@ -448,9 +480,6 @@
                 "Timeout": {
                     "$ref": "#/$defs/Types/Timeout"
                 },
-                "HostSMbusIndex": {
-                    "$ref": "#/$defs/Types/HostSMbusIndex"
-                },
                 "maxiout1_Name": {
                     "$ref": "#/$defs/Types/Name"
                 },
@@ -744,7 +773,6 @@
                     "SBRMI",
                     "SBTSI",
                     "smpro_hwmon",
-                    "IpmbSensor",
                     "IpmbDevice",
                     "IpmbPowerMonitor",
                     "MOSTempSensor",