pyghmi 1.5.65__py3-none-any.whl → 1.5.67__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.
@@ -115,6 +115,9 @@ class OEMHandler(object):
115
115
  if len(extenv) > 1:
116
116
  raise Exception('TODO: how to deal with multiple external environments')
117
117
  self._inlet_name = extenv[0]
118
+ if not self._inlet_name:
119
+ raise exc.UnsupportedFunctionality(
120
+ 'Unable to detect inlet sensor name for this platform')
118
121
  return ipmicmd.get_sensor_reading(self._inlet_name)
119
122
 
120
123
  def process_event(self, event, ipmicmd, seldata):
@@ -2062,13 +2062,18 @@ class XCCClient(IMMClient):
2062
2062
  complete = False
2063
2063
  phase = "apply"
2064
2064
  statetype = 'TaskState'
2065
- while not complete:
2065
+ # sometimes we get an empty pgress when transitioning from the apply phase to
2066
+ # the validating phase; add a retry here so we don't exit the loop in this case
2067
+ retry = 3
2068
+ while not complete and retry > 0:
2066
2069
  pgress, status = self.grab_redfish_response_with_status(
2067
2070
  monitorurl)
2068
2071
  if status < 200 or status >= 300:
2069
2072
  raise Exception(pgress)
2070
2073
  if not pgress:
2071
- break
2074
+ retry -= 1
2075
+ ipmisession.Session.pause(3)
2076
+ continue
2072
2077
  for msg in pgress.get('Messages', []):
2073
2078
  if 'Verify failed' in msg.get('Message', ''):
2074
2079
  raise Exception(msg['Message'])
pyghmi/redfish/command.py CHANGED
@@ -1153,6 +1153,8 @@ class Command(object):
1153
1153
  chassisurl = chassis['@odata.id']
1154
1154
  chassisinfo = self._do_web_request(chassisurl)
1155
1155
  envurl = chassisinfo.get('EnvironmentMetrics', {}).get('@odata.id', '')
1156
+ if not envurl:
1157
+ return {}
1156
1158
  envmetric = self._do_web_request(envurl, cache=1)
