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

[config] Add new command line to support mellanox sniffer #227

Merged
merged 2 commits into from
Apr 23, 2018
Merged

[config] Add new command line to support mellanox sniffer #227

merged 2 commits into from
Apr 23, 2018

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Mar 30, 2018

modified:   config/main.py
new file:   config/mlnx.py

Signed-off-by: Kebo Liu [email protected]

- What I did
Add new command line for Mellanox SDK sniffers
- How I did it
Add new cli group "platform" under "config" command.
"mlnx" subgroup of "platform" group is for Mellanox platform specific CLI
Add command "config platform mlnx sniffer sdk enable" to enable sdk sniffer
Add command "config platform mlnx sniffer sdk disable" to disable sdk sniffer
- How to verify it
On Mellanox platform can issue these command to enable and disable sdk sniffer.
- Previous command output (if the output of a command-line utility has changed)
please refer to design doc https://github.com/Azure/SONiC/wiki/Mellanox-SDK-and-PRM-Sniffer-Utility-CLI-Design-for-SONiC
- New command output (if the output of a command-line utility has changed)
please refer to design doc https://github.com/Azure/SONiC/wiki/Mellanox-SDK-and-PRM-Sniffer-Utility-CLI-Design-for-SONiC

This PR needs sonic-buildimage#1551 merged first.

	modified:   config/main.py
	new file:   config/mlnx.py

Signed-off-by:  Kebo Liu [email protected]
    do not pass ENV variable to syncd container by recreate the container
    instead manipulate the supervisord conf file to achieve it.

  Changes to be committed:
	modified:   config/mlnx.py

  signed-off-by [email protected]
@cli.group()
def platform():
"""Platform-related configuration tasks"""
platform.add_command(mlnx.mlnx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this indentation work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stcheng It works well, please refer to line 163 in the same file to see how it load 'aaa' command group.

@lguohan lguohan merged commit 7b31091 into sonic-net:master Apr 23, 2018
@keboliu keboliu deleted the mlnx-sniffer branch April 24, 2018 01:04
@nikos-github
Copy link
Contributor

@lguohan @keboliu This commit is exposing mlnx specific cli in non mlnx platforms. Please fix.
root@sonic:/# show platform summary
Platform: x86_64-dell_z9100_c2538-r0
HwSKU: Force10-Z9100
ASIC: broadcom

root@sonic:/# show platform ?
Usage: show platform [OPTIONS] COMMAND [ARGS]...

Show platform-specific hardware info

Options:
-?, -h, --help Show this message and exit.

Commands:
mlnx Mellanox platform specific configuration...
psustatus Show PSU status information
summary Show hardware platform information
syseeprom Show system EEPROM information
root@sonic:/# show platform mlnx ?
Usage: show platform mlnx [OPTIONS] COMMAND [ARGS]...

Mellanox platform specific configuration tasks

Options:
-?, -h, --help Show this message and exit.

Commands:
sniffer Sniffer running status
root@sonic:/# show platform mlnx sniffer
sdk sniffer is OFF

@nikos-github
Copy link
Contributor

@keboliu @lguohan Same for config:
root@sonic:/# config platform ?
Usage: config platform [OPTIONS] COMMAND [ARGS]...

Platform-related configuration tasks

Options:
--help Show this message and exit.

Commands:
mlnx Mellanox platform specific configuration...

@keboliu
Copy link
Collaborator Author

keboliu commented Oct 8, 2018

@nikos-github thanks for reporting this issue, added it to todo list.

mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants