vpd source: enable choosing one of many keywords
Invert the property,keyword map. For example, change MACAddress: VINI,B1
to VINI,B1: MACAddress. Change the mako template to handle this.
This will allow us to pick VPD information from one of many
record/keyword combinations that can source an individual property.
Change-Id: I9785652addb88388751fd9f031f8e96e6d7d9df1
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/writefru.mako.hpp b/writefru.mako.hpp
index 7bbd079..e27005f 100755
--- a/writefru.mako.hpp
+++ b/writefru.mako.hpp
@@ -55,10 +55,13 @@
% for name, value in properties.iteritems():
% if fru and interface and name and value:
<%
- record, keyword = value.split(",")
+ record, keyword = name.split(",")
%>\
- ${intfName}Props["${name}"] =
- vpdStore.get<Record::${record}, record::Keyword::${keyword}>();
+ if (vpdStore.exists<Record::${record}, record::Keyword::${keyword}>())
+ {
+ ${intfName}Props["${value}"] =
+ vpdStore.get<Record::${record}, record::Keyword::${keyword}>();
+ }
% endif
% endfor
// Check and update extra properties