tools: implement firmware verification polling
The verification process is asynchronous, therefore poll the BMC
firmware state.
Tested: Verified it behaves as intended, before moving it into a
sub-routine:
Opening the verification file
Committing to verification file to trigger verification service
Calling stat on verification session to check status
stat received:
blob_state: 0x206
size: 0x0
metadata(1): 0x3
other
stat received:
blob_state: 0x206
size: 0x0
metadata(1): 0x0
running
stat received:
blob_state: 0x206
size: 0x0
metadata(1): 0x0
running
stat received:
blob_state: 0x206
size: 0x0
metadata(1): 0x1
success
stat received:
blob_state: 0x206
size: 0x0
metadata(1): 0x1
success
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I3cb13d1a966c2c833fd4fee5654332f34e80355a
diff --git a/tools/updater.hpp b/tools/updater.hpp
index 0a66f34..062f704 100644
--- a/tools/updater.hpp
+++ b/tools/updater.hpp
@@ -9,6 +9,16 @@
{
/**
+ * Poll an open verification session.
+ *
+ * @param[in] session - the open verification session
+ * @param[in] blob - pointer to blob interface implementation object.
+ * @return true if the verification was successul.
+ */
+bool pollVerificationStatus(std::uint16_t session,
+ ipmiblob::BlobInterface* blob);
+
+/**
* Attempt to update the BMC's firmware using the interface provided.
*
* @param[in] blob - pointer to blob interface implementation object.