bookkeeper
bookkeeper copied to clipboard
[improve] Enable hostname specification as a script argument for topology script
Motivation
Currently, when using ScriptBasedMapping for network location resolution via the topology script, only IP addresses are passed to the script.
In some situations it is preferable to pass hostnames instead of IPs.
This PR introduces a configuration option to enable that behavior.
Changes
- Added a new configuration key:
networkTopologyScriptUseHostNameArgs- default:
false - when set to
true,ScriptBasedMappingpasses hostnames instead of IP addresses to the topology script.
- default:
- Updated
CachedDNSToSwitchMappingandScriptBasedMapping.RawScriptBasedMappingto respect this setting. - Added corresponding unit test:
TestRackawareEnsemblePlacementPolicyUsingScript.testUseHostnameArgsOption
rerun failure checks