feat: allow Sticky LS state to persist across EM or optionally across reboot (#4978)

This commit is contained in:
philmoz
2024-06-02 16:22:36 +10:00
committed by GitHub
parent 0399858a76
commit b16524837a
26 changed files with 121 additions and 46 deletions
@@ -116,6 +116,8 @@ Node convert<LogicalSwitchData>::encode(const LogicalSwitchData& rhs)
node["delay"] = rhs.delay;
node["duration"] = rhs.duration;
node["andsw"] = YamlRawSwitchEncode(RawSwitch(rhs.andsw));
node["lsPersist"] = (int)rhs.lsPersist;
node["lsState"] = (int)rhs.lsState;
return node;
}
@@ -200,6 +202,9 @@ bool convert<LogicalSwitchData>::decode(const Node& node,
node["andsw"] >> andsw;
rhs.andsw = andsw.toValue();
node["lsPersist"] >> rhs.lsPersist;
node["lsState"] >> rhs.lsState;
return true;
}
} // namespace YAML