pyghmi 1.5.69__py3-none-any.whl → 1.5.70__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyghmi/ipmi/oem/lenovo/energy.py +18 -5
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/METADATA +1 -1
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/RECORD +9 -9
- pyghmi-1.5.70.dist-info/pbr.json +1 -0
- pyghmi-1.5.69.dist-info/pbr.json +0 -1
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/AUTHORS +0 -0
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/LICENSE +0 -0
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/WHEEL +0 -0
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/entry_points.txt +0 -0
- {pyghmi-1.5.69.dist-info → pyghmi-1.5.70.dist-info}/top_level.txt +0 -0
pyghmi/ipmi/oem/lenovo/energy.py
CHANGED
@@ -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',
|
36
|
-
|
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('
|
71
|
-
|
72
|
-
|
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'):
|
@@ -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=
|
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.
|
66
|
-
pyghmi-1.5.
|
67
|
-
pyghmi-1.5.
|
68
|
-
pyghmi-1.5.
|
69
|
-
pyghmi-1.5.
|
70
|
-
pyghmi-1.5.
|
71
|
-
pyghmi-1.5.
|
72
|
-
pyghmi-1.5.
|
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}
|
pyghmi-1.5.69.dist-info/pbr.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"git_version": "ed94d36", "is_release": true}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|