2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Merge "Implement identify workaround for ThinkServer SD350"

This commit is contained in:
Jenkins 2016-08-15 14:47:01 +00:00 committed by Gerrit Code Review
commit 4508378650
3 changed files with 26 additions and 0 deletions

View File

@ -438,6 +438,12 @@ class Command(object):
:param duration: Set if wanting to request turn on for a duration
rather than indefinitely on
"""
self.oem_init()
try:
self._oem.set_identify(on, duration)
return
except exc.UnsupportedFunctionality:
pass
if duration is not None:
duration = int(duration)
if duration > 255:

View File

@ -233,6 +233,14 @@ class OEMHandler(object):
def attach_remote_media(self, imagename, username, password):
raise exc.UnsupportedFunctionality()
def set_identify(self, on, duration):
"""Provide an OEM override for set_identify
Some systems may require an override for set identify.
"""
raise exc.UnsupportedFunctionality()
def set_alert_ipv6_destination(self, ip, destination, channel):
"""Set an IPv6 alert destination

View File

@ -275,6 +275,12 @@ class OEMHandler(generic.OEMHandler):
return (self.oemid['manufacturer_id'], self.oemid['device_id'],
self.oemid['product_id']) in fpc_ids
@property
def is_sd350(self):
return (19046, 32, 13616) == (self.oemid['manufacturer_id'],
self.oemid['device_id'],
self.oemid['product_id'])
@property
def has_tsm(self):
"""True if this particular server have a TSM based service processor
@ -396,6 +402,12 @@ class OEMHandler(generic.OEMHandler):
led_status_default)
yield (name, {'status': status})
def set_identify(self, on, duration):
if on and not duration and self.is_sd350:
self.ipmicmd.xraw_command(netfn=0x3a, command=6, data=(1, 1))
else:
raise pygexc.UnsupportedFunctionality()
def process_fru(self, fru):
if fru is None:
return fru