@@ -113,6 +113,11 @@ def config(ports):
113
113
poll_interval = configdb .get_entry ( 'PFC_WD_TABLE' , 'GLOBAL' ).get ('POLL_INTERVAL' )
114
114
if poll_interval is not None :
115
115
click .echo ("Changed polling interval to " + poll_interval + "ms" )
116
+
117
+ big_red_switch = configdb .get_entry ( 'PFC_WD_TABLE' , 'GLOBAL' ).get ('BIG_RED_SWITCH' )
118
+ if big_red_switch is not None :
119
+ click .echo ("BIG_RED_SWITCH status is " + big_red_switch )
120
+
116
121
click .echo (tabulate (table , CONFIG_HEADER , stralign = 'right' , numalign = 'right' , tablefmt = 'simple' ))
117
122
118
123
# Start WD
@@ -214,5 +219,18 @@ def start_default():
214
219
pfcwd_info ['POLL_INTERVAL' ] = DEFAULT_POLL_INTERVAL * multiply
215
220
configdb .mod_entry ("PFC_WD_TABLE" , "GLOBAL" , pfcwd_info )
216
221
222
+ # Enable/disable PFC WD BIG_RED_SWITCH mode
223
+ @cli .command ()
224
+ @click .argument ('big_red_switch' , type = click .Choice (['enable' , 'disable' ]))
225
+ def big_red_switch (big_red_switch ):
226
+ """ Enable/disable BIG_RED_SWITCH mode """
227
+ configdb = swsssdk .ConfigDBConnector ()
228
+ configdb .connect ()
229
+ pfcwd_info = {}
230
+ if big_red_switch is not None :
231
+ pfcwd_info ['BIG_RED_SWITCH' ] = big_red_switch
232
+
233
+ configdb .mod_entry ("PFC_WD_TABLE" , "GLOBAL" , pfcwd_info )
234
+
217
235
if __name__ == '__main__' :
218
236
cli ()
0 commit comments