diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2018-01-19 16:23:10 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-12 14:24:33 +0530 |
commit | 003309731e2e1dbf22b85d8691357177747846f4 (patch) | |
tree | afafbca763f0dbbc4fdc1f244ea90da06c1ef27b /scripts/readfru.mako.cpp | |
parent | d211702b0c149fc548825f1d1066eb8c73993377 (diff) | |
download | phosphor-host-ipmid-003309731e2e1dbf22b85d8691357177747846f4.tar.gz phosphor-host-ipmid-003309731e2e1dbf22b85d8691357177747846f4.zip |
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 <ratagupt@in.ibm.com>
Diffstat (limited to 'scripts/readfru.mako.cpp')
-rw-r--r-- | scripts/readfru.mako.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
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: |