sonic-utilities
sonic-utilities copied to clipboard
[dpu_tty]: Add a DPU TTY console utility
- Add dpu_tty.py
- Add dpu_tty.py to scripts
Signed-off-by: Wenchung Wang [email protected]
What I did
Add DPU TTY console utility.
How I did it
- Read platform.json to retrieve TTY settings in DPUS section. Set up TTY console according to TTY device name and baud rate.
- Also provide options to overwrite default TTY device and baud rate.
"DPUS": {
"dpu0": {
"serial-console": {
"device": "ttyS4",
"baud-rate": "115200"
}
},
"dpu1": {
"serial-console": {
"device": "ttyS5",
"baud-rate": "115200"
}
}
},
How to verify it
Run the utility on a smart switch that provides DPU UART console via ttyS device. The test plan is at https://github.com/sonic-net/sonic-mgmt/pull/12701/files section 1.4.
Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)
N/A
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: wenchungw / name: Wenchung Wang (9e3b18488e95f9450ad5b51a1bb524ee6d8c28d6, daec93fc36209863576dc2db841089f7e2cd3609, a7248496955f4ad537b16e84ecff36578d4b3f76, bfec7a9a28a38540eba0046595d95d2e22c80382, d2398bcf0b5ef4bbe5ffcf281ede7d9d4bae06e8, c993bfb3097ca96023b3abe38a80d1684e0517f7, a40adfce28a07d74549dba9b83b8753246cb6043, 31840f35c4c2578f42cfb6775c817b5be90bac64)
@wenchungw could you update this document to explain the new CLI being proposed?
https://github.com/sonic-net/sonic-utilities/blob/master/doc/Command-Reference.md
Please add a new section "Console"
Added.
As commented. Please also cover the application with the tests
Added a test log.
@oleksandrivantsiv please review/approve