19 namespace gbp_endpoint_group_cmds {
37 return ((m_itf == other.m_itf) && (m_bd_id == other.m_bd_id) &&
38 (m_rd_id == other.m_rd_id) && (m_epg_id == other.m_epg_id));
44 msg_t req(con.
ctx(), std::ref(*
this));
46 auto& payload = req.get_request().get_payload();
48 payload.epg.uplink_sw_if_index = m_itf.
value();
49 payload.epg.epg_id = m_epg_id;
50 payload.epg.bd_id = m_bd_id;
51 payload.epg.ip4_table_id = m_rd_id;
52 payload.epg.ip6_table_id = m_rd_id;
66 <<
" epg-id:" << m_epg_id <<
" bd-id:" << m_bd_id <<
" rd-id:" << m_rd_id
81 return (m_epg_id == other.m_epg_id);
87 msg_t req(con.
ctx(), std::ref(*
this));
89 auto& payload = req.get_request().get_payload();
91 payload.epg.epg_id = m_epg_id;
103 std::ostringstream s;
105 <<
" epg:" << m_epg_id;
123 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
135 return (
"gbp-endpoint-group-dump");
delete_cmd(HW::item< bool > &item, epg_id_t epg_id)
Constructor.
uint32_t table_id_t
type def the table-id
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
uint32_t value() const
get the value of the handle
uint32_t epg_id_t
EPG IDs are 32 bit integers.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that deletes a GBP endpoint_group.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
create_cmd(HW::item< bool > &item, epg_id_t epg_id, uint32_t bd_id, route::table_id_t rd_id, const handle_t &itf)
Constructor.
A cmd class that Dumps all the GBP endpoint_groups.
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
vapi::Gbp_endpoint_group_add_del msg_t
convenient typedef
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t wait()
Wait on the commands promise.
A command class that creates or updates the GBP endpoint_group.