Bus callout resolution support

Change-Id: I516d151350ac0d2342c966266f2e90bae8572c37
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/analyzer/ras-data/data/ras-data-explorer-11.json b/analyzer/ras-data/data/ras-data-explorer-11.json
index 37a216e..9f638da 100644
--- a/analyzer/ras-data/data/ras-data-explorer-11.json
+++ b/analyzer/ras-data/data/ras-data-explorer-11.json
@@ -51,9 +51,21 @@
         ],
         "omi_bus" : [
             {
-                "type"  : "callout_bus",
-                "name"  : "omi_bus",
-                "guard" : true
+                "type"      : "callout_self",
+                "priority"  : "MED_A",
+                "guard"     : true
+            },
+            {
+                "type"      : "callout_connected",
+                "name"      : "omi_bus",
+                "priority"  : "MED_A",
+                "guard"     : true
+            },
+            {
+                "type"      : "callout_bus",
+                "name"      : "omi_bus",
+                "priority"  : "LOW",
+                "guard"     : false
             }
         ],
         "level2_M_self_L" : [
diff --git a/analyzer/ras-data/data/ras-data-explorer-20.json b/analyzer/ras-data/data/ras-data-explorer-20.json
index 1d99c6a..354106f 100644
--- a/analyzer/ras-data/data/ras-data-explorer-20.json
+++ b/analyzer/ras-data/data/ras-data-explorer-20.json
@@ -51,9 +51,21 @@
         ],
         "omi_bus" : [
             {
-                "type"  : "callout_bus",
-                "name"  : "omi_bus",
-                "guard" : true
+                "type"      : "callout_self",
+                "priority"  : "MED_A",
+                "guard"     : true
+            },
+            {
+                "type"      : "callout_connected",
+                "name"      : "omi_bus",
+                "priority"  : "MED_A",
+                "guard"     : true
+            },
+            {
+                "type"      : "callout_bus",
+                "name"      : "omi_bus",
+                "priority"  : "LOW",
+                "guard"     : false
             }
         ],
         "level2_M_self_L" : [
diff --git a/analyzer/ras-data/ras-data-definition.md b/analyzer/ras-data/ras-data-definition.md
index 2df571b..d27b3ab 100644
--- a/analyzer/ras-data/ras-data-definition.md
+++ b/analyzer/ras-data/ras-data-definition.md
@@ -147,22 +147,20 @@
 #### 5.1.5) action type `callout_bus`
 
 This will request to callout all parts associated with a bus (RX/TX endpoints
-and everything else in between the endpoints). Bus callouts have very specific
-priority:
+and everything else in between the endpoints). All parts will be called out with
+the same priority. If a particular part, like the endpoints, need to be called
+out at a different priority, they will need to be called out using a different
+action type. For example:
 
-- If an SMP cable exists, callout the cable with priority `HIGH`.
-- Callout both RX and TX endpoints with priority `MED_A`.
-- Callout everything else in between with priority `LOW`.
-
-In some special cases, the callout priority of the endpoints may differ from the
-default `MED_A`. In which case, the optional priority properties can be used.
+- `callout_self` with priority `MED_A`.         (RX endpoint MED_A)
+- `callout_connected` with priority `MED_A`.    (TX endpoint MED_A)
+- `callout_bus` with priority `LOW`.            (everything else LOW)
 
 | Keyword     | Description                                                    |
 |-------------|----------------------------------------------------------------|
 | type        | value (string): `callout_bus`                                  |
 | name        | The `<bus_name>` as defined by the `buses` keyword.            |
-| rx_priority | Optional priority of the receiving side endpoint               |
-| tx_priority | Optional priority of the transfer side endpoint                |
+| priority    | See `priority` table above.                                    |
 | guard       | See `guard` table above.                                       |
 
 #### 5.1.6) action type `callout_clock`
diff --git a/analyzer/ras-data/ras-data-parser.cpp b/analyzer/ras-data/ras-data-parser.cpp
index ea59c07..6ec8b6c 100644
--- a/analyzer/ras-data/ras-data-parser.cpp
+++ b/analyzer/ras-data/ras-data-parser.cpp
@@ -203,14 +203,15 @@
         }
         else if ("callout_bus" == type)
         {
-            auto name = a.at("name").get<std::string>();
-            // auto rx_priority = a.at("rx_priority").get<std::string>();
-            // auto tx_priority = a.at("tx_priority").get<std::string>();
-            auto guard = a.at("guard").get<bool>();
+            auto name     = a.at("name").get<std::string>();
+            auto priority = a.at("priority").get<std::string>();
+            auto guard    = a.at("guard").get<bool>();
 
-            // TODO
-            trace::inf("callout_bus: name=%s guard=%c", name.c_str(),
-                       guard ? 'T' : 'F');
+            auto busData = parseBus(i_data, name);
+
+            o_list->push(std::make_shared<BusCalloutResolution>(
+                std::get<0>(busData), std::get<1>(busData),
+                getPriority(priority), guard));
         }
         else if ("callout_clock" == type)
         {
diff --git a/analyzer/ras-data/schema/ras-data-schema-v01.json b/analyzer/ras-data/schema/ras-data-schema-v01.json
index d675631..10f03ea 100644
--- a/analyzer/ras-data/schema/ras-data-schema-v01.json
+++ b/analyzer/ras-data/schema/ras-data-schema-v01.json
@@ -143,11 +143,7 @@
                                     }
                                 },
                                 "then": {
-                                    "required": [ "name", "guard" ],
-                                    "not": { "required": [ "priority" ] },
-                                    "properties": {
-                                        "rx_priority": { "$ref": "#/definitions/priority" },
-                                        "tx_priority": { "$ref": "#/definitions/priority" }
+                                    "required": [ "name", "priority", "guard" ],
                                     }
                                 }
                             },