luslab-umitools | Added parameter overriding function to umi_tools

This commit is contained in:
Candice 2020-06-01 15:02:21 +02:00
parent 549f81e4ea
commit e00b7bd91e

View file

@ -0,0 +1,19 @@
class NfUtils{
def check_internal_overrides(String moduleName, Map params)
{
// get params set of keys
Set paramsKeySet = params.keySet()
// Interate through and set internals to the correct parameter at runtime
paramsKeySet.each {
if(it.startsWith("internal_")) {
def searchString = moduleName + '_' + it.replace('internal_', '');
if(paramsKeySet.contains(searchString)) {
params.replace(it, params.get(searchString))
}
}
}
}
}