diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-04 23:24:44 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-04 23:29:19 +0530 |
commit | c19c054c01b7a42c24cdf38a270b33f56290abf3 (patch) | |
tree | facd1c74c94462dac182ba1552a17c5ac13c741c /scripts/writefru.mako.cpp | |
parent | 9606ba3efe9d61458ad2ede6f0639856d580ef7e (diff) | |
download | ipmi-fru-parser-c19c054c01b7a42c24cdf38a270b33f56290abf3.tar.gz ipmi-fru-parser-c19c054c01b7a42c24cdf38a270b33f56290abf3.zip |
Inventory:- Make changes in the mako and the C++ structure
This change lies in the Write Fru Data command processing.
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: If23bb12563cdef34438746e2d6a8be7f54b7486d
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'scripts/writefru.mako.cpp')
-rw-r--r-- | scripts/writefru.mako.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/writefru.mako.cpp b/scripts/writefru.mako.cpp index 0a0a14f..a3de4b5 100644 --- a/scripts/writefru.mako.cpp +++ b/scripts/writefru.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: |