1157
1159
  retval = {
1158
1160
  'watts': envmetric.get('PowerWatts', {}).get('Reading', None),
@@ -1180,16 +1182,24 @@ class Command(object):
1180
1182
 
1181
1183
  def get_system_power_watts(self):
1182
1184
  totalwatts = 0
1185
+ gotpower = False
1183
1186
  for chassis in self.sysinfo.get('Links', {}).get('Chassis', []):
1184
1187
  envinfo = self._get_chassis_env(chassis)
1185
- totalwatts += envinfo['watts']
1188
+ currwatts = envinfo.get('watts', None)
1189
+ if currwatts is not None:
1190
+ gotpower = True
1191
+ totalwatts += envinfo['watts']
1192
+ if not gotpower:
1193
+ raise exc.UnsupportedFunctionality("System does not provide Power under redfish EnvironmentMetrics")
1186
1194
  return totalwatts
1187
1195
 
1188
1196
  def get_inlet_temperature(self):
1189
1197
  inlets = []
1190
1198
  for chassis in self.sysinfo.get('Links', {}).get('Chassis', []):
1191
1199
  envinfo = self._get_chassis_env(chassis)
1192
- inlets.append(envinfo['inlet'])
1200
+ currinlet = envinfo.get('inlet', None)
1201
+ if currinlet:
1202
+ inlets.append(currinlet)
1193
1203
  if inlets:
1194
1204
  val = sum(inlets) / len(inlets)
1195
1205
  unavail = False
@@ -820,10 +820,15 @@ class OEMHandler(object):
820
820
  complete = False
821
821
  phase = "apply"
822
822
  statetype = 'TaskState'
823
- while not complete:
823
+ # sometimes we get an empty pgress when transitioning from the apply phase to
824
+ # the validating phase; add a retry here so we don't exit the loop in this case
825
+ retry = 3
826
+ while not complete and retry > 0:
824
827
  pgress = self._do_web_request(monitorurl, cache=False)
825
828
  if not pgress:
826
- break
829
+ retry -= 1
830
+ time.sleep(3)
831
+ continue
827
832
  for msg in pgress.get('Messages', []):
828
833
  if 'Verify failed' in msg.get('Message', ''):
829
834
  raise Exception(msg['Message'])
@@ -23,7 +23,7 @@ def get_handler(sysinfo, sysurl, webclient, cache, cmd):
23
23
  bmcinfo = cmd.bmcinfo
24
24
  if 'Ami' in bmcinfo.get('Oem', {}):
25
25
  return tsma.TsmHandler(sysinfo, sysurl, webclient, cache)
26
- if 'FrontPanelUSB' in leninf or sysinfo.get('SKU', '').startswith('7X58'):
26
+ if 'FrontPanelUSB' in leninf or 'USBManagementPortAssignment' in leninf or sysinfo.get('SKU', '').startswith('7X58'):
27
27
  return xcc.OEMHandler(sysinfo, sysurl, webclient, cache,
28
28
  gpool=cmd._gpool)
29
29
  else:
@@ -1278,10 +1278,15 @@ class OEMHandler(generic.OEMHandler):
1278
1278
  complete = False
1279
1279
  phase = "apply"
1280
1280
  statetype = 'TaskState'
1281
- while not complete:
1281
+ # sometimes we get an empty pgress when transitioning from the apply phase to
1282
+ # the validating phase; add a retry here so we don't exit the loop in this case
1283
+ retry = 3
1284
+ while not complete and retry > 0:
1282
1285
  pgress = self._do_web_request(monitorurl, cache=False)
1283
1286
  if not pgress:
1284
- break
1287
+ retry -= 1
1288
+ time.sleep(3)
1289
+ continue
1285
1290
  for msg in pgress.get('Messages', []):
1286
1291
  if 'Verify failed' in msg.get('Message', ''):
1287
1292
  raise Exception(msg['Message'])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyghmi
3
- Version: 1.5.65
3
+ Version: 1.5.67
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
@@ -17,7 +17,7 @@ pyghmi/ipmi/events.py,sha256=zgUidJIARHomwxasgeYAzDO1AEMfEOzb6XVxzry22Us,22569
17
17
  pyghmi/ipmi/fru.py,sha256=sw5ZBMrEVSBDgOUPVU_ksehQMJvrl2v-r7rVyA9xoiE,14430
18
18
  pyghmi/ipmi/sdr.py,sha256=gXVai01amSxCO2rKOj74crMts1Hoi6pmbocWuik5sks,33009
19
19
  pyghmi/ipmi/oem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- pyghmi/ipmi/oem/generic.py,sha256=N-e-bfRxrxocTte9YqwLBDv65pbthn7h0_a15NlQ_Zc,18365
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
23
  pyghmi/ipmi/oem/lenovo/config.py,sha256=1Ya23kc-7k-k05oLS7tj4jPyBoDtZaGzvr2Av1C-h7c,25694
@@ -27,7 +27,7 @@ pyghmi/ipmi/oem/lenovo/drive.py,sha256=MmVgaosEwJXcwi1kKYGnY-dbrx4Zp55941qWMvprU
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
29
  pyghmi/ipmi/oem/lenovo/handler.py,sha256=BYfzauvGTGQ0hXFjsrpUXzyVRFzXsG8hfrkzp1vDqqI,56486
30
- pyghmi/ipmi/oem/lenovo/imm.py,sha256=BlbpEFABuBDmHQwjwoxtH1TXQETLrM9oQI0AT0BsaqY,110855
30
+ pyghmi/ipmi/oem/lenovo/imm.py,sha256=C9kH7M3lOYW2z211Oz7KQZgiOAh6KjTjnyzZ6h_ZGeM,111156
31
31
  pyghmi/ipmi/oem/lenovo/inventory.py,sha256=FLJJinw-ibdHtf3KmrTzhWXbQrpxq3TSycVf96Hg7cw,5911
32
32
  pyghmi/ipmi/oem/lenovo/nextscale.py,sha256=g_PNjxPp9gS-ZaMYH-5Ng6_XURPocDZqIAXXWpmsNU4,43223
33
33
  pyghmi/ipmi/oem/lenovo/pci.py,sha256=S7p-5Q2qu2YhlffN-LEmIvjfXim6OlfYL7Q6r6VZqJ4,2020
@@ -43,17 +43,17 @@ pyghmi/ipmi/private/simplesession.py,sha256=cNGaoT0uWIKDut6gUG9kAOX_b_qTzdB26R6I
43
43
  pyghmi/ipmi/private/spd.py,sha256=oEPSXm19X2eNXDiyW_6fVjBFqhuuMAtBI9quRJgclH4,27094
44
44
  pyghmi/ipmi/private/util.py,sha256=ayYodiSydlrrt0_pQppoRB1T6n-KNOiHZSfAlCMcpG0,3847
45
45
  pyghmi/redfish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- pyghmi/redfish/command.py,sha256=IlaWqtXwAaqk6Iaz0OHvUx5rcG5aYzanWv1gk7gAnUc,56834
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=-Xf1Fs9NcFI9xVEZTiHUFFaRVT-h1Z4BsAYtMQN5vVc,39456
48
+ pyghmi/redfish/oem/generic.py,sha256=LMqj1GkjCzaNfplG6fyN1gm6hbxbT-NwcqnezoVHXVc,39742
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
52
52
  pyghmi/redfish/oem/dell/main.py,sha256=g8773SShUpbYxXB9zVx2pD5z1xP04wB_sXAxcAs6_xY,793
53
53
  pyghmi/redfish/oem/lenovo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- pyghmi/redfish/oem/lenovo/main.py,sha256=eaCoePPXAw78BjKj9Ht7cqiXVGlj26Effy5_ybCnVDY,1622
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=DLqiuEUBaO7BZQMxVZTTgCS-u6vNEEghUDb4wwAcxpE,81590
56
+ pyghmi/redfish/oem/lenovo/xcc.py,sha256=5GMujnFfOdYN5rR1RURNrcojtYwCHf1T61XBaMv0Sa4,81876
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.65.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
66
- pyghmi-1.5.65.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
67
- pyghmi-1.5.65.dist-info/METADATA,sha256=ZNX61VjOm32qzSrWqQF76o_SOLgE3SA3yMD73N8-NwA,1119
68
- pyghmi-1.5.65.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
69
- pyghmi-1.5.65.dist-info/entry_points.txt,sha256=WkbeJkEZzG9MOILxkaEPSEQ109YP9euntH9kcxbysuk,169
70
- pyghmi-1.5.65.dist-info/pbr.json,sha256=CYi4Dpt9j2SFofUDJXnxd44WWOg9EKlNN11swDMFH3k,46
71
- pyghmi-1.5.65.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
72
- pyghmi-1.5.65.dist-info/RECORD,,
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,,
@@ -0,0 +1 @@
1
+ {"git_version": "da7796b", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "3f38530", "is_release": true}