From 7eb6fab3489a8093909832fdfb4921f707a09f76 Mon Sep 17 00:00:00 2001 From: Jarrod Johnon Date: Fri, 14 Nov 2014 14:49:12 -0500 Subject: [PATCH] Implement retrieval of uefi flag in boot devs While pyghmi supported the setting of the parameter, it did not support the retrieval for the data. Remedy this senseless asymmetry. Change-Id: Ib26412e012d08b39df7b6997a1f929d4277219f9 --- pyghmi/ipmi/command.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index b8f66fb1..1283722d 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -145,14 +145,21 @@ class Command(object): return {'bootdev': 'default', 'persistent': True} else: # will consult data2 of the boot flags parameter for the data persistent = False + uefimode = False if response['data'][2] & 0b1000000: persistent = True + if response['data'][2] & 0b100000: + uefimode = True bootnum = (response['data'][3] & 0b111100) >> 2 bootdev = boot_devices.get(bootnum) if bootdev: - return {'bootdev': bootdev, 'persistent': persistent} + return {'bootdev': bootdev, + 'persistent': persistent, + 'uefimode': uefimode} else: - return {'bootdev': bootnum, 'persistent': persistent} + return {'bootdev': bootnum, + 'persistent': persistent, + 'uefimode': uefimode} def set_power(self, powerstate, wait=False): """Request power state change