File tree 3 files changed +11
-12
lines changed
3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ def __init__(self):
114
114
self .tables_db_info = {}
115
115
self .rules_db_info = {}
116
116
self .rules_info = {}
117
- num_asic = multi_asic . get_num_asics ()
118
- if num_asic > 1 :
117
+
118
+ if multi_asic . is_multi_asic () :
119
119
# Load global db config
120
120
SonicDBConfig .load_sonic_global_db_config ()
121
121
else :
Original file line number Diff line number Diff line change @@ -211,21 +211,20 @@ def cli(ctx):
211
211
# Use the db object if given as input.
212
212
db = None if ctx .obj is None else ctx .obj .cfgdb
213
213
214
- context = {
215
- "crm" : Crm (db )
216
- }
217
-
218
- ctx .obj = context
219
-
220
214
# Note: SonicDBConfig may be already initialized in unit test, then skip
221
215
if not SonicDBConfig .isInit ():
222
- num_asic = multi_asic .get_num_asics ()
223
- if num_asic > 1 :
216
+ if multi_asic .is_multi_asic ():
224
217
# Load the global config file database_global.json once.
225
218
SonicDBConfig .load_sonic_global_db_config ()
226
219
else :
227
220
SonicDBConfig .initialize ()
228
221
222
+ context = {
223
+ "crm" : Crm (db )
224
+ }
225
+
226
+ ctx .obj = context
227
+
229
228
@cli .group ()
230
229
@click .pass_context
231
230
def config (ctx ):
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ class Lldpshow(object):
47
47
# So far only find Router and Bridge two capabilities in lldpctl, so any other capacility types will be read as Other
48
48
# if further capability type is supported like WLAN, can just add the tag definition here
49
49
self .ctags = {'Router' : 'R' , 'Bridge' : 'B' }
50
- num_asic = multi_asic . get_num_asics ()
51
- if num_asic > 1 :
50
+
51
+ if multi_asic . is_multi_asic () :
52
52
SonicDBConfig .load_sonic_global_db_config ()
53
53
else :
54
54
SonicDBConfig .initialize ()
You can’t perform that action at this time.
0 commit comments