pyghmi 1.6.0__py3-none-any.whl → 1.6.1__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.
@@ -108,7 +108,8 @@ class ServerSession(ipmisession.Session):
108
108
  # ignore null username for now
109
109
  return
110
110
  self.username = bytes(data[28:])
111
- if self.username.decode('utf-8') not in self.authdata:
111
+ password = self.authdata.get(self.username.decode('utf-8'))
112
+ if password is None:
112
113
  # don't think about invalid usernames for now
113
114
  return
114
115
  uuidbytes = self.uuid.bytes
@@ -118,8 +119,7 @@ class ServerSession(ipmisession.Session):
118
119
  + self.Rm + self.Rc + uuidbytes
119
120
  + bytearray([self.rolem, len(self.username)]))
120
121
  hmacdata += self.username
121
- self.kuid = self.authdata[self.username.decode('utf-8')].encode(
122
- 'utf-8')
122
+ self.kuid = password.encode('utf-8')
123
123
  if self.kg is None:
124
124
  self.kg = self.kuid
125
125
  authcode = hmac.new(
pyghmi/redfish/command.py CHANGED
@@ -522,10 +522,8 @@ class Command(object):
522
522
  raise exc.InvalidParameterValue(
523
523
  "Unknown power state %s requested" % powerstate)
524
524
  powerstate = powerstates[powerstate]
525
- result = self.wc.grab_json_response_with_status(
525
+ self._do_web_request(
526
526
  self.powerurl, {'ResetType': powerstate})
527
- if result[1] < 200 or result[1] >= 300:
528
- raise exc.PyghmiException(result[0])
529
527
  if wait and reqpowerstate in ('on', 'off', 'softoff', 'shutdown'):
530
528
  if reqpowerstate in ('softoff', 'shutdown'):
531
529
  reqpowerstate = 'off'
@@ -846,6 +844,8 @@ class Command(object):
846
844
  self._do_web_request(url, {'ResetType': action})
847
845
 
848
846
  def set_identify(self, on=True, blink=None):
847
+ if hasattr(self.oem, 'set_identify'):
848
+ return self.oem.set_identify(on, blink)
849
849
  targurl = self.sysurl
850
850
  if not targurl:
851
851
  root = self._do_web_request('/redfish/v1')
@@ -62,6 +62,19 @@ class OEMHandler(generic.OEMHandler):
62
62
  health = healthlookup.get(health, pygconst.Health.Critical)
63
63
  return {'health': health}
64
64
 
65
+ def set_identify(self, on=True, blink=False):
66
+ if on:
67
+ state = 'On'
68
+ elif blink:
69
+ state = 'Blinking'
70
+ else:
71
+ state = 'Off'
72
+ self._do_web_request('/redfish/v1/Chassis/chassis1', {
73
+ 'Oem': {'Lenovo': {'LED': {'IdentifyLED': {
74
+ 'State': state
75
+ }}}
76
+ }}, method='PATCH')
77
+
65
78
  def get_system_configuration(self, hideadvanced=True, fishclient=None):
66
79
  return {}
67
80
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyghmi
3
- Version: 1.6.0
3
+ Version: 1.6.1
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
@@ -37,13 +37,13 @@ pyghmi/ipmi/oem/lenovo/raid_drive.py,sha256=NZoQrgipBXrxYhSXShpHkaylv9aTxwGNmv7P
37
37
  pyghmi/ipmi/private/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  pyghmi/ipmi/private/constants.py,sha256=ViuB_nXsMM5LjkT9FGf2it2KQKvEehd5cZJgewjmVds,66936
39
39
  pyghmi/ipmi/private/localsession.py,sha256=DThuwgvsAJT2AQ8byg4TA8AZG4hBBHnT-pxIJRsISCE,4879
40
- pyghmi/ipmi/private/serversession.py,sha256=X1QhlKW47zi710MHHRkjX7Agrj-RQ1nFXdV2tA0YtYg,16426
40
+ pyghmi/ipmi/private/serversession.py,sha256=H5toINVu7sEuc13MWJHVG3zqNCyMY1tYXjQ4ZOOjQfE,16411
41
41
  pyghmi/ipmi/private/session.py,sha256=276g11vswSuXxEkXaCqfBE68eStZ4KymKS5uDGHzjJQ,81797
42
42
  pyghmi/ipmi/private/simplesession.py,sha256=cNGaoT0uWIKDut6gUG9kAOX_b_qTzdB26R6I6Qk7cns,58834
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=GhGxHRUFLgXp3sEdusd2U92lJGgPnn7pUQVH7uDNsaw,61304
46
+ pyghmi/redfish/command.py,sha256=0mLgsynfiyfi_i4wtL3ZqPR6CeeHajj-azqTW7EUE3I,61278
47
47
  pyghmi/redfish/oem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  pyghmi/redfish/oem/generic.py,sha256=5RalOmcBlnvVx05sgo9xCYkTVZ8CrhKMb7pDTtuLAls,56718
49
49
  pyghmi/redfish/oem/lookup.py,sha256=pfJW5xSkUY61OirMeYy0b1SbjBFz6IDfN5ZOYog_Yq4,1530
@@ -52,7 +52,7 @@ pyghmi/redfish/oem/dell/idrac.py,sha256=pNnmqdV1sOP3ABw0xq0wF1QEO2L8onT7Osc_-sDO
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
54
  pyghmi/redfish/oem/lenovo/main.py,sha256=bnx8LuC_C4_OluNR8JSHIxtSlM4_jdBb4cUzJM6mazE,2597
55
- pyghmi/redfish/oem/lenovo/smm3.py,sha256=JnO89n59xK50MM7qKNofmLenmJ7e7rtaiuwGz-DxrNo,5598
55
+ pyghmi/redfish/oem/lenovo/smm3.py,sha256=W3PKHpFNj5Ujql-neWTH3UgYGDZXQlBvC1aRX97GV8A,5982
56
56
  pyghmi/redfish/oem/lenovo/tsma.py,sha256=6GELCuriumARj_kv7fgqtUpo9ekiWHpQcM9v_mnGILI,34645
57
57
  pyghmi/redfish/oem/lenovo/xcc.py,sha256=78ksNj2-0jquj61lmAZldy3DdcR5KndqbLQ2Y4ZSFOM,84234
58
58
  pyghmi/redfish/oem/lenovo/xcc3.py,sha256=KBJQLAIpaU32bfFzKxZ9jH7oHnGgJIBz0bMZT-TMKy8,20989
@@ -64,11 +64,11 @@ pyghmi/tests/unit/ipmi/test_sdr.py,sha256=vb3iLY0cnHJ2K_m4xgYUjEcbPd_ZYhYx-uBowB
64
64
  pyghmi/util/__init__.py,sha256=GZLBWJiun2Plb_VE9dDSh4_PQMCha3gA7QLUqx3oSYI,25
65
65
  pyghmi/util/parse.py,sha256=6VlyBCEcE8gy8PJWmEDdtCyWATaKwPaTswCdioPCWOE,2120
66
66
  pyghmi/util/webclient.py,sha256=782_yMuy_LuN9E2vh2EJ-R64X_EyvLLRuurE__jfn20,15371
67
- pyghmi-1.6.0.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
68
- pyghmi-1.6.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
69
- pyghmi-1.6.0.dist-info/METADATA,sha256=jXiO4-aURNuuFgBYbGHrNV29OfV0W8_vVh0Q9pdFtsI,1136
70
- pyghmi-1.6.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
71
- pyghmi-1.6.0.dist-info/entry_points.txt,sha256=-OpJliDzATxmuPXK0VR3Ma-Yk_i4ZhfIIB-12A26dSI,168
72
- pyghmi-1.6.0.dist-info/pbr.json,sha256=hh4S35BO_VBD-i-FKARTIoOpcIB6KZ5PAmA-FL5fLYs,46
73
- pyghmi-1.6.0.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
74
- pyghmi-1.6.0.dist-info/RECORD,,
67
+ pyghmi-1.6.1.dist-info/AUTHORS,sha256=-0iHKtdQwAJfAGKcruCnvcQXrXuE_LgBZ3P15DJI1xY,2044
68
+ pyghmi-1.6.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
69
+ pyghmi-1.6.1.dist-info/METADATA,sha256=t5NiZ7qQvKHYxH4qSU85HdVzQygxx10AKpqsUT6qk8c,1136
70
+ pyghmi-1.6.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
71
+ pyghmi-1.6.1.dist-info/entry_points.txt,sha256=-OpJliDzATxmuPXK0VR3Ma-Yk_i4ZhfIIB-12A26dSI,168
72
+ pyghmi-1.6.1.dist-info/pbr.json,sha256=WluQ4jTELF6lRCdfFuR9bmRh8RujczTU1WXGdV0F-sM,46
73
+ pyghmi-1.6.1.dist-info/top_level.txt,sha256=aDtt6S9eVu6-tNdaUs4Pz9PbdUd69bziZZMhNvk9Ulc,7
74
+ pyghmi-1.6.1.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "33cff21", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "4b5fbf5", "is_release": true}
File without changes