Skip to content

[config/console] Support update console configuration related commands - #1166

Merged
Blueve merged 1 commit into
sonic-net:masterfrom
Blueve:dev/jika/config_console_update
Oct 15, 2020
Merged

Blueve merged 1 commit into
sonic-net:masterfrom
Blueve:dev/jika/config_console_update

Conversation

@Blueve

@Blueve Blueve commented Oct 12, 2020 •

Copy link
Copy Markdown
Contributor

- 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