Skip to content

Commit

Permalink
CA-390512: Improved xenapi error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Elder-Vass committed Jul 23, 2024
1 parent 54d9b4f commit eeec71f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion XSConsoleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@ def Update(self):
self.data['host']['crash_dump_sr'] = None

convertCPU = lambda cpu: self.session.xenapi.host_cpu.get_record(cpu)
self.data['host']['host_CPUs'] = list(map(convertCPU, self.data['host']['host_CPUs']))
hostCPUs = list(map(convertCPU, self.data['host']['host_CPUs']))

self.data['host']['host_CPUs'] = []
for cpu in hostCPUs:
if 'HANDLE_INVALID' in cpu:
XSLogError('xenapi host_cpu: ' + ', '.join(cpu))
else:
self.data['host']['host_CPUs'].append(cpu)

def convertPIF(inPIF):
retVal = self.session.xenapi.PIF.get_record(inPIF)
Expand Down

0 comments on commit eeec71f

Please sign in to comment.