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/console] Support update console configuration related commands #1166

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

Blueve
Copy link
Contributor

@Blueve Blueve commented Oct 12, 2020

- What I did

  • Support config console remote_device command
  • Support config console baud command
  • Support config console flow_control command

For more detail regarding the design, please refer to HLD(section 3.3.1.2.2/3.3.1.2.3/3.3.1.2.4): https://github.com/Azure/SONiC/blob/master/doc/console/SONiC-Console-Switch-High-Level-Design.md#3312-config

- How I did it

  • Add new commands in console.py file to support update related config console commands
  • Add UTs for new added commands

- How to verify it

  1. UTs are all passed
---------- coverage: platform linux2, python 2.7.16-final-0 ----------
Name                                       Stmts   Miss  Cover
--------------------------------------------------------------
config/console.py                             94      1    99%
  1. Tested on a physical SONiC DUT

Error handling:

sudo config console baud 2 9600
Usage: config console baud [OPTIONS] <line_number> <baud>
Try "config console baud -h" for help.

admin@sonic:~$ sudo config console remote_device 2 switch1
Usage: config console remote_device [OPTIONS] <line_number> <device_name>
Try "config console remote_device -h" for help.

Error: Given device name switch1 has been used. Please enter a valid device name or remove the existing one !!

Positive result:

admin@sonic:~$ sudo config console baud 1 115000
admin@sonic:~$ sudo config console remote_device 1 switch1
admin@sonic:~$ sudo config console flow_control enable 1
admin@sonic:~$ sudo config console flow_control disable 1

- 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)

@Blueve Blueve force-pushed the dev/jika/config_console_update branch from c751054 to 4f42ca1 Compare October 12, 2020 09:07
@Blueve Blueve marked this pull request as ready for review October 14, 2020 08:37
@Blueve Blueve requested a review from yxieca October 14, 2020 08:38
@Blueve Blueve merged commit c382d89 into sonic-net:master Oct 15, 2020
@Blueve Blueve deleted the dev/jika/config_console_update branch October 15, 2020 02:33
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