summaryrefslogtreecommitdiffstats
path: root/scripts/writefru.mako.cpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-02-10 15:59:31 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-02-14 22:51:34 +0530
commit6eed4032cb2b08a8b9d41329fc3553a65269cbde (patch)
tree910352e3d3726b4f86c39d7b5bfee166439987a1 /scripts/writefru.mako.cpp
parent19c617b7dbbcb065b1a283e184310f60096ff180 (diff)
downloadipmi-fru-parser-6eed4032cb2b08a8b9d41329fc3553a65269cbde.tar.gz
ipmi-fru-parser-6eed4032cb2b08a8b9d41329fc3553a65269cbde.zip
Create the generated FRU Map in cpp.
Change-Id: Id83220e5e2876f4112ba76d698b2062e2a08dd3d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'scripts/writefru.mako.cpp')
-rw-r--r--scripts/writefru.mako.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/writefru.mako.cpp b/scripts/writefru.mako.cpp
new file mode 100644
index 0000000..7573862
--- /dev/null
+++ b/scripts/writefru.mako.cpp
@@ -0,0 +1,28 @@
+// !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!!
+#include <iostream>
+#include "frup.hpp"
+
+extern const FruMap frus = {
+% for key in fruDict.iterkeys():
+ {${key},{
+<%
+ fru = fruDict[key]
+%>
+ % for object,interfaces in fru.iteritems():
+ {"${object}",{
+ % for interface,properties in interfaces.iteritems():
+ {"${interface}",{
+ % for dbus_property,property_value in properties.iteritems():
+ {"${dbus_property}",{
+ % for name,value in property_value.iteritems():
+ {"${name}","${value}"},
+ % endfor
+ }},
+ % endfor
+ }},
+ % endfor
+ }},
+ % endfor
+ }},
+% endfor
+};
OpenPOWER on IntegriCloud