2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-09 04:56:12 +00:00

Implement feedback on final state of firmware

Some things on update are active immediately, others are pending reboot.
Documentation needs to use this to let users know what they need to do
or not need to do after the firmware update.
This commit is contained in:
Jarrod Johnson 2017-08-14 10:04:19 -04:00
parent da0941c229
commit f7b964b2ce

View File

@ -26,8 +26,10 @@ updatesbytarget = {}
def execupdate(handler, filename, updateobj):
try:
handler(filename, progress=updateobj.handle_progress)
updateobj.handle_progress({'phase': 'complete', 'progress': 100.0})
completion = handler(filename, progress=updateobj.handle_progress)
if completion is None:
completion = 'complete'
updateobj.handle_progress({'phase': completion, 'progress': 100.0})
except Exception as e:
updateobj.handle_progress({'phase': 'error', 'progress': 0.0,
'detail': str(e)})