Skip to content

[portstat] Update portstat to use CounterTable API#2207

Merged
jimmyzhai merged 2 commits intosonic-net:masterfrom
jimmyzhai:portstat
Jun 30, 2022
Merged

[portstat] Update portstat to use CounterTable API#2207
jimmyzhai merged 2 commits intosonic-net:masterfrom
jimmyzhai:portstat

Conversation

@jimmyzhai
Copy link
Contributor

@jimmyzhai jimmyzhai commented Jun 10, 2022

What I did

To support gearbox port counter in CLI, following sonic-net/sonic-swss#2218 and sonic-net/sonic-swss-common#622.

How I did it

Use swsscommon CounterTable API and PortCounter type, covering different underlying switch architecture, asic-only, asic+gearbox.

How to verify it

junhuazhai@3221a2294104:/sonic/src/sonic-utilities$ pytest-3 tests/portstat_test.py
================================================================================================================================= test session starts =================================================================================================================================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /sonic/src/sonic-utilities/tests, inifile: pytest.ini
plugins: pyfakefs-4.5.6, cov-2.6.0
collected 20 items

tests/portstat_test.py ....................                                                                                                                                                                                                                                     [100%]

============================================================================================================================= 20 passed in 40.83 seconds ==============================================================================================================================

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@jimmyzhai
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jimmyzhai jimmyzhai marked this pull request as ready for review June 14, 2022 03:53
@jimmyzhai jimmyzhai requested a review from lguohan June 24, 2022 05:59
@jimmyzhai
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jimmyzhai jimmyzhai merged commit 8dee36c into sonic-net:master Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants