Parse and verify the RAS data files

When analyzing an attention, the appropriate RAS actions are documented
in the RAS data files. Those data files will need to be read and
validated against the JSON schema before applying the RAS action.

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I127ae1a50bb5b5f4c160ce9fdeaeeb1d041661a0
diff --git a/analyzer/ras-data/schema/ras-data-schema.json b/analyzer/ras-data/schema/ras-data-schema.json
index 637dc30..3016f06 100644
--- a/analyzer/ras-data/schema/ras-data-schema.json
+++ b/analyzer/ras-data/schema/ras-data-schema.json
@@ -2,6 +2,19 @@
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "title": "RAS Data schema for openpower-hw-diags",
     "type": "object",
+    "definitions": {
+        "priority": {
+            "type": "string",
+            "enum": [
+                "HIGH",
+                "MED",
+                "MED_A",
+                "MED_B",
+                "MED_C",
+                "LOW"
+            ]
+        }
+    },
     "additionalProperties": false,
     "required": [ "model_ec", "version", "actions", "signatures" ],
     "properties": {
@@ -69,16 +82,7 @@
                                 ]
                             },
                             "priority": {
-                                "$id": "#priority",
-                                "type": "string",
-                                "enum": [
-                                    "HIGH",
-                                    "MED",
-                                    "MED_A",
-                                    "MED_B",
-                                    "MED_C",
-                                    "LOW"
-                                ]
+                                "$ref": "#/definitions/priority"
                             },
                             "guard": {
                                 "type": "boolean"
@@ -141,8 +145,8 @@
                                     "required": [ "name", "guard" ],
                                     "not": { "required": [ "priority" ] },
                                     "properties": {
-                                        "rx_priority": { "$ref": "#priority" },
-                                        "tx_priority": { "$ref": "#priority" }
+                                        "rx_priority": { "$ref": "#/definitions/priority" },
+                                        "tx_priority": { "$ref": "#/definitions/priority" }
                                     }
                                 }
                             },