From 40af456196c8d24200340d5fdd276500332c5adf Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 13 Sep 2017 11:49:39 -0400 Subject: [PATCH] Get UUID of ThinkSystem D2 enclosures If a ThinkSystem server is in a D2 enclosure, get the UUID of the enclosure. Change-Id: I3e2cf4b76306a2a7fce4fb655fc14c4c38306e84 --- pyghmi/ipmi/oem/lenovo/imm.py | 12 ++++++++++++ tox.ini | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 262b6f6e..921e5db9 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -21,11 +21,20 @@ import pyghmi.ipmi.private.session as ipmisession import pyghmi.ipmi.private.util as util import pyghmi.util.webclient as webclient import random +import struct import threading import urllib import weakref +def fixup_uuid(uuidprop): + baduuid = ''.join(uuidprop.split()) + uuidprefix = (baduuid[:8], baduuid[8:12], baduuid[12:16]) + a = struct.pack('