diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 34fb358f..704556ad 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -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: diff --git a/pyghmi/ipmi/oem/generic.py b/pyghmi/ipmi/oem/generic.py index 3cf5d2cc..c5387bde 100644 --- a/pyghmi/ipmi/oem/generic.py +++ b/pyghmi/ipmi/oem/generic.py @@ -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 diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index 6ef003cb..2e595e87 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -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