1 // !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!!
2 #include <iostream>
3 #include "frup.hpp"
4 
5 extern const FruMap frus = {
6 % for key in fruDict.keys():
7    {${key},{
8 <%
9     instanceList = fruDict[key]
10 %>
11     % for instancePath,instanceInfo in instanceList.items():
12 <%
13         entityID = instanceInfo["entityID"]
14         entityInstance = instanceInfo["entityInstance"]
15         interfaces = instanceInfo["interfaces"]
16 %>
17          {${entityID}, ${entityInstance}, "${instancePath}",{
18          % for interface,properties in interfaces.items():
19              {"${interface}",{
20             % if properties:
21                 % for dbus_property,property_value in properties.items():
22                     {"${dbus_property}",{
23                         "${property_value.get("IPMIFruSection", "")}",
24                         "${property_value.get("IPMIFruProperty", "")}",\
25 <%
26     delimiter = property_value.get("IPMIFruValueDelimiter")
27     if not delimiter:
28         delimiter = ""
29     else:
30         delimiter = '\\' + hex(delimiter)[1:]
31 %>
32                      "${delimiter}"
33                  }},
34                 % endfor
35             %endif
36              }},
37          % endfor
38         }},
39     % endfor
40    }},
41 % endfor
42 };
43