From 9c11894eb919034fb7841520aea3f476783a85c6 Mon Sep 17 00:00:00 2001 From: Jaghathiswari Rankappagounder Natarajan Date: Tue, 12 Feb 2019 13:22:55 -0800 Subject: Add support for Entity Association Record Adding support for Entity Association Record (SDR type - 0x08h) This patch includes: 1) Entity Association Record yaml file example 2) Entity Assocation Record related script and mako file changes 3) Adding Entity Association Record in get_sdr IPMI command response From the host, tested that entity association records can be fetched Change-Id: I9cf598e5d27d2e8c6751bbaae2176e7c976974b1 Tested: Yes Signed-off-by: Jaghathiswari Rankappagounder Natarajan --- scripts/writeentity.mako.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/writeentity.mako.cpp (limited to 'scripts/writeentity.mako.cpp') diff --git a/scripts/writeentity.mako.cpp b/scripts/writeentity.mako.cpp new file mode 100644 index 0000000..9de11a0 --- /dev/null +++ b/scripts/writeentity.mako.cpp @@ -0,0 +1,34 @@ +## 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 EntityInfoMap entities = { +% for key in entityDict.iterkeys(): +{${key},{ +<% + entity = entityDict[key] + containerEntityId = entity["containerEntityId"] + containerEntityInstance = entity["containerEntityInstance"] + isList = entity["isList"] + isLinked = entity["isLinked"] + entityId1 = entity["entityId1"] + entityInstance1 = entity["entityInstance1"] + entityId2 = entity["entityId2"] + entityInstance2 = entity["entityInstance2"] + entityId3 = entity["entityId3"] + entityInstance3 = entity["entityInstance3"] + entityId4 = entity["entityId4"] + entityInstance4 = entity["entityInstance4"] +%> + ${containerEntityId},${containerEntityInstance},${isList},${isLinked},{ + std::make_pair(${entityId1}, ${entityInstance1}), + std::make_pair(${entityId2}, ${entityInstance2}), + std::make_pair(${entityId3}, ${entityInstance3}), + std::make_pair(${entityId4}, ${entityInstance4}) } + +}}, +% endfor +}; -- cgit v1.2.1