summaryrefslogtreecommitdiffstats
path: root/scripts/writesensor.mako.cpp
diff options
context:
space:
mode:
authorDhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>2017-08-22 07:40:27 -0500
committerDhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>2017-10-11 04:28:11 -0500
commite84841ce7e833d527709c557e9e25829f4e3893c (patch)
treed4b3ce2d8a849da1b9b64f2ee3446fce0bd28277 /scripts/writesensor.mako.cpp
parentd12ae758516436376bb3b918671acc49a2c630ff (diff)
downloadphosphor-host-ipmid-e84841ce7e833d527709c557e9e25829f4e3893c.tar.gz
phosphor-host-ipmid-e84841ce7e833d527709c557e9e25829f4e3893c.zip
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>
Diffstat (limited to 'scripts/writesensor.mako.cpp')
-rw-r--r--scripts/writesensor.mako.cpp15
1 files changed, 14 insertions, 1 deletions
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 @@ extern const IdInfoMap sensors = {
<% 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":
OpenPOWER on IntegriCloud