diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-01-05 20:50:28 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 20:50:28 +0700 |
commit | c1423c71feae84a063f1674ed34d5981e685d6eb (patch) | |
tree | 5cb680a5dd5092f654e3d97edaff053114466ec0 /src/op_mode/show_ipsec_sa.py | |
parent | 7efa32fdf3b188f0bf302253a4721a0331ddef97 (diff) | |
parent | 83ae420601e255497c7b849ecefcac96648fced8 (diff) | |
download | vyos-1x-c1423c71feae84a063f1674ed34d5981e685d6eb.tar.gz vyos-1x-c1423c71feae84a063f1674ed34d5981e685d6eb.zip |
Merge pull request #670 from sever-sever/T2639
vpn-op-mode: T2639: Sorting vpn ipsec sa
Diffstat (limited to 'src/op_mode/show_ipsec_sa.py')
-rwxr-xr-x | src/op_mode/show_ipsec_sa.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/op_mode/show_ipsec_sa.py b/src/op_mode/show_ipsec_sa.py index e319cc38d..b7927fcc2 100755 --- a/src/op_mode/show_ipsec_sa.py +++ b/src/op_mode/show_ipsec_sa.py @@ -107,5 +107,6 @@ for sa in sas: sa_data.append(data) headers = ["Connection", "State", "Uptime", "Bytes In/Out", "Packets In/Out", "Remote address", "Remote ID", "Proposal"] +sa_data = sorted(sa_data, key=lambda peer: peer[0]) output = tabulate.tabulate(sa_data, headers) print(output) |