[macsec]: show macsec: add --profile option, include profile name in show command output (#13940)

This PR is to add the following

Add a new options "--profile" to the show macsec command, to show all profiles in device
Update the currentl show macsec command, to show profile in each interface o/p. This will tell which macsec profile the interface is attached to.
This commit is contained in:
judyjoseph
2023-04-27 08:51:28 -07:00
committed by GitHub
parent 9c3b7fe199
commit 6370257fa3
3 changed files with 168 additions and 15 deletions

View File

@@ -23,3 +23,7 @@ class TestShowMACsec(object):
result = runner.invoke(show_macsec.macsec,["Ethernet1"])
assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info)
def test_show_profile(self):
runner = CliRunner()
result = runner.invoke(show_macsec.macsec,["--profile"])
assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info)