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
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.
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