pyghmi 1.5.69__py3-none-any.whl → 1.5.70__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.
@@ -32,8 +32,8 @@ class EnergyManager(object):
32
32
  try:
33
33
  rsp = ipmicmd.xraw_command(netfn=0x3a, command=0x32, data=[4, 2, 0, 0, 0])
34
34
  if len(rsp['data']) >= 8:
35
- self.supportedmeters = ('DC Energy',) # 'GPU Power',
36
- # 'Node Power', 'Total Power')
35
+ self.supportedmeters = ('DC Energy', 'GPU Power',
36
+ 'Node Power', 'Total Power')
37
37
  self._mypowermeters = ('node power', 'total power', 'gpu power', 'riser 1 power', 'riser 2 power')
38
38
  self._usefapm = True
39
39
  return
@@ -67,9 +67,22 @@ class EnergyManager(object):
67
67
 
68
68
  def get_sensor(self, name, ipmicmd):
69
69
  if name.lower() not in self._mypowermeters:
70
- raise pygexc.UnsupportedFunctionality('Unrecogcized sensor')
71
- rsp = ipmicmd.xraw_command(netfn=0x3a, command=0x32, data=[4, 8, 0, 0, 0])
72
- npow, gpupow, r1pow, r2pow = struct.unpack('<HHHH', rsp['data'][6:10])
70
+ raise pygexc.UnsupportedFunctionality('Unrecognized sensor: {}'.format(name))
71
+ tries = 3
72
+ rsp = None
73
+ while tries:
74
+ tries -= 1
75
+ try:
76
+ rsp = ipmicmd.xraw_command(netfn=0x3a, command=0x32, data=[4, 8, 0, 0, 0])
77
+ break
78
+ except pygexc.IpmiException as ie:
79
+ if tries and ie.ipmicode == 0xc3:
80
+ ipmicmd.ipmi_session.pause(0.1)
81
+ continue
82
+ raise
83
+ if rsp is None:
84
+ raise pygexc.UnsupportedFunctionality('Unrecognized sensor: {}'.format(name))
85
+ npow, gpupow, r1pow, r2pow = struct.unpack('<HHHH', rsp['data'][6:14])
73
86
  if name.lower().startswith('node'):
74
87
  return npow, 'W'
75
88
  elif name.lower().startswith('gpu'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyghmi
3
- Version: 1.5.69
3
+ Version: 1.5.70
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
@@ -24,7 +24,7 @@ pyghmi/ipmi/oem/lenovo/config.py,sha256=woFD20UwZn5JjM-dBXsNW498e9_F6Sg9Z4_W7Y2Q
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
- pyghmi/ipmi/oem/lenovo/energy.py,sha256=f7_81HEq0vJFWPjb_cWuy5JNFiN2l6jZl3v2x9e_sCw,5902
27
+ pyghmi/ipmi/oem/lenovo/energy.py,sha256=THttIqlwpnj7ljbBWTHjelDLmDaQiCuMvNqJy9Ec7j8,6355
28
28
  pyghmi/ipmi/oem/lenovo/firmware.py,sha256=KS9uUBjFUzvdMw_e-kpr5sYIvFUaeg0yqyo69T94IVc,3747
29
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
@@ -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.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,,
65
+ pyghmi-1.5.70.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
66
+ pyghmi-1.5.70.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
67
+ pyghmi-1.5.70.dist-info/METADATA,sha256=qfec80M9j57DKetia0gs7CzqMTJDcCzBW-rruYdN-7A,1119
68
+ pyghmi-1.5.70.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
69
+ pyghmi-1.5.70.dist-info/entry_points.txt,sha256=WkbeJkEZzG9MOILxkaEPSEQ109YP9euntH9kcxbysuk,169
70
+ pyghmi-1.5.70.dist-info/pbr.json,sha256=E7DnB_ZOTXuWLFkKYyyr0Osn89sl1zimBHAsBojDA94,46
71
+ pyghmi-1.5.70.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
72
+ pyghmi-1.5.70.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "3673666", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "ed94d36", "is_release": true}