[show] Issue in CLI output alignment with shorter alias names in intf naming mode "alias" #1397#1411
Conversation
Fix for sonic-net#13 **- What I did** Added fix **- How I did it** Added code to remove last few extra characters from string **- How to verify it** Steps to reproduce: 1. Change the naming mode to alias instead of port names admin@sonic-svk169-dut:~$ config interface_naming_mode 2. Update config_db.json for port section to change alias t 3. Reload and run following command **- New command output With shorter alias names: admin@sonic-svk169-dut:~$ show interfaces counters IFACE STATE RX_OK RX_BPS RX_UTIL RX_ERR R ------- ------- ------- -------- --------- -------- - P0 X 0 N/A N/A 0 P4 X 0 N/A N/A 0 Signed-off-by: Maulik Patel <[email protected]>
|
retest this please |
|
May be i'm missing, i don't see a difference b/w previous output and new output.. can you please highlight the diff? |
@maulik-innovium: Can you please format the command output using markdown code blocks (surround with three backticks)? This will use a monospaced font and allow us to see the differences better. |
Thanks for the review, updated the command output using markdown code blocks. |
Thanks for the review, updated the command output using markdown code blocks. Please note the extra ('---') characters under first column, which makes all the other column's data out of table alignment. |
@maulik-innovium: Thanks. The command output is better now, but the alignment is messed up. Can you please fix? |
Sorry, i am not sure which alignment is messed up. Can you please point that? - New command output (if the output of a command-line utility has changed) For shorter alias names like P0, P1, etc.. For bigger alias names: |
The minor alignment mismatch could be because of the way i copied it from console and pasting it here. |
|
Retest this please |
build is fine, can you please help merge this? |
That comment wasn't directed at you. It is a special phrase to re-run our Jenkins-based check builds. We do not merge pull requests unless all check builds pass. |
… naming mode "alias" #1397 (#1411) #### What I did Added fix for Issue in CLI output alignment with shorter alias names in intf naming mode "alias" #### How I did it Added code to remove last few extra characters from string (-------…) using Slicing & Positive Indexing in python, to match the width to alias's name(not interface)
… naming mode "alias" sonic-net#1397 (sonic-net#1411) #### What I did Added fix for Issue in CLI output alignment with shorter alias names in intf naming mode "alias" #### How I did it Added code to remove last few extra characters from string (-------…) using Slicing & Positive Indexing in python, to match the width to alias's name(not interface)
Fix #1397
- What I did
Added fix for Issue in CLI output alignment with shorter alias names in intf naming mode "alias"
- How I did it
Added code to remove last few extra characters from string (-------…) using Slicing & Positive Indexing in python, to match the width to alias's name(not interface)
- How to verify it
Steps to reproduce:
1. Change the naming mode to alias instead of port names
admin@sonic-svk169-dut:~$ config interface_naming_mode alias
2. Update config_db.json for port section to change alias to shorter names like below
3. Reload and run following command
- Previous command output (if the output of a command-line utility has changed)
For shorter alias names like P0, P1, etc..
- New command output (if the output of a command-line utility has changed)
For shorter alias names like P0, P1, etc..
For bigger alias names: