Convert event group to a vector of tuples
In preparation for storing each event group member's property state used
within the event's actions, the group type should be converted to a
vector of tuples. This vector will allow, if user defines, easier use of
different interfaces and properties on the same path to be used within
the same event group.
Tested:
Generated code for groups reflects vector instead of map
Actions against groups remain unchanged
Change-Id: I9f4bb609de424d9004d43524fd04737a50fb2c6f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/triggers.cpp b/control/triggers.cpp
index 2307730..376ac9b 100644
--- a/control/triggers.cpp
+++ b/control/triggers.cpp
@@ -57,17 +57,17 @@
// Set event data for each host group member
for (auto& entry : group)
{
- if (entry.first == zone.getPath())
+ if (std::get<pathPos>(entry) == zone.getPath())
{
auto ifaces = zone.getIfaces();
// Group member interface in list owned by zone
if (std::find(ifaces.begin(), ifaces.end(),
- std::get<intfPos>(entry.second)) != ifaces.end())
+ std::get<intfPos>(entry)) != ifaces.end())
{
// Store path,interface,property as a managed object
- zone.setObjectData(entry.first,
- std::get<intfPos>(entry.second),
- std::get<propPos>(entry.second),
+ zone.setObjectData(std::get<pathPos>(entry),
+ std::get<intfPos>(entry),
+ std::get<propPos>(entry),
eventData.get());
}
}