2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-28 11:57:34 +00:00

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
This commit is contained in:
Jarrod Johnson 2019-07-25 10:04:25 -04:00
parent 142ff10cb2
commit 4350b50afd

View File

@ -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)