pyghmi 1.5.67__py3-none-any.whl → 1.5.69__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -372,7 +372,13 @@ class LenovoFirmwareConfig(object):
372
372
  if not instances:
373
373
  protect = True # not supported yet
374
374
  else:
375
- current = [x.text for x in instances]
375
+ instbynum = {}
376
+ defidx = 1
377
+ for x in instances:
378
+ xid = int(x.get('ID', defidx))
379
+ instbynum[xid] = x
380
+ defidx += 1
381
+ current = [instbynum[idx].text for idx in sorted(instbynum)]
376
382
  default = onedata.get('default', None)
377
383
  if default == '':
378
384
  default = None
@@ -1191,7 +1191,7 @@ class OEMHandler(generic.OEMHandler):
1191
1191
  if self.has_xcc:
1192
1192
  return self.immhandler.get_description()
1193
1193
  if self.is_fpc:
1194
- return {'height': self._fpc_variant, 'slot': 0}
1194
+ return {'height': self._fpc_variant & 0xf, 'slot': 0}
1195
1195
  return super(OEMHandler, self).get_description()
1196
1196
 
1197
1197
  def get_extended_bmc_configuration(self):
@@ -527,8 +527,11 @@ class SMMClient(object):
527
527
  }
528
528
  for baynum in range(numbays):
529
529
  baynum += 1
530
- baycapinfo = self.ipmicmd.xraw_command(
531
- 0x32, 0x9d, data=[baynum])
530
+ try:
531
+ baycapinfo = self.ipmicmd.xraw_command(
532
+ 0x32, 0x9d, data=[baynum])
533
+ except Exception:
534
+ continue
532
535
  capmin, capmax, protcap, usercap, thermcap = struct.unpack(
533
536
  '<HHHHH', baycapinfo['data'][retoffset:retoffset + 10])
534
537
  settings['bay{0}_user_cap'.format(baynum)] = {
@@ -543,8 +546,11 @@ class SMMClient(object):
543
546
  'help': 'Show the current protective cap for the system '
544
547
  'in bay {0}'.format(baynum)
545
548
  }
546
- baycapstate = self.ipmicmd.xraw_command(
547
- 0x32, 0xa0, data=[baynum])
549
+ try:
550
+ baycapstate = self.ipmicmd.xraw_command(
551
+ 0x32, 0xa0, data=[baynum])
552
+ except Exception:
553
+ continue
548
554
  baycapstate = bool(baycapstate['data'][retoffset])
