IPMI changes to skip updating non present cores

Cores which are not present need not to be updated
to inventory. This change is for skipping several
updates to inventory based on skipOn value.

Change-Id: I29e005a715ccae1df6eeaf35561a20896ecde0ac
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index 5cc024e..9cd4e48 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -73,8 +73,21 @@
 <%                          continue %>\
                         % endif
 <%                          valueType = values["type"] %>\
+<%
+try:
+    skip = values["skipOn"]
+    if skip == "assert":
+         skipVal = "SkipAssertion::ASSERT"
+    elif skip == "deassert":
+         skipVal = "SkipAssertion::DEASSERT"
+    else:
+         assert "Unknown skip value " + str(skip)
+except KeyError, e:
+    skipVal = "SkipAssertion::NONE"
+%>\
+                            ${skipVal},
                     % for name,value in values.items():
-                        % if name == "type":
+                        % if name == "type" or name == "skipOn":
 <%                          continue %>\
                         % endif
                         % if valueType == "string":