20 namespace gbp_vxlan_cmds {
23 const boost::asio::ip::address_v4&
src,
38 msg_t req(con.
ctx(), std::ref(*
this));
40 auto& payload = req.get_request().get_payload();
42 payload.tunnel.vni = m_vni;
43 payload.tunnel.bd_rd_id = m_bd_rd;
48 to_api(m_src, payload.tunnel.src);
65 <<
" bd/rd:" << m_bd_rd;
79 msg_t req(con.
ctx(), std::ref(*
this));
81 auto& payload = req.get_request().get_payload();
115 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
127 return (
"gbp-vxlan-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
rc_t issue(connection &con)
Issue the command to VPP/HW.
void remove_interface()
remove the deleted interface from the DB
rc_t rc() const
Get the HW return code.
A cmd class that Dumps all the bridge domains.
Error codes that VPP will return during a HW write.
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
A command class that creates an Bridge-Domain.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
create_cmd(HW::item< handle_t > &item, const std::string &name, const boost::asio::ip::address_v4 &src, uint32_t vni, bool is_l2, uint32_t bd_rd)
Constructor.
std::string to_string() const
convert to string format for debug purposes
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A cmd class that Delete an Bridge-Domain.
A representation of an interface in VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
static const rc_t OK
The HW write was successfull.
delete_cmd(HW::item< handle_t > &item, uint32_t vni)
Constructor.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
std::string to_string() const
convert to string format for debug purposes
void insert_interface()
add the created interface to the DB
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.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< handle_t > & item()
return the HW item the command updates
vapi::Gbp_vxlan_tunnel_add msg_t
convenient typedef