@@ -129,15 +129,7 @@ def test_PortSyncdWarmRestart(dvs):
129
129
appl_db = swsscommon .DBConnector (swsscommon .APPL_DB , dvs .redis_sock , 0 )
130
130
state_db = swsscommon .DBConnector (swsscommon .STATE_DB , dvs .redis_sock , 0 )
131
131
132
- # enable warm restart
133
- # TODO: use cfg command to config it
134
- create_entry_tbl (
135
- conf_db ,
136
- swsscommon .CFG_WARM_RESTART_TABLE_NAME , "swss" ,
137
- [
138
- ("enable" , "true" ),
139
- ]
140
- )
132
+ dvs .runcmd ("config warm_restart enable swss" )
141
133
142
134
dvs .runcmd ("ifconfig Ethernet16 up" )
143
135
dvs .runcmd ("ifconfig Ethernet20 up" )
@@ -220,15 +212,7 @@ def test_VlanMgrdWarmRestart(dvs):
220
212
221
213
time .sleep (1 )
222
214
223
- # enable warm restart
224
- # TODO: use cfg command to config it
225
- create_entry_tbl (
226
- conf_db ,
227
- swsscommon .CFG_WARM_RESTART_TABLE_NAME , "swss" ,
228
- [
229
- ("enable" , "true" ),
230
- ]
231
- )
215
+ dvs .runcmd ("config warm_restart enable swss" )
232
216
233
217
# create vlan
234
218
create_entry_tbl (
@@ -287,7 +271,6 @@ def test_VlanMgrdWarmRestart(dvs):
287
271
(status , fvs ) = tbl .get ("Vlan20:11.0.0.10" )
288
272
assert status == True
289
273
290
-
291
274
(exitcode , bv_before ) = dvs .runcmd ("bridge vlan" )
292
275
print (bv_before )
293
276
@@ -367,15 +350,7 @@ def test_swss_neighbor_syncup(dvs):
367
350
conf_db = swsscommon .DBConnector (swsscommon .CONFIG_DB , dvs .redis_sock , 0 )
368
351
state_db = swsscommon .DBConnector (swsscommon .STATE_DB , dvs .redis_sock , 0 )
369
352
370
- # enable warm restart
371
- # TODO: use cfg command to config it
372
- create_entry_tbl (
373
- conf_db ,
374
- swsscommon .CFG_WARM_RESTART_TABLE_NAME , "swss" ,
375
- [
376
- ("enable" , "true" ),
377
- ]
378
- )
353
+ dvs .runcmd ("config warm_restart enable swss" )
379
354
380
355
#
381
356
# Testcase1:
@@ -607,13 +582,7 @@ def test_swss_neighbor_syncup(dvs):
607
582
# setup timer in configDB
608
583
timer_value = "15"
609
584
610
- create_entry_tbl (
611
- conf_db ,
612
- swsscommon .CFG_WARM_RESTART_TABLE_NAME , "swss" ,
613
- [
614
- ("neighsyncd_timer" , timer_value ),
615
- ]
616
- )
585
+ dvs .runcmd ("config warm_restart neighsyncd_timer {}" .format (timer_value ))
617
586
618
587
# get restore_count
619
588
restore_count = swss_get_RestoreCount (state_db )
@@ -705,9 +674,7 @@ def test_OrchagentWarmRestartReadyCheck(dvs):
705
674
dvs .runcmd ("ip -s -s neigh flush all" )
706
675
time .sleep (1 )
707
676
708
- # enable warm restart
709
- # TODO: use cfg command to config it
710
- conf_db = swsscommon .DBConnector (swsscommon .CONFIG_DB , dvs .redis_sock , 0 )
677
+ dvs .runcmd ("config warm_restart enable swss" )
711
678
712
679
dvs .runcmd ("ifconfig Ethernet0 10.0.0.0/31 up" )
713
680
dvs .runcmd ("ifconfig Ethernet4 10.0.0.2/31 up" )
@@ -757,15 +724,7 @@ def test_swss_port_state_syncup(dvs):
757
724
conf_db = swsscommon .DBConnector (swsscommon .CONFIG_DB , dvs .redis_sock , 0 )
758
725
state_db = swsscommon .DBConnector (swsscommon .STATE_DB , dvs .redis_sock , 0 )
759
726
760
- # enable warm restart
761
- # TODO: use cfg command to config it
762
- create_entry_tbl (
763
- conf_db ,
764
- swsscommon .CFG_WARM_RESTART_TABLE_NAME , "swss" ,
765
- [
766
- ("enable" , "true" ),
767
- ]
768
- )
727
+ dvs .runcmd ("config warm_restart enable swss" )
769
728
770
729
tbl = swsscommon .Table (appl_db , swsscommon .APP_PORT_TABLE_NAME )
771
730
0 commit comments