Commit 90efd62
authored
[Show | Command Reference] Add Port breakout Show Command (sonic-net#859)
**- What I did**
Implemented show interface breakout sub-command to show the port capability and the current breakout mode.
Available commands are mentioned below.
```
show interfaces breakout --help
show interfaces breakout current-mode
```
**- How I did it**
using platform.json, hwsku.json and config-db BREAKOUT_CFG table.
**- How to verify it**
```
admin@lnos-x1-a-fab01:~$ show interfaces breakout --help
Usage: show interfaces breakout [OPTIONS] COMMAND [ARGS]...
Show interface breakout
Options:
-?, -h, --help Show this message and exit.
Commands:
current-mode Show interface breakout current-mode
```
```
admin@lnos-x1-a-fab01:~$ show interfaces breakout
{
"Ethernet0": {
"index": "1,1,1,1",
"default_brkout_mode": "1x100G[40G]",
"child ports": "Ethernet0",
"child port speed": "100G",
"breakout_modes": "1x100G[40G],2x50G,4x25G[10G]",
"Current Breakout Mode": "1x100G[40G]",
"lanes": "65,66,67,68",
"alias_at_lanes": "Eth1/1, Eth1/2, Eth1/3, Eth1/4"
},
"Ethernet4": {
"index": "2,2,2,2",
"default_brkout_mode": "1x100G[40G]",
"child ports": "Ethernet4,Ethernet5,Ethernet6,Ethernet7",
"child port speed": "25G,10G,25G,25G",
"breakout_modes": "1x100G[40G],2x50G,4x25G[10G]",
"Current Breakout Mode": "4x25G",
"lanes": "69,70,71,72",
"alias_at_lanes": "Eth2/1, Eth2/2, Eth2/3, Eth2/4"
},
"Ethernet8": {
"index": "3,3,3,3",
"default_brkout_mode": "1x100G[40G]",
"child ports": "Ethernet8",
"child port speed": "100G",
"breakout_modes": "1x100G[40G],2x50G,4x25G[10G]",
"Current Breakout Mode": "1x100G[40G]",
"lanes": "73,74,75,76",
"alias_at_lanes": "Eth3/1, Eth3/2, Eth3/3, Eth3/4"
},... continue
}
```
```
admin@lnos-x1-a-fab01:~$ show interfaces breakout current-mode Ethernet0
+-------------+-------------------------+
| Interface | Current Breakout Mode |
+=============+=========================+
| Ethernet0 | 4x25G[10G] |
+-------------+-------------------------+
```
```
admin@lnos-x1-a-fab01:~$ show interfaces breakout current-mode
+-------------+-------------------------+
| Interface | Current Breakout Mode |
+=============+=========================+
| Ethernet0 | 4x25G[10G] |
+-------------+-------------------------+
| Ethernet4 | 4x25G[10G] |
+-------------+-------------------------+
| Ethernet8 | 4x25G[10G] |
+-------------+-------------------------+
```
Signed-off-by: Sangita Maity <[email protected]>1 parent fa19b4c commit 90efd62
File tree
4 files changed
+236
-0
lines changed- doc
- show
- sonic-utilities-tests
- mock_tables
4 files changed
+236
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2345 | 2345 | | |
2346 | 2346 | | |
2347 | 2347 | | |
| 2348 | + | |
2348 | 2349 | | |
2349 | 2350 | | |
2350 | 2351 | | |
| |||
2354 | 2355 | | |
2355 | 2356 | | |
2356 | 2357 | | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
2357 | 2408 | | |
2358 | 2409 | | |
2359 | 2410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
184 | 200 | | |
185 | 201 | | |
186 | 202 | | |
| |||
789 | 805 | | |
790 | 806 | | |
791 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
792 | 903 | | |
793 | 904 | | |
794 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments