Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Fix the error of running "show storm-control interface" #3

Merged
merged 1 commit into from
Jul 8, 2024

Commits on Jul 5, 2024

  1. Fix the error of running "show storm-control interface"

    CLI shows an error when trying to show the storm control configuration.
    This PR is to fix the error of running "show storm-control interface".
    
    ```shell
    admin@sonic:~$ show storm-control interface Ethernet0
    Traceback (most recent call last):
      File "/usr/local/bin/show", line 8, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
        return callback(*args, **kwargs)
    TypeError: interface() missing 2 required positional arguments: 'namespace' and 'display'
    ```
    
    ```shell
    admin@sonic:~$ show storm-control interface Ethernet0
    +------------------+--------------+---------------+---------------------+
    | Interface Name   | Storm Type   |   Rate (kbps) | Burst Size(kbits)   |
    +==================+==============+===============+=====================+
    | Ethernet0        | broadcast    |         10000 | default             |
    +------------------+--------------+---------------+---------------------+
    ```
    PeterTSW-EC committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    f268af4 View commit details
    Browse the repository at this point in the history