Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
c2a01eb5
Commit
c2a01eb5
authored
12 years ago
by
Colin Dixon
Browse files
Options
Downloads
Patches
Plain Diff
allowing modules to transparently inherit configuration parameters from their superclasses
parent
e0566f44
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java
+13
-0
13 additions, 0 deletions
...dlightcontroller/core/module/FloodlightModuleContext.java
with
13 additions
and
0 deletions
src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java
+
13
−
0
View file @
c2a01eb5
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment