schemas: legacy: extract FanRedundancy schema

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: Ib19e4d23fe85c4e960385e178b5ec3dd9e2a053e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index 2bbc023..303e307 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -46,6 +46,9 @@
                             "$ref": "legacy.json#/$defs/CFMSensor"
                         },
                         {
+                            "$ref": "legacy.json#/$defs/FanRedundancy"
+                        },
+                        {
                             "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
                         },
                         {
diff --git a/schemas/legacy.json b/schemas/legacy.json
index fd46e00..4582ff9 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -78,6 +78,23 @@
             "required": ["Name", "Type"],
             "type": "object"
         },
+        "FanRedundancy": {
+            "additionalProperties": false,
+            "properties": {
+                "AllowedFailures": {
+                    "$ref": "#/$defs/Types/AllowedFailures"
+                },
+                "Name": {
+                    "$ref": "#/$defs/Types/Name"
+                },
+                "Type": {
+                    "type": "string",
+                    "const": "FanRedundancy"
+                }
+            },
+            "required": ["Name", "Type"],
+            "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,
@@ -85,9 +102,6 @@
                 "Address": {
                     "$ref": "#/$defs/Types/Address"
                 },
-                "AllowedFailures": {
-                    "$ref": "#/$defs/Types/AllowedFailures"
-                },
                 "BindConnector": {
                     "$ref": "#/$defs/Types/BindConnector"
                 },
@@ -2108,7 +2122,6 @@
                     "cffps",
                     "ChassisIntrusionSensor",
                     "ExternalSensor",
-                    "FanRedundancy",
                     "PURedundancy",
                     "NMSensor",
                     "PCA9543Mux",