From f7b964b2ce42d8c5cb6707cd571cca5eeadb2ff7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Aug 2017 10:04:19 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/firmwaremanager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/firmwaremanager.py b/confluent_server/confluent/firmwaremanager.py index 25acc280..6fc5c91a 100644 --- a/confluent_server/confluent/firmwaremanager.py +++ b/confluent_server/confluent/firmwaremanager.py @@ -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)})