tools: Add ignoreUpdate parameter
Adds ignoreUpdate flag to skip checking the update status and always
return success instead. This is needed for platforms that use the reboot
json and encounters an update failure due to IPMI going down during
shutdown.
Tested: Tried out an update with and without --ignore-update to verify
that the flag ignores the update status and returns success.
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: Ie20774f997229cd5ff8ae9082dc8a747079f9a2c
diff --git a/tools/handler.hpp b/tools/handler.hpp
index 2335977..a0dae56 100644
--- a/tools/handler.hpp
+++ b/tools/handler.hpp
@@ -36,9 +36,11 @@
*
* @param[in] target - the verification blob id (may support multiple in the
* future.
+ * @param[in] ignoreStatus - determines whether to ignore the verification
+ * status.
* @return true if verified, false if verification errors.
*/
- virtual bool verifyFile(const std::string& target) = 0;
+ virtual bool verifyFile(const std::string& target, bool ignoreStatus) = 0;
/**
* Cleanup the artifacts by triggering this action.
@@ -67,7 +69,7 @@
/**
* @throw ToolException on failure (TODO: throw on timeout.)
*/
- bool verifyFile(const std::string& target) override;
+ bool verifyFile(const std::string& target, bool ignoreStatus) override;
void cleanArtifacts() override;