Skip to content
Snippets Groups Projects
Commit 268cd361 authored by abat's avatar abat
Browse files

Merge into master from pull request #277:

allowing modules to transparently inherit configuration parameters from ... (https://github.com/floodlight/floodlight/pull/277)
parents 2d139cb6 c2a01eb5
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,19 @@ public class FloodlightModuleContext implements IFloodlightModuleContext {
retMap = new HashMap<String, String>();
configParams.put(module.getClass(), retMap);
}
// also add any configuration parameters for superclasses, but
// only if more specific configuration does not override it
for (Class<? extends IFloodlightModule> c : configParams.keySet()) {
if (c.isInstance(module)) {
for (Map.Entry<String, String> ent : configParams.get(c).entrySet()) {
if (!retMap.containsKey(ent.getKey())) {
retMap.put(ent.getKey(), ent.getValue());
}
}
}
}
return retMap;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment