2
0
mirror of https://opendev.org/x/pyghmi synced 2026-05-16 19:34:21 +00:00

Tolerate more standard variations

There are more variations on key parameters, tolerate the
distinct responses consistent with existing replies of
similar purpose.

Change-Id: I22c3ecf7b78213cc9b0c1b8c88deb91251c1facd
This commit is contained in:
Jarrod Johnson
2021-06-16 08:47:53 -04:00
parent 213e5f64d8
commit 167e256fa0
3 changed files with 27 additions and 9 deletions
+6 -1
View File
@@ -771,7 +771,12 @@ class Command(object):
one byte, return the int value
"""
fetchcmd = bytearray((channel, param, 0, 0))
fetched = self.xraw_command(0xc, 2, data=fetchcmd)
try:
fetched = self.xraw_command(0xc, 2, data=fetchcmd)
except exc.IpmiException as ie:
if ie.ipmicode == 0x80:
return None
raise
fetchdata = fetched['data']
if bytearray(fetchdata)[0] != 17:
return None
+1 -1
View File
@@ -133,7 +133,7 @@ class FRU(object):
try:
self.fetch_fru(fruid)
except iexc.IpmiException as ie:
if ie.ipmicode in (203, 129):
if ie.ipmicode in (195, 201, 203, 129):
return
raise
self.parsedata()
+20 -7
View File
@@ -118,19 +118,32 @@ class OEMHandler(object):
}
yield ('System', sysinfo)
self._hwnamemap = {}
cpumemurls = []
memurl = self._varsysinfo.get('Memory', {}).get('@odata.id', None)
if memurl:
cpumemurls.append(memurl)
cpurl = self._varsysinfo.get('Processors', {}).get('@odata.id', None)
list(self._do_bulk_requests([memurl, cpurl]))
if cpurl:
cpumemurls.append(cpurl)
list(self._do_bulk_requests(cpumemurls))
adpurls = self._get_adp_urls()
cpurls = self._get_cpu_urls()
memurls = self._get_mem_urls()
if cpurl:
cpurls = self._get_cpu_urls()
else:
cpurls = []
if memurl:
memurls = self._get_mem_urls()
else:
memurls = []
diskurls = self._get_disk_urls()
allurls = adpurls + cpurls + memurls + diskurls
list(self._do_bulk_requests(allurls))
for cpu in self._get_cpu_inventory(withids=withids, urls=cpurls):
yield cpu
for mem in self._get_mem_inventory(withids=withids, urls=memurls):
yield mem
if cpurl:
for cpu in self._get_cpu_inventory(withids=withids, urls=cpurls):
yield cpu
if memurl:
for mem in self._get_mem_inventory(withids=withids, urls=memurls):
yield mem
for adp in self._get_adp_inventory(withids=withids, urls=adpurls):
yield adp
for disk in self._get_disk_inventory(withids=withids, urls=diskurls):