Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
api: fix typos in api error descriptions
[vpp.git]
/
extras
/
vom
/
vom
/
gbp_endpoint_group_cmds.cpp
diff --git
a/extras/vom/vom/gbp_endpoint_group_cmds.cpp
b/extras/vom/vom/gbp_endpoint_group_cmds.cpp
index
55e81d3
..
c561860
100644
(file)
--- a/
extras/vom/vom/gbp_endpoint_group_cmds.cpp
+++ b/
extras/vom/vom/gbp_endpoint_group_cmds.cpp
@@
-19,15
+19,19
@@
namespace VOM {
namespace gbp_endpoint_group_cmds {
create_cmd::create_cmd(HW::item<bool>& item,
namespace gbp_endpoint_group_cmds {
create_cmd::create_cmd(HW::item<bool>& item,
- epg_id_t epg_id,
+ vnid_t vnid,
+ uint16_t sclass,
uint32_t bd_id,
route::table_id_t rd_id,
uint32_t bd_id,
route::table_id_t rd_id,
+ const gbp_endpoint_group::retention_t& retention,
const handle_t& itf)
: rpc_cmd(item)
const handle_t& itf)
: rpc_cmd(item)
- , m_epg_id(epg_id)
+ , m_vnid(vnid)
+ , m_sclass(sclass)
, m_bd_id(bd_id)
, m_rd_id(rd_id)
, m_itf(itf)
, m_bd_id(bd_id)
, m_rd_id(rd_id)
, m_itf(itf)
+ , m_retention(retention)
{
}
{
}
@@
-35,7
+39,8
@@
bool
create_cmd::operator==(const create_cmd& other) const
{
return ((m_itf == other.m_itf) && (m_bd_id == other.m_bd_id) &&
create_cmd::operator==(const create_cmd& other) const
{
return ((m_itf == other.m_itf) && (m_bd_id == other.m_bd_id) &&
- (m_rd_id == other.m_rd_id) && (m_epg_id == other.m_epg_id));
+ (m_rd_id == other.m_rd_id) && (m_vnid == other.m_vnid) &&
+ (m_retention == other.m_retention));
}
rc_t
}
rc_t
@@
-44,18
+49,16
@@
create_cmd::issue(connection& con)
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
- payload.is_add = 1;
payload.epg.uplink_sw_if_index = m_itf.value();
payload.epg.uplink_sw_if_index = m_itf.value();
- payload.epg.epg_id = m_epg_id;
+ payload.epg.vnid = m_vnid;
+ payload.epg.sclass = m_sclass;
payload.epg.bd_id = m_bd_id;
payload.epg.bd_id = m_bd_id;
- payload.epg.
ip4_table
_id = m_rd_id;
- payload.epg.
ip6_table_id = m_rd_id
;
+ payload.epg.
rd
_id = m_rd_id;
+ payload.epg.
retention.remote_ep_timeout = m_retention.remote_ep_timeout
;
VAPI_CALL(req.execute());
VAPI_CALL(req.execute());
- m_hw_item.set(wait());
-
- return rc_t::OK;
+ return (wait());
}
std::string
}
std::string
@@
-63,22
+66,22
@@
create_cmd::to_string() const
{
std::ostringstream s;
s << "gbp-endpoint-group-create: " << m_hw_item.to_string()
{
std::ostringstream s;
s << "gbp-endpoint-group-create: " << m_hw_item.to_string()
- << "
epg-id:" << m_epg_
id << " bd-id:" << m_bd_id << " rd-id:" << m_rd_id
+ << "
vnid:" << m_vn
id << " bd-id:" << m_bd_id << " rd-id:" << m_rd_id
<< " itf:" << m_itf;
return (s.str());
}
<< " itf:" << m_itf;
return (s.str());
}
-delete_cmd::delete_cmd(HW::item<bool>& item,
epg_id_t epg_id
)
+delete_cmd::delete_cmd(HW::item<bool>& item,
sclass_t sclass
)
: rpc_cmd(item)
: rpc_cmd(item)
- , m_
epg_id(epg_id
)
+ , m_
sclass(sclass
)
{
}
bool
delete_cmd::operator==(const delete_cmd& other) const
{
{
}
bool
delete_cmd::operator==(const delete_cmd& other) const
{
- return (m_
epg_id == other.m_epg_id
);
+ return (m_
sclass == other.m_sclass
);
}
rc_t
}
rc_t
@@
-87,14
+90,11
@@
delete_cmd::issue(connection& con)
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
- payload.is_add = 0;
- payload.epg.epg_id = m_epg_id;
+ payload.sclass = m_sclass;
VAPI_CALL(req.execute());
VAPI_CALL(req.execute());
- m_hw_item.set(wait());
-
- return rc_t::OK;
+ return (wait());
}
std::string
}
std::string
@@
-102,7
+102,7
@@
delete_cmd::to_string() const
{
std::ostringstream s;
s << "gbp-endpoint-group-delete: " << m_hw_item.to_string()
{
std::ostringstream s;
s << "gbp-endpoint-group-delete: " << m_hw_item.to_string()
- << "
epg:" << m_epg_id
;
+ << "
sclass:" << m_sclass
;
return (s.str());
}
return (s.str());
}