mirror of
https://opendev.org/x/pyghmi
synced 2026-11-30 14:22:15 +00:00
Add SMM3 identify light manipulation
The SMM3 owing to not having a 'System' places identify in an Oem location. Change-Id: I741991a92c701ff951eaff91f2e7d26a6211875d
This commit is contained in:
@@ -846,6 +846,8 @@ class Command(object):
|
||||
self._do_web_request(url, {'ResetType': action})
|
||||
|
||||
def set_identify(self, on=True, blink=None):
|
||||
if hasattr(self.oem, 'set_identify'):
|
||||
return self.oem.set_identify(on, blink)
|
||||
targurl = self.sysurl
|
||||
if not targurl:
|
||||
root = self._do_web_request('/redfish/v1')
|
||||
|
||||
@@ -62,6 +62,19 @@ class OEMHandler(generic.OEMHandler):
|
||||
health = healthlookup.get(health, pygconst.Health.Critical)
|
||||
return {'health': health}
|
||||
|
||||
def set_identify(self, on=True, blink=False):
|
||||
if on:
|
||||
state = 'On'
|
||||
elif blink:
|
||||
state = 'Blinking'
|
||||
else:
|
||||
state = 'Off'
|
||||
self._do_web_request('/redfish/v1/Chassis/chassis1', {
|
||||
'Oem': {'Lenovo': {'LED': {'IdentifyLED': {
|
||||
'State': state
|
||||
}}}
|
||||
}}, method='PATCH')
|
||||
|
||||
def get_system_configuration(self, hideadvanced=True, fishclient=None):
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user