diff options
author | Christian Breunig <christian@breunig.cc> | 2023-03-27 08:44:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 08:44:58 +0200 |
commit | 19ff8d43d2ad1adcea7d3d98756c58c836b7116f (patch) | |
tree | b035441b5225b243a727b8eb75e627a9481056fa | |
parent | 8f1e8d720d63dffa2b5a3413c8827c9ad176f2ac (diff) | |
parent | b48e9a7c4cc89546aaf4a40f71535acfddc7e4d3 (diff) | |
download | vyos-1x-19ff8d43d2ad1adcea7d3d98756c58c836b7116f.tar.gz vyos-1x-19ff8d43d2ad1adcea7d3d98756c58c836b7116f.zip |
Merge pull request #1911 from jestabro/counters
op-mode: T5097: show interfaces should reflect cleared counters
-rwxr-xr-x | src/op_mode/interfaces.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/op_mode/interfaces.py b/src/op_mode/interfaces.py index 678c74980..7d04ec4e3 100755 --- a/src/op_mode/interfaces.py +++ b/src/op_mode/interfaces.py @@ -207,7 +207,11 @@ def _get_raw_data(ifname: typing.Optional[str], res_intf['description'] = interface.get_alias() - res_intf['stats'] = interface.operational.get_stats() + stats = interface.operational.get_stats() + for k in list(stats): + stats[k] = _get_counter_val(cache[k], stats[k]) + + res_intf['stats'] = stats ret.append(res_intf) |