"show snmp v3" command output contain unnecessary data

The output of the “show snmp v3” command and its sub commands contain unnecessary data
I was able to confirm this with the following command:

show snmp v3
show snmp v3 group
show snmp v3 trap-target
show snmp v3 user
show snmp v3 view

testing environment

$ show version
Version:          VyOS 1.5-rolling-202405280020
Release train:    current
Release flavor:   iso

Built by:         autobuild@vyos.net
Built on:         Tue 28 May 2024 03:11 UTC
Build UUID:       e42d9cb2-26e1-4736-b508-b119b9a640ad
Build commit ID:  b809886538eaad

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  innotek GmbH
Hardware model:   VirtualBox
Hardware S/N:     0
Hardware UUID:    6c4524b7-02b6-a045-83ab-a8a3abb082b3

Copyright:        VyOS maintainers and contributors

reproduction procedure

$ show snmp v3 user
SNMP v3 is not configured

# set service snmp v3 engineid '000000000000000000000002'
# set service snmp v3 group default mode 'ro'
# set service snmp v3 group default view 'default'
# set service snmp v3 user vyos auth plaintext-password 'vyos12345678'
# set service snmp v3 user vyos auth type 'sha'
# set service snmp v3 user vyos group 'default'
# set service snmp v3 user vyos privacy plaintext-password 'vyos12345678'
# set service snmp v3 user vyos privacy type 'aes'
# set service snmp v3 view default oid 1
# commit

vyos@vyos:~$ show snmp v3 group
{'group': [{'name': 'default', 'mode': 'ro', 'view': 'default'}], 'trap': [], 'user': [{'name': 'vyos', 'mode': None, 'a
uth': 'sha', 'priv': 'aes', 'group': 'default'}], 'view': [{'name': 'default', 'oids': ['1']}]}

SNMPv3 Groups:

    Group               View
    -----               ----

    default             default(ro)

expected output

vyos@vyos:~$ show snmp v3 group

SNMPv3 Groups:

    Group               View
    -----               ----

    default             default(ro)

The cause seems to be the following code: github

print(data)

According to git blame that line of code have been around for the past 6 years so ehm…

Do you have access to some older releases like 1.3.x to test the same thing there (since 1.4 and 1.5 are so close)?

Or if someone else in the forum with a 1.3 installation who can confirm you get the same odd output as @tt2tak ?

Can you open a bug report here https://vyos.dev/
Thanks

You can check it without images, just check required branch as the link to the bug is provided :slight_smile:

I was refering to:

T683: Initial version for SNMP op mode command definition in XML

Commited by c-po on Jun 14, 2018.

@Apachez in the PR, a back port was requested for both 1.4 and 1.3 and is in the process of being merged