VOM: Fix state reconciliation
This commit also fixes the acl and arp handle for
inspector to view internal state of VOM.
Change-Id: Ibc8ff6cb51d2a77b4c04993ac7212564b8892337
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vpp-api/vom/acl_binding_cmds.cpp b/src/vpp-api/vom/acl_binding_cmds.cpp
index 534f786..8c33cd4 100644
--- a/src/vpp-api/vom/acl_binding_cmds.cpp
+++ b/src/vpp-api/vom/acl_binding_cmds.cpp
@@ -40,6 +40,17 @@
}
template <>
+std::string
+l3_bind_cmd::to_string() const
+{
+ std::ostringstream s;
+ s << "l3-acl-bind:[" << m_direction.to_string()
+ << " itf:" << m_itf.to_string() << " acl:" << m_acl.to_string() << "]";
+
+ return (s.str());
+}
+
+template <>
rc_t
l3_unbind_cmd::issue(connection& con)
{
@@ -59,6 +70,17 @@
}
template <>
+std::string
+l3_unbind_cmd::to_string() const
+{
+ std::ostringstream s;
+ s << "l3-acl-unbind:[" << m_direction.to_string()
+ << " itf:" << m_itf.to_string() << " acl:" << m_acl.to_string() << "]";
+
+ return (s.str());
+}
+
+template <>
rc_t
l3_dump_cmd::issue(connection& con)
{
@@ -75,6 +97,13 @@
}
template <>
+std::string
+l3_dump_cmd::to_string() const
+{
+ return ("l3-acl-bind-dump");
+}
+
+template <>
rc_t
l2_bind_cmd::issue(connection& con)
{
@@ -83,7 +112,6 @@
auto& payload = req.get_request().get_payload();
payload.sw_if_index = m_itf.value();
payload.is_add = 1;
- // payload.is_input = (m_direction == direction_t::INPUT ? 1 : 0);
payload.acl_index = m_acl.value();
VAPI_CALL(req.execute());
@@ -94,6 +122,17 @@
}
template <>
+std::string
+l2_bind_cmd::to_string() const
+{
+ std::ostringstream s;
+ s << "l2-acl-bind:[" << m_direction.to_string()
+ << " itf:" << m_itf.to_string() << " acl:" << m_acl.to_string() << "]";
+
+ return (s.str());
+}
+
+template <>
rc_t
l2_unbind_cmd::issue(connection& con)
{
@@ -102,7 +141,6 @@
auto& payload = req.get_request().get_payload();
payload.sw_if_index = m_itf.value();
payload.is_add = 0;
- // payload.is_input = (m_direction == direction_t::INPUT ? 1 : 0);
payload.acl_index = m_acl.value();
VAPI_CALL(req.execute());
@@ -113,6 +151,17 @@
}
template <>
+std::string
+l2_unbind_cmd::to_string() const
+{
+ std::ostringstream s;
+ s << "l2-acl-unbind:[" << m_direction.to_string()
+ << " itf:" << m_itf.to_string() << " acl:" << m_acl.to_string() << "]";
+
+ return (s.str());
+}
+
+template <>
rc_t
l2_dump_cmd::issue(connection& con)
{
@@ -128,6 +177,13 @@
return rc_t::OK;
}
+template <>
+std::string
+l2_dump_cmd::to_string() const
+{
+ return ("l2-acl-bind-dump");
+}
+
}; // namespace binding_cmds
}; // namespace ACL
}; // namespace VOM