From ac5bdc9c7123df08bfab68b4d74d9b1814da5a0e Mon Sep 17 00:00:00 2001 From: Allan Vidal Date: Fri, 30 Oct 2015 11:29:44 -0200 Subject: [PATCH] Add device ID fields to FRU 0 Change-Id: I4287d7a7732ffff00e708c05485d5b0afb37fd2d --- pyghmi/ipmi/command.py | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 0bebaa7b..3cc1f45b 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -145,6 +145,19 @@ class Command(object): """ return session.Session.wait_for_rsp(timeout=timeout) + def _get_device_id(self): + response = self.raw_command(netfn=0x06, command=0x01) + if 'error' in response: + raise exc.IpmiException(response['error'], code=response['code']) + return { + 'device_id': response['data'][0], + 'device_revision': response['data'][1] & 0b1111, + 'manufacturer_id': struct.unpack( + '