19 namespace bond_group_binding_cmds {
25 , m_bond_itf(bond_itf)
33 return ((m_bond_itf == other.m_bond_itf) && (m_itf == other.m_itf));
39 msg_t req(con.
ctx(), std::ref(*
this));
41 auto& payload = req.get_request().get_payload();
44 payload.bond_sw_if_index = m_bond_itf.
value();
71 return (m_itf == other.m_itf);
77 msg_t req(con.
ctx(), std::ref(*
this));
79 auto& payload = req.get_request().get_payload();
80 payload.sw_if_index = m_itf.
value();
120 auto& payload =
m_dump->get_request().get_payload();
121 payload.sw_if_index = m_itf.
value();
133 return (
"bond-slave-itfs-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.
std::string to_string() const
convert to string format for debug purposes
uint32_t value() const
get the value of the handle
A cmd class that detach slave from a bond interface.
Error codes that VPP will return during a HW write.
A cmd class that Dumps slave itfs.
vapi::Sw_interface_slave_dump msg_t
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
unbind_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
bind_cmd(HW::item< bool > &item, const handle_t &bond_itf, const bond_member &itf)
Constructor.
A representation of the connection to VPP.
dump_cmd()
Default Constructor.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
rc_t issue(connection &con)
Issue the command to VPP/HW.
void to_vpp(vapi_payload_bond_enslave &bond_enslave) const
convert to VPP
A type declaration of an interface handle in VPP.
bool operator==(const unbind_cmd &i) const
Comparison operator - only used for UT.
static const rc_t OK
The HW write was successfull.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait for the issue of the command to complete.
bool operator==(const dump_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.
std::unique_ptr< vapi::Sw_interface_slave_dump > m_dump
The VAPI event registration.
const handle_t hdl(void) const
Get the interface handle.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A command class that binds the slave interface to the bond interface.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< bool > & item()
return the HW item the command updates
vapi::Bond_enslave msg_t
convenient typedef
bool operator==(const bind_cmd &i) const
Comparison operator - only used for UT.