From 4350b50afd6ac14ae6222a8dde2c8c0de3eb6c0f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 25 Jul 2019 10:04:25 -0400 Subject: [PATCH] Better error message on no License for XCC The XCC manifests inadequate license in listing fewer slots. Provide a more descriptive error message. Change-Id: I27c77dfee700fc288af8bd5c6b7df65ec64616d1 --- pyghmi/redfish/oem/lenovo/xcc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index e9fa9b87..eeaae271 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -438,6 +438,9 @@ class OEMHandler(generic.OEMHandler): self._do_web_request(vmurl, {'Image': url, 'Inserted': True}, 'PATCH') raise pygexc.BypassGenericBehavior() break + else: + raise pygexc.InvalidParameterValue( + 'XCC does not have required license for operation') def upload_media(self, filename, progress=None): xid = random.randint(0, 1000000000)