Page MenuHomeVyOS Platform

show nat source statistics lack argument --family
Closed, ResolvedPublicBUG

Description

show nat source statistics lack argument family
As we use in the commit argument --family for function def _get_raw_data_rules(direction, family):
We require this argument also for function nat.py show_statistics

vyos@r14:~$ show nat source statistics 
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/nat.py", line 201, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 145, in run
    res = func(**args)
  File "/usr/libexec/vyos/op_mode/nat.py", line 192, in show_statistics
    nat_statistics = _get_raw_data_rules(direction)
TypeError: _get_raw_data_rules() missing 1 required positional argument: 'family'
vyos@r14:~$

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202208220217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to In progress.Aug 25 2022, 12:15 PM
Viacheslav claimed this task.
Viacheslav created this task.

PR https://github.com/vyos/vyos-1x/pull/1497

vyos@r14:~$ show nat source statistics 
Rule    Packets    Bytes    Interface
------  ---------  -------  -----------
100     1279       107896   eth0
120     1          60       eth1
vyos@r14:~$
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.