Add callback support to triggerable actions
Change-Id: Icc27fbe9403eda418f41e12c76af7f3216f4b72a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/general_systemd.cpp b/bmc/general_systemd.cpp
index 3c59c11..ecd15d4 100644
--- a/bmc/general_systemd.cpp
+++ b/bmc/general_systemd.cpp
@@ -144,6 +144,11 @@
job = std::nullopt;
currentStatus =
result == "done" ? ActionStatus::success : ActionStatus::failed;
+
+ if (cb)
+ {
+ cb(*this);
+ }
}
std::unique_ptr<TriggerableActionInterface>