summaryrefslogtreecommitdiffstats
path: root/scripts/readfru.mako.cpp
blob: 57265be66cc42f28b56f7c55aa3e7b3bd1059162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!!
#include <iostream>
#include "fruread.hpp"

extern const FruMap frus = {
% for key in fruDict.keys():
   {${key},{
<%
    instanceList = fruDict[key]
%>
    % 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", "")}",\
<%
    delimiter = property_value.get("IPMIFruValueDelimiter")
    if not delimiter:
        delimiter = ""
    else:
        delimiter = '\\' + hex(delimiter)[1:]
%>
                     "${delimiter}"
                 }},
                % endfor
            %endif
             }},
         % endfor
        }},
    % endfor
   }},
% endfor
};
OpenPOWER on IntegriCloud