diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index cde7782d..32069e15 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -1630,3 +1630,9 @@ class Command(object): """ self.oem_init() return self._oem.set_oem_capping_enabled(enable) + + def get_remote_kvm_available(self): + """Get remote KVM availability + """ + self.oem_init() + return self._oem.get_oem_remote_kvm_available() diff --git a/pyghmi/ipmi/oem/generic.py b/pyghmi/ipmi/oem/generic.py index 315b1355..9c6c2277 100644 --- a/pyghmi/ipmi/oem/generic.py +++ b/pyghmi/ipmi/oem/generic.py @@ -172,3 +172,8 @@ class OEMHandler(object): :param enable: True for enable and False for disable """ return () + + def get_oem_remote_kvm_available(self): + """Get remote KVM availability + """ + return False diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index 3ea5129f..d7e0f3a1 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -355,3 +355,9 @@ class OEMHandler(generic.OEMHandler): self.ipmicmd.xraw_command(netfn=0x3a, command=0x1a, data=(3, statecode)) return True + + def get_oem_remote_kvm_available(self): + if self.has_tsm: + rsp = self.ipmicmd.raw_command(netfn=0x3a, command=0x13) + return rsp['data'][0] == 0 + return False