inventory: enable updating extra properties

While the IPMI FRU parser, in order to update inventory, receives
most properties from the host IPMI, there could be some properties
whose values could be provided by other sources, such as the Machine
Readable Workbook.

Provide a mechanism to enable the above by having the extra property
information and values supplied via a YAML file, via which code is
generated, which in turn can be used by the parser to update inventory.

Change-Id: I30a2a9129d97485a0c31c3dec0155d5e1a008101
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/scripts/extra-properties.mako.cpp b/scripts/extra-properties.mako.cpp
new file mode 100644
index 0000000..03c730a
--- /dev/null
+++ b/scripts/extra-properties.mako.cpp
@@ -0,0 +1,24 @@
+## This file is a template.  The comment below is emitted
+## into the rendered file; feel free to edit this file.
+// WARNING: Generated source. Do not edit!
+
+#include "types.hpp"
+
+using namespace ipmi::vpd;
+
+extern const std::map<Path, InterfaceMap> extras = {
+% for path in dict.iterkeys():
+<%
+    interfaces = dict[path]
+%>\
+    {"${path}",{
+    % for interface,properties in interfaces.iteritems():
+        {"${interface}",{
+        % for property,value in properties.iteritems():
+            {"${property}", ${value}},
+        % endfor
+        }},
+    % endfor
+    }},
+% endfor
+};