[OpenNMS/opennms] f61bc2: NMS-20262: Make the JSON snmp-config download a fa...
Marshall Massengill via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/mm/NMS-20262-smoke/[email protected]> |
Branch: refs/heads/mm/NMS-20262-smoke
Home: https://github.com/OpenNMS/opennms
Commit: f61bc2d95a6016ead0d68604b9132ba6c0138d6f
https://github.com/OpenNMS/opennms/commit/f61bc2d95a6016ead0d68604b9132ba6c0138d6f
Author: Marshall Massengill <[email protected]>
Date: 2026-08-26 (Wed, 26 Aug 2026)
Changed paths:
M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/SnmpConfigRestService.java
M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/SnmpConfigRestServiceIT.java
Log Message:
-----------
NMS-20262: Make the JSON snmp-config download a faithful restore
GET /snmp-config/download?format=json serialized SnmpConfig through its
getters, and those getters substitute a default when the backing field is
null (timeout and retry return 0, port 161, max-vars-per-pdu 10, and so
on). Every value a definition inherited from the top-level config was
therefore written out as an explicit one, and re-uploading the file
through POST /snmp-config/upload pinned each definition's timeout and
retry to 0 - agents that had been polling on the global 1800 ms timeout
were left with none. The XML pair was unaffected because JAXB binds to
the fields.
Serialize the download from the fields instead, dropping nulls, so the
file carries only what was actually configured. The upload path and the
other JSON endpoints keep the existing mapper.
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs