@@ -576,23 +576,19 @@ def status(interfacename, verbose):
576
576
# 'counters' subcommand ("show interfaces counters")
577
577
@interfaces .group (invoke_without_command = True )
578
578
@click .option ('-a' , '--printall' , is_flag = True )
579
- @click .option ('-c' , '--clear' , is_flag = True )
580
579
@click .option ('-p' , '--period' )
581
580
@click .option ('--verbose' , is_flag = True , help = "Enable verbose output" )
582
581
@click .pass_context
583
- def counters (ctx , verbose , period , clear , printall ):
582
+ def counters (ctx , verbose , period , printall ):
584
583
"""Show interface counters"""
585
584
586
585
if ctx .invoked_subcommand is None :
587
586
cmd = "portstat"
588
587
589
- if clear :
590
- cmd += " -c"
591
- else :
592
- if printall :
593
- cmd += " -a"
594
- if period is not None :
595
- cmd += " -p {}" .format (period )
588
+ if printall :
589
+ cmd += " -a"
590
+ if period is not None :
591
+ cmd += " -p {}" .format (period )
596
592
597
593
run_command (cmd , display_cmd = verbose )
598
594
@@ -631,16 +627,12 @@ def pfc():
631
627
632
628
# 'counters' subcommand ("show interfaces pfccounters")
633
629
@pfc .command ()
634
- @click .option ('-c' , '--clear' , is_flag = True )
635
630
@click .option ('--verbose' , is_flag = True , help = "Enable verbose output" )
636
- def counters (clear , verbose ):
631
+ def counters (verbose ):
637
632
"""Show pfc counters"""
638
633
639
634
cmd = "pfcstat"
640
635
641
- if clear :
642
- cmd += " -c"
643
-
644
636
run_command (cmd , display_cmd = verbose )
645
637
646
638
# 'naming_mode' subcommand ("show interfaces naming_mode")
@@ -682,12 +674,11 @@ def queue():
682
674
"""Show details of the queues """
683
675
pass
684
676
685
- # 'queuecounters ' subcommand ("show queue counters")
677
+ # 'counters ' subcommand ("show queue counters")
686
678
@queue .command ()
687
679
@click .argument ('interfacename' , required = False )
688
- @click .option ('-c' , '--clear' , is_flag = True )
689
680
@click .option ('--verbose' , is_flag = True , help = "Enable verbose output" )
690
- def counters (interfacename , clear , verbose ):
681
+ def counters (interfacename , verbose ):
691
682
"""Show queue counters"""
692
683
693
684
cmd = "queuestat"
@@ -696,44 +687,51 @@ def counters(interfacename, clear, verbose):
696
687
if get_interface_mode () == "alias" :
697
688
interfacename = iface_alias_converter .alias_to_name (interfacename )
698
689
699
- if clear :
700
- cmd += " -c"
701
- else :
702
- if interfacename is not None :
703
- cmd += " -p {}" .format (interfacename )
690
+ if interfacename is not None :
691
+ cmd += " -p {}" .format (interfacename )
704
692
705
693
run_command (cmd , display_cmd = verbose )
706
694
707
- # watermarks subcommands ("show queue watermarks|persistent-watermarks")
695
+ #
696
+ # 'watermarks' subgroup ("show queue watermarks ...")
697
+ #
708
698
709
699
@queue .group ()
710
700
def watermark ():
711
- """Show queue user WM"""
701
+ """Show user WM for queues """
712
702
pass
713
703
704
+ # 'unicast' subcommand ("show queue watermarks unicast")
714
705
@watermark .command ('unicast' )
715
706
def wm_q_uni ():
716
707
"""Show user WM for unicast queues"""
717
708
command = 'watermarkstat -t q_shared_uni'
718
709
run_command (command )
719
710
711
+ # 'multicast' subcommand ("show queue watermarks multicast")
720
712
@watermark .command ('multicast' )
721
713
def wm_q_multi ():
722
714
"""Show user WM for multicast queues"""
723
715
command = 'watermarkstat -t q_shared_multi'
724
716
run_command (command )
725
717
718
+ #
719
+ # 'persistent-watermarks' subgroup ("show queue persistent-watermarks ...")
720
+ #
721
+
726
722
@queue .group (name = 'persistent-watermark' )
727
723
def persistent_watermark ():
728
- """Show queue persistent WM"""
724
+ """Show persistent WM for queues """
729
725
pass
730
726
727
+ # 'unicast' subcommand ("show queue persistent-watermarks unicast")
731
728
@persistent_watermark .command ('unicast' )
732
729
def pwm_q_uni ():
733
- """Show persistent WM for persistent queues"""
730
+ """Show persistent WM for unicast queues"""
734
731
command = 'watermarkstat -p -t q_shared_uni'
735
732
run_command (command )
736
733
734
+ # 'multicast' subcommand ("show queue persistent-watermarks multicast")
737
735
@persistent_watermark .command ('multicast' )
738
736
def pwm_q_multi ():
739
737
"""Show persistent WM for multicast queues"""
0 commit comments