From d34945846ebba5fd2d36bf4f60255b44a9ccebba Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 3 Dec 2019 11:38:10 -0500 Subject: [PATCH] Provide better error on XCC 109 The 109 error code means the file was not recognized, which can mean the file is incorrect or that the update provided is not one that supports remote update. Change-Id: I4437916b5812b9cb0dfb9e92460a2f8a7c850849 --- pyghmi/ipmi/oem/lenovo/imm.py | 2 ++ pyghmi/redfish/oem/lenovo/xcc.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 9f1592ef..d7f603be 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1665,6 +1665,8 @@ class XCCClient(IMMClient): raise Exception('Update image not intended for this system') elif rsp.get('return', -1) == 108: raise Exception('Temporary error validating update, try again') + elif rsp.get('return', -1) == 109: + raise Exception('Invalid update file or component does not support remote update') elif rsp.get('return', -1) != 0: errmsg = repr(rsp) if rsp else self.wc.lastjsonerror raise Exception('Unexpected return to verify: ' + errmsg) diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index 59bbb950..7529394a 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -565,6 +565,8 @@ class OEMHandler(generic.OEMHandler): raise Exception('Update image not intended for this system') elif rsp.get('return', -1) == 108: raise Exception('Temporary error validating update, try again') + elif rsp.get('return', -1) == 109: + raise Exception('Invalid update file or component does not support remote update') elif rsp.get('return', -1) != 0: errmsg = repr(rsp) if rsp else self.wc.lastjsonerror raise Exception('Unexpected return to verify: ' + errmsg)