diff options
| author | Oleksandr Kuchmystyi <o.kuchmystyi@vyos.io> | 2026-05-25 17:15:13 +0300 |
|---|---|---|
| committer | Oleksandr Kuchmystyi <o.kuchmystyi@vyos.io> | 2026-05-25 17:15:13 +0300 |
| commit | 8f73bfbda0e43d83947624627ea0cdd8269521cb (patch) | |
| tree | f9fd10adb9b15484ad4eba228209ea4e143289d4 /src | |
| parent | 51ab39e51bb925307c0f9ad1d905d450ceecc0f5 (diff) | |
| download | vyos-1x-8f73bfbda0e43d83947624627ea0cdd8269521cb.tar.gz vyos-1x-8f73bfbda0e43d83947624627ea0cdd8269521cb.zip | |
conntrack: T8909: Remove connection id column from output table
This cleanup enhances readability and aligns the output
with the actual data being displayed.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/op_mode/conntrack.py | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/op_mode/conntrack.py b/src/op_mode/conntrack.py index ee1ae6174..f39012b2b 100755 --- a/src/op_mode/conntrack.py +++ b/src/op_mode/conntrack.py @@ -127,7 +127,6 @@ def get_formatted_output(dict_data): reply_dport = meta['layer4']['dport'] proto = meta['layer4']['protoname'] if direction == 'independent': - conn_id = meta['id'] # T6138 flowtable offload conntrack entries without 'timeout' timeout = meta.get('timeout', 'n/a') orig_src = f'{orig_src}:{orig_sport}' if orig_sport else orig_src @@ -137,10 +136,29 @@ def get_formatted_output(dict_data): state = meta['state'] if 'state' in meta else '' mark = meta['mark'] if 'mark' in meta else '' zone = meta['zone'] if 'zone' in meta else '' - data_entries.append( - [conn_id, orig_src, orig_dst, reply_src, reply_dst, proto, state, timeout, mark, zone]) - headers = ["Id", "Original src", "Original dst", "Reply src", "Reply dst", "Protocol", "State", "Timeout", "Mark", - "Zone"] + data_entry = [ + orig_src, + orig_dst, + reply_src, + reply_dst, + proto, + state, + timeout, + mark, + zone, + ] + data_entries.append(data_entry) + headers = [ + "Original src", + "Original dst", + "Reply src", + "Reply dst", + "Protocol", + "State", + "Timeout", + "Mark", + "Zone", + ] output = tabulate(data_entries, headers, numalign="left") return output |
