Skip to content

Commit

Permalink
UT Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan committed Oct 7, 2019
1 parent e55d667 commit 43c91a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ const vector<sai_hostif_trap_type_t> default_trap_ids = {
SAI_HOSTIF_TRAP_TYPE_TTL_ERROR
};

CoppOrch::CoppOrch(DBConnector *db, vector<string> &tableNames) :
Orch(db, tableNames)
CoppOrch::CoppOrch(vector<TableConnector> &tableConnectors) :
Orch( tableConnectors)
{
SWSS_LOG_ENTER();

Expand Down Expand Up @@ -831,7 +831,7 @@ void CoppOrch::doTask(Consumer &consumer)
return;
}

if (table_name == APP_SFLOW_TABLE_NAME)
if (table_name == CFG_SFLOW_TABLE_NAME)
{
coppProcessSflow(consumer);
return;
Expand Down
2 changes: 1 addition & 1 deletion orchagent/copporch.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef map<sai_hostif_trap_type_t, sai_object_id_t> TrapIdHostIfTableMap;
class CoppOrch : public Orch
{
public:
CoppOrch(DBConnector *db, vector<string> &tableNames);
CoppOrch(vector<TableConnector> &tableConnectors);
protected:
object_map m_trap_group_map;
bool enable_sflow_trap;
Expand Down
12 changes: 8 additions & 4 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ bool OrchDaemon::init()
gIntfsOrch = new IntfsOrch(m_applDb, APP_INTF_TABLE_NAME, vrf_orch);
gNeighOrch = new NeighOrch(m_applDb, APP_NEIGH_TABLE_NAME, gIntfsOrch);
gRouteOrch = new RouteOrch(m_applDb, APP_ROUTE_TABLE_NAME, gNeighOrch);
vector<string> copp_tables = {
APP_COPP_TABLE_NAME,
APP_SFLOW_TABLE_NAME

TableConnector confDbSflowTable(m_configDb, CFG_SFLOW_TABLE_NAME);
TableConnector appCoppTable(m_applDb, APP_COPP_TABLE_NAME);

vector<TableConnector> copp_table_connectors = {
confDbSflowTable,
appCoppTable
};
CoppOrch *copp_orch = new CoppOrch(m_applDb, copp_tables);
CoppOrch *copp_orch = new CoppOrch(copp_table_connectors);
TunnelDecapOrch *tunnel_decap_orch = new TunnelDecapOrch(m_applDb, APP_TUNNEL_DECAP_TABLE_NAME);

VxlanTunnelOrch *vxlan_tunnel_orch = new VxlanTunnelOrch(m_applDb, APP_VXLAN_TUNNEL_TABLE_NAME);
Expand Down

0 comments on commit 43c91a0

Please sign in to comment.