From 83ae420601e255497c7b849ecefcac96648fced8 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Tue, 5 Jan 2021 11:54:10 +0000 Subject: vpn-op-mode: T2639: Sorting vpn ipsec sa --- src/op_mode/show_ipsec_sa.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/op_mode') 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) -- cgit v1.2.3