Hi all,

I'd like to bring to your attention a PR which I made about treating location configuration
and in feature possibly Entity and other configurations.

https://github.com/apache/brooklyn-server/pull/151

I introduced a CollectionHelpersTest.mergeMapsAndTheirInnerMapValues(Map aMap, Map bMap) method which can be used for other use cases as well. It is a helper which extends the MutableMap#put(key, newValue) and ConfigBag#putAll(ConfigBag newConfig) functionality. It goes one level deeper and for the values which are of type Map it merges the value from bMap to the corresponding Map value in aMap.
Check CollectionHelpersTest in the PR if I didn't explain well.

To achieve what I described in [1] for locations configuration I did the following: - modified the ConfigBag.newInstanceExtending(final ConfigBag configBag, Map<?,?> optionalAdditionalValues) which is used in JcloudsLocation#obtain and FixedListMachineProvisioningLocation#obtain - modified AbstractLocation#addToLocalBag(Map flags) to merge provisioning.properties values instead overriding with values from there.

Can you please share your thoughts about this feature?

Best,
Valentin.

[1] https://github.com/bostko/brooklyn-server/blob/d53da63f35cca594ecc16ef7c9c4fed4d231a97e/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/EmptySoftwareProcessYamlTest.java#L68-L93

Reply via email to