Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 1 | /** |
| 2 | * Copyright © 2020 IBM Corporation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #include "event.hpp" |
| 17 | |
Matthew Barth | 776ca56 | 2021-03-31 09:50:58 -0500 | [diff] [blame] | 18 | #include "action.hpp" |
Matthew Barth | e557860 | 2021-03-30 12:53:24 -0500 | [diff] [blame] | 19 | #include "config_base.hpp" |
Matthew Barth | 391ade0 | 2021-01-15 14:33:21 -0600 | [diff] [blame] | 20 | #include "group.hpp" |
Matthew Barth | e557860 | 2021-03-30 12:53:24 -0500 | [diff] [blame] | 21 | #include "manager.hpp" |
Matthew Barth | 9403a21 | 2021-05-17 09:31:50 -0500 | [diff] [blame] | 22 | #include "sdbusplus.hpp" |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 23 | #include "trigger.hpp" |
Matthew Barth | e557860 | 2021-03-30 12:53:24 -0500 | [diff] [blame] | 24 | |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 25 | #include <nlohmann/json.hpp> |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 26 | #include <phosphor-logging/lg2.hpp> |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 27 | #include <sdbusplus/bus.hpp> |
| 28 | |
Matthew Barth | e557860 | 2021-03-30 12:53:24 -0500 | [diff] [blame] | 29 | #include <algorithm> |
Matthew Barth | 12bae96 | 2021-01-15 16:18:11 -0600 | [diff] [blame] | 30 | #include <optional> |
Matthew Barth | 12bae96 | 2021-01-15 16:18:11 -0600 | [diff] [blame] | 31 | |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 32 | namespace phosphor::fan::control::json |
| 33 | { |
| 34 | |
| 35 | using json = nlohmann::json; |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 36 | |
Matthew Barth | 3695ac3 | 2021-10-06 14:55:30 -0500 | [diff] [blame] | 37 | std::map<configKey, std::unique_ptr<Group>> Event::allGroups; |
| 38 | |
Matthew Barth | 9403a21 | 2021-05-17 09:31:50 -0500 | [diff] [blame] | 39 | Event::Event(const json& jsonObj, Manager* mgr, |
Matthew Barth | 9f1632e | 2021-03-31 15:51:50 -0500 | [diff] [blame] | 40 | std::map<configKey, std::unique_ptr<Zone>>& zones) : |
Matt Spinler | c7f07a2 | 2025-07-29 15:37:56 -0500 | [diff] [blame] | 41 | ConfigBase(jsonObj), _manager(mgr), _zones(zones) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 42 | { |
Matthew Barth | 619dc0f | 2021-05-20 09:27:02 -0500 | [diff] [blame] | 43 | // Event groups are optional |
| 44 | if (jsonObj.contains("groups")) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 45 | { |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 46 | setGroups(jsonObj, _profiles, _groups); |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 47 | } |
Matthew Barth | 619dc0f | 2021-05-20 09:27:02 -0500 | [diff] [blame] | 48 | // Event actions are optional |
| 49 | if (jsonObj.contains("actions")) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 50 | { |
Matthew Barth | 619dc0f | 2021-05-20 09:27:02 -0500 | [diff] [blame] | 51 | setActions(jsonObj); |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 52 | } |
Matthew Barth | 619dc0f | 2021-05-20 09:27:02 -0500 | [diff] [blame] | 53 | setTriggers(jsonObj); |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 54 | } |
| 55 | |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 56 | void Event::enable() |
| 57 | { |
Matt Spinler | d1f97f4 | 2021-10-29 16:19:24 -0500 | [diff] [blame] | 58 | for (const auto& [type, trigger] : _triggers) |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 59 | { |
Matt Spinler | d1f97f4 | 2021-10-29 16:19:24 -0500 | [diff] [blame] | 60 | // Don't call the powerOn or powerOff triggers |
| 61 | if (type.find("power") == std::string::npos) |
| 62 | { |
| 63 | trigger(getName(), _manager, _groups, _actions); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void Event::powerOn() |
| 69 | { |
| 70 | for (const auto& [type, trigger] : _triggers) |
| 71 | { |
| 72 | if (type == "poweron") |
| 73 | { |
| 74 | trigger(getName(), _manager, _groups, _actions); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void Event::powerOff() |
| 80 | { |
| 81 | for (const auto& [type, trigger] : _triggers) |
| 82 | { |
| 83 | if (type == "poweroff") |
| 84 | { |
| 85 | trigger(getName(), _manager, _groups, _actions); |
| 86 | } |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 87 | } |
| 88 | } |
| 89 | |
Patrick Williams | 4fa67aa | 2025-02-03 14:28:47 -0500 | [diff] [blame] | 90 | std::map<configKey, std::unique_ptr<Group>>& Event::getAllGroups( |
| 91 | bool loadGroups) |
Matthew Barth | c8bde4a | 2021-05-19 15:34:49 -0500 | [diff] [blame] | 92 | { |
Matthew Barth | 3695ac3 | 2021-10-06 14:55:30 -0500 | [diff] [blame] | 93 | if (allGroups.empty() && loadGroups) |
| 94 | { |
| 95 | allGroups = Manager::getConfig<Group>(true); |
| 96 | } |
| 97 | |
| 98 | return allGroups; |
Matthew Barth | c8bde4a | 2021-05-19 15:34:49 -0500 | [diff] [blame] | 99 | } |
| 100 | |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 101 | void Event::configGroup(Group& group, const json& jsonObj) |
| 102 | { |
| 103 | if (!jsonObj.contains("interface") || !jsonObj.contains("property") || |
| 104 | !jsonObj["property"].contains("name")) |
| 105 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 106 | lg2::error("Missing required group attribute", "JSON", jsonObj.dump()); |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 107 | throw std::runtime_error("Missing required group attribute"); |
| 108 | } |
| 109 | |
| 110 | // Get the group members' interface |
| 111 | auto intf = jsonObj["interface"].get<std::string>(); |
| 112 | group.setInterface(intf); |
| 113 | |
| 114 | // Get the group members' property name |
| 115 | auto prop = jsonObj["property"]["name"].get<std::string>(); |
| 116 | group.setProperty(prop); |
| 117 | |
| 118 | // Get the group members' data type |
| 119 | if (jsonObj["property"].contains("type")) |
| 120 | { |
| 121 | std::optional<std::string> type = |
| 122 | jsonObj["property"]["type"].get<std::string>(); |
| 123 | group.setType(type); |
| 124 | } |
| 125 | |
| 126 | // Get the group members' expected value |
| 127 | if (jsonObj["property"].contains("value")) |
| 128 | { |
| 129 | std::optional<PropertyVariantType> value = |
| 130 | getJsonValue(jsonObj["property"]["value"]); |
| 131 | group.setValue(value); |
| 132 | } |
| 133 | } |
| 134 | |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 135 | void Event::setGroups(const json& jsonObj, |
| 136 | const std::vector<std::string>& profiles, |
| 137 | std::vector<Group>& groups) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 138 | { |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 139 | if (jsonObj.contains("groups")) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 140 | { |
Matthew Barth | 3695ac3 | 2021-10-06 14:55:30 -0500 | [diff] [blame] | 141 | auto& availGroups = getAllGroups(); |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 142 | for (const auto& jsonGrp : jsonObj["groups"]) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 143 | { |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 144 | if (!jsonGrp.contains("name")) |
| 145 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 146 | lg2::error("Missing required group name attribute", "JSON", |
| 147 | jsonGrp.dump()); |
| 148 | throw std::runtime_error( |
| 149 | "Missing required group name attribute"); |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 150 | } |
Matthew Barth | 12bae96 | 2021-01-15 16:18:11 -0600 | [diff] [blame] | 151 | |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 152 | configKey eventProfile = |
| 153 | std::make_pair(jsonGrp["name"].get<std::string>(), profiles); |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 154 | auto grpEntry = std::find_if( |
| 155 | availGroups.begin(), availGroups.end(), |
| 156 | [&eventProfile](const auto& grp) { |
| 157 | return Manager::inConfig(grp.first, eventProfile); |
| 158 | }); |
Matthew Barth | e386fbb | 2021-06-30 14:33:55 -0500 | [diff] [blame] | 159 | if (grpEntry != availGroups.end()) |
| 160 | { |
| 161 | auto group = Group(*grpEntry->second); |
| 162 | configGroup(group, jsonGrp); |
| 163 | groups.emplace_back(group); |
| 164 | } |
Matthew Barth | 12bae96 | 2021-01-15 16:18:11 -0600 | [diff] [blame] | 165 | } |
Matthew Barth | e557860 | 2021-03-30 12:53:24 -0500 | [diff] [blame] | 166 | } |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 167 | } |
| 168 | |
Matthew Barth | c8bde4a | 2021-05-19 15:34:49 -0500 | [diff] [blame] | 169 | void Event::setActions(const json& jsonObj) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 170 | { |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 171 | for (const auto& jsonAct : jsonObj["actions"]) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 172 | { |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 173 | if (!jsonAct.contains("name")) |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 174 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 175 | lg2::error("Missing required event action name", "JSON", |
| 176 | jsonAct.dump()); |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 177 | throw std::runtime_error("Missing required event action name"); |
| 178 | } |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 179 | |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 180 | // Determine list of zones action should be run against |
| 181 | std::vector<std::reference_wrapper<Zone>> actionZones; |
Matthew Barth | a8ea091 | 2021-05-03 14:33:52 -0500 | [diff] [blame] | 182 | if (!jsonAct.contains("zones")) |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 183 | { |
| 184 | // No zones configured on the action results in the action running |
| 185 | // against all zones matching the event's active profiles |
| 186 | for (const auto& zone : _zones) |
| 187 | { |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 188 | configKey eventProfile = |
| 189 | std::make_pair(zone.second->getName(), _profiles); |
| 190 | auto zoneEntry = std::find_if( |
| 191 | _zones.begin(), _zones.end(), |
| 192 | [&eventProfile](const auto& z) { |
| 193 | return Manager::inConfig(z.first, eventProfile); |
| 194 | }); |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 195 | if (zoneEntry != _zones.end()) |
| 196 | { |
| 197 | actionZones.emplace_back(*zoneEntry->second); |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | else |
| 202 | { |
| 203 | // Zones configured on the action result in the action only running |
| 204 | // against those zones if they match the event's active profiles |
Matthew Barth | a8ea091 | 2021-05-03 14:33:52 -0500 | [diff] [blame] | 205 | for (const auto& jsonZone : jsonAct["zones"]) |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 206 | { |
| 207 | configKey eventProfile = |
| 208 | std::make_pair(jsonZone.get<std::string>(), _profiles); |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 209 | auto zoneEntry = std::find_if( |
| 210 | _zones.begin(), _zones.end(), |
| 211 | [&eventProfile](const auto& z) { |
| 212 | return Manager::inConfig(z.first, eventProfile); |
| 213 | }); |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 214 | if (zoneEntry != _zones.end()) |
| 215 | { |
| 216 | actionZones.emplace_back(*zoneEntry->second); |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | if (actionZones.empty()) |
| 221 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 222 | lg2::debug( |
| 223 | "No zones configured for event {EVENT_NAME}'s action {ACTION} " |
| 224 | "based on the active profile(s)", |
| 225 | "EVENT_NAME", getName(), "ACTION", |
| 226 | jsonAct["name"].get<std::string>()); |
Matthew Barth | 46b3448 | 2021-04-06 11:27:23 -0500 | [diff] [blame] | 227 | } |
| 228 | |
Matthew Barth | 5fb5268 | 2021-09-29 13:57:02 -0500 | [diff] [blame] | 229 | // Action specific groups, if any given, will override the use of event |
| 230 | // groups in the action(s) |
| 231 | std::vector<Group> actionGroups; |
| 232 | setGroups(jsonAct, _profiles, actionGroups); |
| 233 | if (!actionGroups.empty()) |
Matthew Barth | 776ca56 | 2021-03-31 09:50:58 -0500 | [diff] [blame] | 234 | { |
Matthew Barth | 5fb5268 | 2021-09-29 13:57:02 -0500 | [diff] [blame] | 235 | // Create the action for the event using the action's groups |
| 236 | auto actObj = ActionFactory::getAction( |
| 237 | jsonAct["name"].get<std::string>(), jsonAct, |
| 238 | std::move(actionGroups), std::move(actionZones)); |
| 239 | if (actObj) |
| 240 | { |
Matt Spinler | e6fc210 | 2022-04-07 14:31:29 -0500 | [diff] [blame] | 241 | actObj->setEventName(_name); |
Matthew Barth | 5fb5268 | 2021-09-29 13:57:02 -0500 | [diff] [blame] | 242 | _actions.emplace_back(std::move(actObj)); |
| 243 | } |
| 244 | } |
| 245 | else |
| 246 | { |
| 247 | // Create the action for the event using the event's groups |
| 248 | auto actObj = ActionFactory::getAction( |
| 249 | jsonAct["name"].get<std::string>(), jsonAct, _groups, |
| 250 | std::move(actionZones)); |
| 251 | if (actObj) |
| 252 | { |
Matt Spinler | e6fc210 | 2022-04-07 14:31:29 -0500 | [diff] [blame] | 253 | actObj->setEventName(_name); |
Matthew Barth | 5fb5268 | 2021-09-29 13:57:02 -0500 | [diff] [blame] | 254 | _actions.emplace_back(std::move(actObj)); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | if (actionGroups.empty() && _groups.empty()) |
| 259 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 260 | lg2::debug( |
| 261 | "No groups configured for event {EVENT_NAME}'s action {ACTION} " |
| 262 | "based on the active profile(s)", |
| 263 | "EVENT_NAME", getName(), "ACTION", |
| 264 | jsonAct["name"].get<std::string>()); |
Matthew Barth | 776ca56 | 2021-03-31 09:50:58 -0500 | [diff] [blame] | 265 | } |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 266 | } |
| 267 | } |
| 268 | |
Matthew Barth | 9f1632e | 2021-03-31 15:51:50 -0500 | [diff] [blame] | 269 | void Event::setTriggers(const json& jsonObj) |
| 270 | { |
| 271 | if (!jsonObj.contains("triggers")) |
| 272 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 273 | lg2::error("Missing required event triggers list", "JSON", |
| 274 | jsonObj.dump()); |
Matthew Barth | 9f1632e | 2021-03-31 15:51:50 -0500 | [diff] [blame] | 275 | throw std::runtime_error("Missing required event triggers list"); |
| 276 | } |
Matthew Barth | 0620be7 | 2021-04-14 13:31:12 -0500 | [diff] [blame] | 277 | for (const auto& jsonTrig : jsonObj["triggers"]) |
| 278 | { |
| 279 | if (!jsonTrig.contains("class")) |
| 280 | { |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 281 | lg2::error("Missing required event trigger class", "JSON", |
| 282 | jsonTrig.dump()); |
Matthew Barth | 0620be7 | 2021-04-14 13:31:12 -0500 | [diff] [blame] | 283 | throw std::runtime_error("Missing required event trigger class"); |
| 284 | } |
| 285 | // The class of trigger used to run the event actions |
| 286 | auto tClass = jsonTrig["class"].get<std::string>(); |
| 287 | std::transform(tClass.begin(), tClass.end(), tClass.begin(), tolower); |
| 288 | auto trigFunc = trigger::triggers.find(tClass); |
| 289 | if (trigFunc != trigger::triggers.end()) |
| 290 | { |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 291 | _triggers.emplace_back( |
Matt Spinler | d1f97f4 | 2021-10-29 16:19:24 -0500 | [diff] [blame] | 292 | trigFunc->first, |
Matthew Barth | b6ebac8 | 2021-05-21 11:15:33 -0500 | [diff] [blame] | 293 | trigFunc->second(jsonTrig, getName(), _actions)); |
Matthew Barth | 0620be7 | 2021-04-14 13:31:12 -0500 | [diff] [blame] | 294 | } |
| 295 | else |
| 296 | { |
| 297 | // Construct list of available triggers |
| 298 | auto availTrigs = std::accumulate( |
| 299 | std::next(trigger::triggers.begin()), trigger::triggers.end(), |
| 300 | trigger::triggers.begin()->first, [](auto list, auto trig) { |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 301 | return std::move(list) + ", " + trig.first; |
| 302 | }); |
Anwaar Hadi | 64b5ac2 | 2025-04-04 23:54:53 +0000 | [diff] [blame] | 303 | lg2::error( |
| 304 | "Trigger '{TRIGGER}' is not recognized. Available triggers are {AVAILABLE_TRIGGERS}", |
| 305 | "TRIGGER", tClass, "AVAILABLE_TRIGGERS", availTrigs); |
Matthew Barth | 0620be7 | 2021-04-14 13:31:12 -0500 | [diff] [blame] | 306 | throw std::runtime_error("Unsupported trigger class name given"); |
| 307 | } |
| 308 | } |
Matthew Barth | 9f1632e | 2021-03-31 15:51:50 -0500 | [diff] [blame] | 309 | } |
| 310 | |
Matt Spinler | c3eb7b3 | 2022-04-25 15:44:16 -0500 | [diff] [blame] | 311 | json Event::dump() const |
| 312 | { |
| 313 | json actionData; |
| 314 | std::for_each(_actions.begin(), _actions.end(), |
| 315 | [&actionData](const auto& action) { |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 316 | actionData[action->getUniqueName()] = action->dump(); |
| 317 | }); |
Matt Spinler | c3eb7b3 | 2022-04-25 15:44:16 -0500 | [diff] [blame] | 318 | |
| 319 | std::vector<std::string> groupData; |
| 320 | std::for_each(_groups.begin(), _groups.end(), |
| 321 | [&groupData](const auto& group) { |
Patrick Williams | dfddd64 | 2024-08-16 15:21:51 -0400 | [diff] [blame] | 322 | groupData.push_back(group.getName()); |
| 323 | }); |
Matt Spinler | c3eb7b3 | 2022-04-25 15:44:16 -0500 | [diff] [blame] | 324 | |
| 325 | json eventData; |
| 326 | eventData["groups"] = groupData; |
| 327 | eventData["actions"] = actionData; |
| 328 | |
| 329 | return eventData; |
| 330 | } |
| 331 | |
Matthew Barth | 3174e72 | 2020-09-15 15:13:40 -0500 | [diff] [blame] | 332 | } // namespace phosphor::fan::control::json |