From 92771354aa3d34539b8a143f8def302e1035898e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 23 Jan 2020 15:59:50 -0500 Subject: [PATCH] Show True and False as choices for booleans Boolean settings inherently have choices to offer, enumerate them for better help text. Change-Id: Ibce17930f151244eaae0bc02759757c2070627cc --- pyghmi/redfish/command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index 40f903cb..d2b75619 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -918,6 +918,9 @@ class Command(object): defaultval, defaultval) if attr['Type'] == 'Integer' and defaultval: defaultval = int(defaultval) + if attr['Type'] == 'Boolean': + vals = [{'ValueDisplayName': 'True'}, + {'ValueDisplayName': 'False'}] addon[attr['AttributeName']] = { 'default': defaultval, 'help': attr.get('HelpText', None),