aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2020-01-31 09:51:41 +0100
committerJakub Grajciar <jgrajcia@cisco.com>2020-02-26 10:40:58 +0100
commit908965db7e3075ba7bacd924bfb0df203fe6cc7d (patch)
tree49cc97fbc7fa0154512182b7e6de07026ab4717a /extras
parent2dbee9361e74d03727a8b618ba80a5e28c006011 (diff)
span: API cleanup
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ifddac07b15b116574de3a97f7c80d7bf6a3171f7 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/vom/interface_span_cmds.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/extras/vom/vom/interface_span_cmds.cpp b/extras/vom/vom/interface_span_cmds.cpp
index 72bd6100bc0..00dbdd0b895 100644
--- a/extras/vom/vom/interface_span_cmds.cpp
+++ b/extras/vom/vom/interface_span_cmds.cpp
@@ -28,8 +28,7 @@ config_cmd::config_cmd(HW::item<bool>& item,
, m_itf_from(itf_from)
, m_itf_to(itf_to)
, m_state(state)
-{
-}
+{}
bool
config_cmd::operator==(const config_cmd& o) const
@@ -47,7 +46,7 @@ config_cmd::issue(connection& con)
payload.is_l2 = 0;
payload.sw_if_index_from = m_itf_from.value();
payload.sw_if_index_to = m_itf_to.value();
- payload.state = m_state.value();
+ payload.state = (vapi_enum_span_state)m_state.value();
VAPI_CALL(req.execute());
@@ -71,8 +70,7 @@ unconfig_cmd::unconfig_cmd(HW::item<bool>& item,
: rpc_cmd(item)
, m_itf_from(itf_from)
, m_itf_to(itf_to)
-{
-}
+{}
bool
unconfig_cmd::operator==(const unconfig_cmd& o) const
@@ -89,7 +87,7 @@ unconfig_cmd::issue(connection& con)
payload.is_l2 = 0;
payload.sw_if_index_from = m_itf_from.value();
payload.sw_if_index_to = m_itf_to.value();
- payload.state = 0;
+ payload.state = SPAN_STATE_API_DISABLED;
VAPI_CALL(req.execute());
@@ -110,9 +108,7 @@ unconfig_cmd::to_string() const
return (s.str());
}
-dump_cmd::dump_cmd()
-{
-}
+dump_cmd::dump_cmd() {}
bool
dump_cmd::operator==(const dump_cmd& other) const