Use knob->prompt for DisplayName in BiosAttributeRegistry
GET on /redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry/
shows list of Attributes under RegistryEntries. Each attribute
corresponds to a knob in BIOS.
DisplayName is currently filled with knob->name but knob->prompt is more
accurate for DisplayName as that is the name we see in EDKII menu.
Code changes makes the above mentioned fix.
Tested
Sample knobs from BIOS.
<knob name="ADDDCEn" prompt="ADDDC Sparing" ... >
<options>
<option text="Disable" value="0x0"/>
<option text="Enable" value="0x1"/>
</options>
</knob>
Corresponding Redfish response in BiosAttributeRegistry
{
"AttributeName": "ADDDCEn",
"CurrentValue": "0x00",
"DefaultValue": "0x00",
"DisplayName": "ADDDC Sparing",
"HelpText": "Enable/Disable ADDDC Sparing",
"MenuPath": "./",
"ReadOnly": false,
"Type": "Enumeration",
"Value": [
{
"ValueDisplayName": "Disable",
"ValueName": "0x0"
},
{
"ValueDisplayName": "Enable",
"ValueName": "0x1"
}
]
}
Change-Id: I6ee251e32169cecb4d86436373397054863552b5
Signed-off-by: Arun Lal K M <arun.lal@intel.com>
diff --git a/include/biosxml.hpp b/include/biosxml.hpp
index f11d42a..1936a01 100644
--- a/include/biosxml.hpp
+++ b/include/biosxml.hpp
@@ -686,7 +686,7 @@
bios::BiosBaseTableTypeEntry baseTableEntry = std::make_tuple(
"xyz.openbmc_project.BIOSConfig.Manager.AttributeType."
"Enumeration",
- false, knob.nameStr, knob.descriptionStr, "./",
+ false, knob.promptStr, knob.descriptionStr, "./",
knob.currentValStr, knob.defaultStr, options);
baseTable.emplace(knob.nameStr, baseTableEntry);