From 586886b55ea2cafaa2bbefe930dc688d6431ab8e Mon Sep 17 00:00:00 2001 From: Akhilesh Samineni <47657796+AkhileshSamineni@users.noreply.github.com> Date: Mon, 9 Mar 2020 04:08:20 +0530 Subject: [PATCH] Multi-Db changes for NAT feature. (#1202) * Multi-Db changes for NAT feature in sonic-swss repo. Signed-off-by: Akhilesh Samineni --- cfgmgr/natmgrd.cpp | 6 +++--- natsyncd/natsyncd.cpp | 4 ++-- orchagent/natorch.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cfgmgr/natmgrd.cpp b/cfgmgr/natmgrd.cpp index 5a685d9f6c53..dc8bf1f80f0b 100644 --- a/cfgmgr/natmgrd.cpp +++ b/cfgmgr/natmgrd.cpp @@ -118,9 +118,9 @@ int main(int argc, char **argv) CFG_ACL_RULE_TABLE_NAME }; - DBConnector cfgDb(CONFIG_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); - DBConnector appDb(APPL_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); - DBConnector stateDb(STATE_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); + DBConnector cfgDb("CONFIG_DB", 0); + DBConnector appDb("APPL_DB", 0); + DBConnector stateDb("STATE_DB", 0); cleanupNotifier = std::make_shared(&appDb, "NAT_DB_CLEANUP_NOTIFICATION"); diff --git a/natsyncd/natsyncd.cpp b/natsyncd/natsyncd.cpp index bda2540620a2..c8591f2c063f 100644 --- a/natsyncd/natsyncd.cpp +++ b/natsyncd/natsyncd.cpp @@ -15,9 +15,9 @@ int main(int argc, char **argv) { Logger::linkToDbNative("natsyncd"); - DBConnector appDb(APPL_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); + DBConnector appDb("APPL_DB", 0); + DBConnector stateDb("STATE_DB", 0); RedisPipeline pipelineAppDB(&appDb); - DBConnector stateDb(STATE_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); NfNetlink nfnl; nfnl.registerRecvCallbacks(); diff --git a/orchagent/natorch.cpp b/orchagent/natorch.cpp index ccd0e12f4439..69c0abb22279 100644 --- a/orchagent/natorch.cpp +++ b/orchagent/natorch.cpp @@ -45,7 +45,7 @@ NatOrch::NatOrch(DBConnector *appDb, DBConnector *stateDb, vector