Make containerId optional in the event json file
During the PDR exchange, normalization causes the container IDs of
remote entities to change. Therefore, checking for a predefined
container ID from a remote terminus for sensor events does not provide
any benefit. This commit adds support for optionally skipping the check
for remote container id for sensor events when needed.
Tested:
Unit tests passed.
Change-Id: I871044815194b7aed507c105ae04f1418e084de1
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index f6a1a04..352a2e4 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -888,9 +888,9 @@
entityInstance] = entityInfo;
auto stateSetId = stateSetIds[sensorOffset];
pldm::responder::events::StateSensorEntry
- stateSensorEntry{containerId, entityType,
+ stateSensorEntry{containerId, entityType,
entityInstance, sensorOffset,
- stateSetId};
+ stateSetId, false};
handleStateSensorEvent(stateSensorEntry, eventState);
}
};