Parameters with dots handled incorrectly in BMP feature config

Description

When BMP is configured to use Kafka persistence, the parameters which contain "." are not parsed properly from the adapter properties. The config below should result in parameter map entries of "kafka.bootstrap.servers" and "kafka.batch.size" for adapter 3. However, PropertyTree splits on "." and creates subtrees which are not handled properly in getMap().

 

See:

from(Map) and getMap() in features/telemetry/distributed/common/src/main/java/org/opennms/netmgt/telemetry/distributed/common/PropertyTree.java

createBean() in features/telemetry/protocols/bmp/adapter/src/main/java/org/opennms/netmgt/telemetry/protocols/bmp/adapter/openbmp/BmpIntegrationAdapterFactory.java

getParameterMap() in features/telemetry/distributed/common/src/main/java/org/opennms/netmgt/telemetry/distributed/common/MapBasedAdapterDef.java

 

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Zoë Knox June 9, 2020 at 2:27 PM

Merged to release-26.x branch on June 5.

Zoë Knox June 4, 2020 at 1:14 PM

PR#3028 https://github.com/OpenNMS/opennms/pull/3028

Patch was tried on the customer system and verified to fix the reported issue.

Zoë Knox June 2, 2020 at 8:05 PM

Created PropertyTree::getMapR(path) which traverses the tree rooted at "path" and builds keys from the nodes of the tree separated by dots. This is essentially the reverse of PropertyTree::from(map). It allows keys with dots to be parsed into the tree and then extracted from it.

Unit tests added.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

PagerDuty

Created June 1, 2020 at 3:12 PM
Updated June 9, 2020 at 2:27 PM
Resolved June 9, 2020 at 2:27 PM