From 003309731e2e1dbf22b85d8691357177747846f4 Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Fri, 19 Jan 2018 16:23:10 +0530 Subject: Inventory:- making changes in the mako and the C++ structure As fru yaml would be having extra properties like entityID,entityInstance so changes were needed to make the change in the corresponding c++ structure. Change-Id: I314d1556cf07a3e212996615c1cd2f28fb6d9bba Signed-off-by: Ratan Gupta --- scripts/readfru.mako.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'scripts/readfru.mako.cpp') diff --git a/scripts/readfru.mako.cpp b/scripts/readfru.mako.cpp index 061b4e0..57265be 100644 --- a/scripts/readfru.mako.cpp +++ b/scripts/readfru.mako.cpp @@ -6,17 +6,22 @@ extern const FruMap frus = { % for key in fruDict.keys(): {${key},{ <% - fru = fruDict[key] + instanceList = fruDict[key] %> - % for object,interfaces in fru.items(): - {"${object}",{ + % for instancePath,instanceInfo in instanceList.items(): +<% + entityID = instanceInfo["entityID"] + entityInstance = instanceInfo["entityInstance"] + interfaces = instanceInfo["interfaces"] +%> + {${entityID}, ${entityInstance}, "${instancePath}",{ % for interface,properties in interfaces.items(): {"${interface}",{ % if properties: % for dbus_property,property_value in properties.items(): {"${dbus_property}",{ "${property_value.get("IPMIFruSection", "")}", - "${property_value.get("IPMIFruProperty", "")}", \ + "${property_value.get("IPMIFruProperty", "")}",\ <% delimiter = property_value.get("IPMIFruValueDelimiter") if not delimiter: -- cgit v1.2.1