summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/acl_binding_cmds.cpp
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-02-26 18:36:17 +0100
committerNeale Ranns <nranns@cisco.com>2018-03-06 14:47:28 +0000
commitb5eb3b185fb04bfed3ba6c89323cd82e7d666bae (patch)
treeeadb31b9933e574b601b35329720302ffe4a1ea5 /src/vpp-api/vom/acl_binding_cmds.cpp
parent3f6ede3ab3df9624ba3682d5bc82c4f2aa2e0506 (diff)
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>
Diffstat (limited to 'src/vpp-api/vom/acl_binding_cmds.cpp')
-rw-r--r--src/vpp-api/vom/acl_binding_cmds.cpp60
1 files changed, 58 insertions, 2 deletions
diff --git a/src/vpp-api/vom/acl_binding_cmds.cpp b/src/vpp-api/vom/acl_binding_cmds.cpp
index 534f7868a08..8c33cd47b79 100644
--- a/src/vpp-api/vom/acl_binding_cmds.cpp
+++ b/src/vpp-api/vom/acl_binding_cmds.cpp
@@ -40,6 +40,17 @@ l3_bind_cmd::issue(connection& con)
}
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 @@ l3_unbind_cmd::issue(connection& con)
}
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 @@ l3_dump_cmd::issue(connection& con)
}
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 @@ l2_bind_cmd::issue(connection& con)
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 @@ l2_bind_cmd::issue(connection& con)
}
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 @@ l2_unbind_cmd::issue(connection& con)
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 @@ l2_unbind_cmd::issue(connection& con)
}
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 @@ l2_dump_cmd::issue(connection& con)
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