current ← c-po:snmp-trap
opened 10:22PM - 26 Nov 25 UTC
## Change summary
The generated Net-SNMP configuration for SNMPv3 trap-targ…ets was fundamentally broken. Not only was the auth/priv type not written in uppercase letters, but also the ordering of transport protocol, IP(v6) address and port was wrong.
To complete the issues above - IPv6 addresses did not get wrapped into mandatory [] brackets.
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes)
- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
- [ ] Other (please describe):
## Related Task(s)
* https://vyos.dev/T8039
## Related PR(s)
## How to test / Smoketest result
```
vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_service_snmp.py
test_snmp_basic (__main__.TestSNMPService.test_snmp_basic) ... ok
test_snmp_script_extensions (__main__.TestSNMPService.test_snmp_script_extensions) ... ok
test_snmpv3_md5 (__main__.TestSNMPService.test_snmpv3_md5) ... ok
test_snmpv3_sha (__main__.TestSNMPService.test_snmpv3_sha) ... ok
test_snmpv3_trap (__main__.TestSNMPService.test_snmpv3_trap) ... ok
test_snmpv3_view_exclude (__main__.TestSNMPService.test_snmpv3_view_exclude) ... ok
----------------------------------------------------------------------
Ran 6 tests in 19.347s
OK
```
## Checklist:
- [x] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document
- [x] I have linked this PR to one or more Phabricator Task(s)
- [x] I have run the components [**SMOKETESTS**](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) if applicable
- [x] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly