Skip to content

Commit

Permalink
[aclorch]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (son…
Browse files Browse the repository at this point in the history
…ic-net#978)

TABLE_NAME” is the suffix and “ACL_TABLE” is the table name.
it is good to keep the convention here and align with all other table names.

Please refer to sonic-swss-common pull request 296

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
stcheng authored Jul 18, 2019
1 parent cb60eb1 commit c28827a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ void AclOrch::doTask(Consumer &consumer)

string table_name = consumer.getTableName();

if (table_name == CFG_ACL_TABLE_NAME)
if (table_name == CFG_ACL_TABLE_TABLE_NAME)
{
unique_lock<mutex> lock(m_countersMutex);
doAclTableTask(consumer);
Expand Down
2 changes: 1 addition & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool OrchDaemon::init()
TableConnector confDbMirrorSession(m_configDb, CFG_MIRROR_SESSION_TABLE_NAME);
MirrorOrch *mirror_orch = new MirrorOrch(stateDbMirrorSession, confDbMirrorSession, gPortsOrch, gRouteOrch, gNeighOrch, gFdbOrch, policer_orch);

TableConnector confDbAclTable(m_configDb, CFG_ACL_TABLE_NAME);
TableConnector confDbAclTable(m_configDb, CFG_ACL_TABLE_TABLE_NAME);
TableConnector confDbAclRuleTable(m_configDb, CFG_ACL_RULE_TABLE_NAME);

vector<TableConnector> acl_table_connectors = {
Expand Down
4 changes: 2 additions & 2 deletions tests/mock_tests/aclorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace aclorch_test
PortsOrch *portsOrch, MirrorOrch *mirrorOrch, NeighOrch *neighOrch, RouteOrch *routeOrch) :
config_db(config_db)
{
TableConnector confDbAclTable(config_db, CFG_ACL_TABLE_NAME);
TableConnector confDbAclTable(config_db, CFG_ACL_TABLE_TABLE_NAME);
TableConnector confDbAclRuleTable(config_db, CFG_ACL_RULE_TABLE_NAME);

vector<TableConnector> acl_table_connectors = { confDbAclTable, confDbAclRuleTable };
Expand All @@ -197,7 +197,7 @@ namespace aclorch_test
void doAclTableTask(const deque<KeyOpFieldsValuesTuple> &entries)
{
auto consumer = unique_ptr<Consumer>(new Consumer(
new swss::ConsumerStateTable(config_db, CFG_ACL_TABLE_NAME, 1, 1), m_aclOrch, CFG_ACL_TABLE_NAME));
new swss::ConsumerStateTable(config_db, CFG_ACL_TABLE_TABLE_NAME, 1, 1), m_aclOrch, CFG_ACL_TABLE_TABLE_NAME));

consumerAddToSync(consumer.get(), entries);

Expand Down

0 comments on commit c28827a

Please sign in to comment.