@@ -86,9 +86,10 @@ class Daemon(object):
8686 self .callbacks = defaultdict (lambda : defaultdict (list )) # db -> table -> []
8787 self .subscribers = set ()
8888
89- def add_manager (self , db , table_name , callback ):
89+ def add_manager (self , db_name , table_name , callback ):
90+ db = swsscommon .SonicDBConfig .getDbId (db_name )
9091 if db not in self .db_connectors :
91- self .db_connectors [db ] = swsscommon .DBConnector (db , swsscommon . DBConnector . DEFAULT_UNIXSOCKET , 0 )
92+ self .db_connectors [db ] = swsscommon .DBConnector (db_name , 0 )
9293
9394 if table_name not in self .callbacks [db ]:
9495 conn = self .db_connectors [db ]
@@ -225,7 +226,7 @@ class BGPDeviceMetaMgr(Manager):
225226 daemon ,
226227 directory ,
227228 [],
228- swsscommon . CONFIG_DB ,
229+ " CONFIG_DB" ,
229230 swsscommon .CFG_DEVICE_METADATA_TABLE_NAME
230231 )
231232
@@ -250,7 +251,7 @@ class BGPNeighborMetaMgr(Manager):
250251 daemon ,
251252 directory ,
252253 [],
253- swsscommon . CONFIG_DB ,
254+ " CONFIG_DB" ,
254255 swsscommon .CFG_DEVICE_NEIGHBOR_METADATA_TABLE_NAME
255256 )
256257
@@ -272,7 +273,7 @@ class BGPPeerMgr(Manager):
272273 ("meta" , "localhost/bgp_asn" ),
273274 ("neigmeta" , "" ),
274275 ],
275- swsscommon . CONFIG_DB ,
276+ " CONFIG_DB" ,
276277 swsscommon .CFG_BGP_NEIGHBOR_TABLE_NAME
277278 )
278279 self .peers = self .load_peers ()
0 commit comments