Write parser for inventory to sensor mapping yaml.

Write python-based parser for inventory-sensor.yaml.
The parser generates inventory-sensor-gen.cpp, which is contains a map
containing the inventory object path as key and the sensor related info
as the value.

Change-Id: Ib0e0f61f075b0ba777417a8032074c9b66b2eef7
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/scripts/inventorysensor.mako.cpp b/scripts/inventorysensor.mako.cpp
new file mode 100644
index 0000000..000f758
--- /dev/null
+++ b/scripts/inventorysensor.mako.cpp
@@ -0,0 +1,27 @@
+## This file is a template.  The comment below is emitted
+## into the rendered file; feel free to edit this file.
+
+// !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!!
+
+#include "types.hpp"
+using namespace ipmi::sensor;
+
+extern const InvObjectIDMap invSensors = {
+% for key in sensorDict.iterkeys():
+   % if key:
+{"${key}",
+    {
+<%
+       objectPath = sensorDict[key]
+       sensorID = objectPath["sensorID"]
+       sensorType = objectPath["sensorType"]
+       eventReadingType = objectPath["eventReadingType"]
+       offset = objectPath["offset"]
+%>
+        ${sensorID},${sensorType},${eventReadingType},${offset}
+    }
+},
+   % endif
+% endfor
+};
+