16 #ifndef __VOM_ACL_LIST_CMDS_H__ 17 #define __VOM_ACL_LIST_CMDS_H__ 23 #include <vapi/acl.api.vapi.hpp> 31 template <
typename RULE,
typename UPDATE>
33 :
public rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>
44 const cmd_rules_t& rules)
72 return ((m_key == other.m_key) && (m_rules == other.m_rules));
78 if (sp && this->
item()) {
94 int acl_index = reply.get_response().get_payload().acl_index;
95 int retval = reply.get_response().get_payload().retval;
110 const cmd_key_t& m_key;
115 const cmd_rules_t& m_rules;
121 template <
typename DELETE>
143 std::ostringstream s;
161 template <
typename DUMP>
179 std::string
to_string()
const {
return (
"acl-list-dump"); }
std::string to_string() const
convert to string format for debug purposes
update_cmd< l3_rule, vapi::Acl_add_replace > l3_update_cmd
Typedef the L3 ACL commands.
delete_cmd(HW::item< handle_t > &item)
Constructor.
void succeeded()
Called by the HW Command Q when it is disabled to indicate the command can be considered successful w...
static const rc_t & from_vpp_retval(int32_t rv)
Get the rc_t from the VPP API value.
static void add(const handle_t &handle, std::shared_ptr< list > sp)
update_cmd(HW::item< handle_t > &item, const cmd_key_t &key, const cmd_rules_t &rules)
Constructor.
delete_cmd< vapi::Macip_acl_del > l2_delete_cmd
Error codes that VPP will return during a HW write.
static const log_level_t DEBUG
static std::shared_ptr< list > find(const handle_t &handle)
bool operator==(const update_cmd &other) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
T & data()
Return the data read/written.
std::string key_t
The KEY can be used to uniquely identify the ACL.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
list< RULE >::rules_t cmd_rules_t
A cmd class that Dumps all the ACLs.
dump_cmd< vapi::Acl_dump > l3_dump_cmd
A representation of the connection to VPP.
A command class that Create the list.
delete_cmd< vapi::Acl_del > l3_delete_cmd
bool operator==(const delete_cmd &other) const
Comparison operator - only used for UT.
HW::item< handle_t > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
list< RULE >::key_t cmd_key_t
A cmd class that Deletes an ACL.
A type declaration of an interface handle in VPP.
virtual vapi_error_e operator()(UPDATE &reply)
A callback function for handling ACL creates.
std::string to_string() const
convert to string format for debug purposes
dump_cmd< vapi::Macip_acl_dump > l2_dump_cmd
void fulfill(const HW::item< handle_t > &d)
Fulfill the commands promise.
static const rc_t INVALID
HW write reported invalid input.
The VPP Object Model (VOM) library.
update_cmd< l2_rule, vapi::Macip_acl_add > l2_update_cmd
Typedef the L2 ACL commands.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::multiset< RULE > rules_t
The rule container type.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A base class for VPP dump commands.