549
555
  settings['bay{0}_user_cap_active'.format(baynum)] = {
550
556
  'value': 'Enable' if baycapstate else 'Disable',
pyghmi/ipmi/sdr.py CHANGED
@@ -469,11 +469,11 @@ class SDREntry(object):
469
469
  health = sensedata['severity']
470
470
  else:
471
471
  desc = "Unknown state %d" % state
472
- health = const.Health.Warning
472
+ health = const.Health.Ok
473
473
  except KeyError:
474
474
  desc = "Unknown state %d for reading type %d/sensor type %d" % (
475
475
  state, self.reading_type, self.sensor_type_number)
476
- health = const.Health.Warning
476
+ health = const.Health.Ok
477
477
  return desc, health
478
478
 
479
479
  def decode_sensor_reading(self, ipmicmd, reading):
@@ -781,12 +781,12 @@ class OEMHandler(object):
781
781
  def update_firmware(self, filename, data=None, progress=None, bank=None):
782
782
  usd = self._do_web_request('/redfish/v1/UpdateService')
783
783
  if usd.get('HttpPushUriTargetsBusy', False):
784
- raise pygexc.TemporaryError('Cannot run multtiple updates to '
784
+ raise exc.TemporaryError('Cannot run multtiple updates to '
785
785
  'same target concurrently')
786
786
  try:
787
787
  upurl = usd['HttpPushUri']
788
788
  except KeyError:
789
- raise pygexc.UnsupportedFunctionality('Redfish firmware update only supported for implementations with push update support')
789
+ raise exc.UnsupportedFunctionality('Redfish firmware update only supported for implementations with push update support')
790
790
  if 'HttpPushUriTargetsBusy' in usd:
791
791
  self._do_web_request(
792
792
  '/redfish/v1/UpdateService',
@@ -1646,6 +1646,11 @@ class OEMHandler(generic.OEMHandler):
1646
1646
  yield "System"
1647
1647
  for key in natural_sort(hwmap):
1648
1648
  yield key
1649
+ for cpuinv in self._get_cpu_inventory():
1650
+ yield cpuinv[0]
1651
+ for meminv in self._get_mem_inventory():
1652
+ yield meminv[0]
1653
+
1649
1654
 
1650
1655
  def get_inventory_of_component(self, compname):
1651
1656
  if compname.lower() == 'system':
@@ -1662,7 +1667,12 @@ class OEMHandler(generic.OEMHandler):
1662
1667
  try:
1663
1668
  return hwmap[compname]
1664
1669
  except KeyError:
1665
-
1670
+ for cpuinv in self._get_cpu_inventory():
1671
+ if cpuinv[0] == compname:
1672
+ return cpuinv[1]
1673
+ for meminv in self._get_mem_inventory():
1674
+ if meminv[0] == compname:
1675
+ return meminv[1]
1666
1676
  return None
1667
1677
 
1668
1678
  def get_inventory(self, withids=False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyghmi
3
- Version: 1.5.67
3
+ Version: 1.5.69
4
4
  Summary: Python General Hardware Management Initiative (IPMI and others)
5
5
  Home-page: http://github.com/openstack/pyghmi/
6
6
  Author: Jarrod Johnson
@@ -15,21 +15,21 @@ pyghmi/ipmi/command.py,sha256=1quCxG5K2jYr77JpYiGLwwOmt0xB2FPJ7T-axnMLTxU,90301
15
15
  pyghmi/ipmi/console.py,sha256=Jle7uJI3ZQS6cMwbEisFEvXjmu5MVqMs17BcAlygR_4,23369
16
16
  pyghmi/ipmi/events.py,sha256=zgUidJIARHomwxasgeYAzDO1AEMfEOzb6XVxzry22Us,22569
17
17
  pyghmi/ipmi/fru.py,sha256=sw5ZBMrEVSBDgOUPVU_ksehQMJvrl2v-r7rVyA9xoiE,14430
18
- pyghmi/ipmi/sdr.py,sha256=gXVai01amSxCO2rKOj74crMts1Hoi6pmbocWuik5sks,33009
18
+ pyghmi/ipmi/sdr.py,sha256=U4NH-ca1zwEmU_dKT2wvXY2vEvXh33dV9rIUlmf_5Xw,32999
19
19
  pyghmi/ipmi/oem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  pyghmi/ipmi/oem/generic.py,sha256=HQ-9qTYIBpZqB1K75jTOTSUsirrKAQcI8BhLx0eAJ1g,18518
21
21
  pyghmi/ipmi/oem/lookup.py,sha256=Ex00OEEolsdWCVhyP0QDGzOxHGEA7sKI8a8fW4kJPD8,3653
22
22
  pyghmi/ipmi/oem/lenovo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- pyghmi/ipmi/oem/lenovo/config.py,sha256=1Ya23kc-7k-k05oLS7tj4jPyBoDtZaGzvr2Av1C-h7c,25694
23
+ pyghmi/ipmi/oem/lenovo/config.py,sha256=woFD20UwZn5JjM-dBXsNW498e9_F6Sg9Z4_W7Y2QSuA,26005
24
24
  pyghmi/ipmi/oem/lenovo/cpu.py,sha256=POZMP9n2S1v6r8iNStkCOVEiQYs3ut3RqL_9x-kgOFw,1651
25
25
  pyghmi/ipmi/oem/lenovo/dimm.py,sha256=L8k1aBgtvxqyubDBNKdDkz80pDE8Sck1eMLcMz1GhFI,1875
26
26
  pyghmi/ipmi/oem/lenovo/drive.py,sha256=MmVgaosEwJXcwi1kKYGnY-dbrx4Zp55941qWMvprUMA,2055
27
27
  pyghmi/ipmi/oem/lenovo/energy.py,sha256=f7_81HEq0vJFWPjb_cWuy5JNFiN2l6jZl3v2x9e_sCw,5902
28
28
  pyghmi/ipmi/oem/lenovo/firmware.py,sha256=KS9uUBjFUzvdMw_e-kpr5sYIvFUaeg0yqyo69T94IVc,3747
29
- pyghmi/ipmi/oem/lenovo/handler.py,sha256=BYfzauvGTGQ0hXFjsrpUXzyVRFzXsG8hfrkzp1vDqqI,56486
29
+ pyghmi/ipmi/oem/lenovo/handler.py,sha256=deTRv4mmzV-27gmGLnF0pu_xHgnJzT3Vk2gE-f5VChg,56492
30
30
  pyghmi/ipmi/oem/lenovo/imm.py,sha256=C9kH7M3lOYW2z211Oz7KQZgiOAh6KjTjnyzZ6h_ZGeM,111156
31
31
  pyghmi/ipmi/oem/lenovo/inventory.py,sha256=FLJJinw-ibdHtf3KmrTzhWXbQrpxq3TSycVf96Hg7cw,5911
32
- pyghmi/ipmi/oem/lenovo/nextscale.py,sha256=g_PNjxPp9gS-ZaMYH-5Ng6_XURPocDZqIAXXWpmsNU4,43223
32
+ pyghmi/ipmi/oem/lenovo/nextscale.py,sha256=ojLh17M87GnKUl-3yCTJcIJca1mpcrhlc7rQmhpby3A,43407
33
33
  pyghmi/ipmi/oem/lenovo/pci.py,sha256=S7p-5Q2qu2YhlffN-LEmIvjfXim6OlfYL7Q6r6VZqJ4,2020
34
34
  pyghmi/ipmi/oem/lenovo/psu.py,sha256=ISgGe7MdLd1Z7MiRcgJ0gyC92m-4CDNmhMs-H0T3GVY,3098
35
35
  pyghmi/ipmi/oem/lenovo/raid_controller.py,sha256=hr9W17FwgpG9B544eebkEH88gOlU6M4gIapZq7WOPsw,2335
@@ -45,7 +45,7 @@ pyghmi/ipmi/private/util.py,sha256=ayYodiSydlrrt0_pQppoRB1T6n-KNOiHZSfAlCMcpG0,3
45
45
  pyghmi/redfish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  pyghmi/redfish/command.py,sha256=iUjF9d_ss1fmIW-CyPSfXQBiVABNk-4HsDUnelfa6C8,57241
47
47
  pyghmi/redfish/oem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- pyghmi/redfish/oem/generic.py,sha256=LMqj1GkjCzaNfplG6fyN1gm6hbxbT-NwcqnezoVHXVc,39742
48
+ pyghmi/redfish/oem/generic.py,sha256=1DQS9RFe7a6yWfFlcglnVLMJVaTPxdCKCPHF0ukXaOU,39736
49
49
  pyghmi/redfish/oem/lookup.py,sha256=pfJW5xSkUY61OirMeYy0b1SbjBFz6IDfN5ZOYog_Yq4,1530
50
50
  pyghmi/redfish/oem/dell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  pyghmi/redfish/oem/dell/idrac.py,sha256=pNnmqdV1sOP3ABw0xq0wF1QEO2L8onT7Osc_-sDO8EU,2146
@@ -53,7 +53,7 @@ pyghmi/redfish/oem/dell/main.py,sha256=g8773SShUpbYxXB9zVx2pD5z1xP04wB_sXAxcAs6_
53
53
  pyghmi/redfish/oem/lenovo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  pyghmi/redfish/oem/lenovo/main.py,sha256=MAJGAoOX-l5hMUiI7MXRsORPf0tGKWXWC8V1rDgb-KE,1665
55
55
  pyghmi/redfish/oem/lenovo/tsma.py,sha256=puSj0fO5Dt5VpDoEMVTRY95CP9q18eXcAqq7TDK350E,34633
56
- pyghmi/redfish/oem/lenovo/xcc.py,sha256=5GMujnFfOdYN5rR1RURNrcojtYwCHf1T61XBaMv0Sa4,81876
56
+ pyghmi/redfish/oem/lenovo/xcc.py,sha256=oRLXiGk8gdQsz6qqP79bpC_KN0lQH_qG7XVH3N6k8KQ,82294
57
57
  pyghmi/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  pyghmi/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  pyghmi/tests/unit/base.py,sha256=xWImA7zPRgfrEe2xAdRZ6w_dLwExGRBJ5CBybssUQGg,744
@@ -62,11 +62,11 @@ pyghmi/tests/unit/ipmi/test_sdr.py,sha256=vb3iLY0cnHJ2K_m4xgYUjEcbPd_ZYhYx-uBowB
62
62
  pyghmi/util/__init__.py,sha256=GZLBWJiun2Plb_VE9dDSh4_PQMCha3gA7QLUqx3oSYI,25
63
63
  pyghmi/util/parse.py,sha256=6VlyBCEcE8gy8PJWmEDdtCyWATaKwPaTswCdioPCWOE,2120
64
64
  pyghmi/util/webclient.py,sha256=jV091_s-HWNDVMKfMxB5XljqiwinQkfXJgHt1u6Umms,14526
65
- pyghmi-1.5.67.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
66
- pyghmi-1.5.67.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
67
- pyghmi-1.5.67.dist-info/METADATA,sha256=85FyzuBALT5ZJ_Bt9K6bNO8jmgjGlSvm8aPU5oxMWdg,1119
68
- pyghmi-1.5.67.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
69
- pyghmi-1.5.67.dist-info/entry_points.txt,sha256=WkbeJkEZzG9MOILxkaEPSEQ109YP9euntH9kcxbysuk,169
70
- pyghmi-1.5.67.dist-info/pbr.json,sha256=Iw5eWEgpKQjXDXguYvFnFL1LkvEU4MEJ1etQgX-OjJ8,46
71
- pyghmi-1.5.67.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
72
- pyghmi-1.5.67.dist-info/RECORD,,
65
+ pyghmi-1.5.69.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
66
+ pyghmi-1.5.69.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
67
+ pyghmi-1.5.69.dist-info/METADATA,sha256=ud2VinlMfKfHy3gvGNvfsK-56H5sZtnTTiIxGy-56EE,1119
68
+ pyghmi-1.5.69.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
69
+ pyghmi-1.5.69.dist-info/entry_points.txt,sha256=WkbeJkEZzG9MOILxkaEPSEQ109YP9euntH9kcxbysuk,169
70
+ pyghmi-1.5.69.dist-info/pbr.json,sha256=jbr7ghfXRtVi_eTr2nPBiSYKLtqLEUOFtRcYEe0bRHM,46
71
+ pyghmi-1.5.69.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
72
+ pyghmi-1.5.69.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "ed94d36", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "da7796b", "is_release": true}