#ifndef __VOM_ACL_LIST_CMDS_H__
#define __VOM_ACL_LIST_CMDS_H__
-#include "vom/acl_list.hpp"
+#include "vom/acl_l2_list.hpp"
+#include "vom/acl_l3_list.hpp"
#include "vom/dump_cmd.hpp"
#include "vom/rpc_cmd.hpp"
/**
* A command class that Create the list
*/
-template <typename RULE, typename UPDATE>
+template <typename LIST, typename UPDATE>
class update_cmd : public rpc_cmd<HW::item<handle_t>, UPDATE>
{
public:
- typedef typename list<RULE>::rules_t cmd_rules_t;
- typedef typename list<RULE>::key_t cmd_key_t;
+ typedef typename LIST::rules_t cmd_rules_t;
+ typedef typename LIST::key_t cmd_key_t;
/**
* Constructor
void succeeded()
{
rpc_cmd<HW::item<handle_t>, UPDATE>::succeeded();
- list<RULE>::add(m_key, this->item());
+ LIST::add(m_key, this->item());
}
/**
/**
* add the created acl to the DB
*/
- void insert_acl() { list<RULE>::add(m_key, this->item()); }
+ void insert_acl() { LIST::add(m_key, this->item()); }
/**
* The key.
/**
* A cmd class that Deletes an ACL
*/
-template <typename RULE, typename DELETE>
+template <typename LIST, typename DELETE>
class delete_cmd : public rpc_cmd<HW::item<handle_t>, DELETE>
{
public:
/**
* remove the acl from the DB
*/
- void remove_acl() { list<RULE>::remove(this->item()); }
+ void remove_acl() { LIST::remove(this->item()); }
};
/**
/**
* Typedef the L3 ACL commands
*/
-typedef update_cmd<l3_rule, vapi::Acl_add_replace> l3_update_cmd;
-typedef delete_cmd<l3_rule, vapi::Acl_del> l3_delete_cmd;
+typedef update_cmd<l3_list, vapi::Acl_add_replace> l3_update_cmd;
+typedef delete_cmd<l3_list, vapi::Acl_del> l3_delete_cmd;
typedef dump_cmd<vapi::Acl_dump> l3_dump_cmd;
/**
* Typedef the L2 ACL commands
*/
-typedef update_cmd<l2_rule, vapi::Macip_acl_add> l2_update_cmd;
-typedef delete_cmd<l2_rule, vapi::Macip_acl_del> l2_delete_cmd;
+typedef update_cmd<l2_list, vapi::Macip_acl_add> l2_update_cmd;
+typedef delete_cmd<l2_list, vapi::Macip_acl_del> l2_delete_cmd;
typedef dump_cmd<vapi::Macip_acl_dump> l2_dump_cmd;
}; // namespace list_cmds