You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fdbshow] Adding more options for fdbshow and show mac (sonic-net#1982)
#### What I did
Added more options to filter output in show mac and fdbshow command.
Introduced options for filter by address and filter by type.
Added one more option to display only count.
Introduced show command to display fdb aging time in the switch.
#### How I did it
Modifying fdbshow and show scripts to include the above-mentioned options
#### How to verify it
Added UT for all the newly introduced options and commands
#### Previous command output (if the output of a command-line utility has changed)
```
show mac -h
Usage: show mac [OPTIONS]
Show MAC (FDB) entries
Options:
-v, --vlan TEXT
-p, --port TEXT
--verbose Enable verbose output
-h, -?, --help Show this message and exit.
```
#### New command output (if the output of a command-line utility has changed)
```
show mac -h
Usage: show mac [OPTIONS] COMMAND [ARGS]...
Show MAC (FDB) entries
Options:
-v, --vlan TEXT
-p, --port TEXT
-a, --address TEXT
-t, --type TEXT
-c, --count
--verbose Enable verbose output
-h, -?, --help Show this message and exit.
Commands:
aging-time
show mac
No. Vlan MacAddress Port Type
----- ------ ----------------- ----------- -------
1 10 98:03:9B:82:BB:5B Ethernet60 Dynamic
2 10 EC:0D:9A:CD:91:72 Ethernet64 Dynamic
3 10 EC:0D:9A:CD:91:73 Ethernet124 Dynamic
Total number of entries 3
show mac --address EC:0D:9A:CD:91:72
No. Vlan MacAddress Port Type
----- ------ ----------------- ---------- -------
1 10 EC:0D:9A:CD:91:72 Ethernet64 Dynamic
show mac --count
Total number of entries 3
show mac --type Dynamic
No. Vlan MacAddress Port Type
----- ------ ----------------- ----------- -------
1 10 98:03:9B:82:BB:5B Ethernet60 Dynamic
2 10 EC:0D:9A:CD:91:72 Ethernet64 Dynamic
3 10 EC:0D:9A:CD:91:73 Ethernet124 Dynamic
Total number of entries 3
show mac aging-time
Aging time for switch is 600 seconds
```
0 commit comments