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
f2642f01
Commit
f2642f01
authored
9 years ago
by
Tulio Ribeiro
Browse files
Options
Downloads
Patches
Plain Diff
Minor bug corrections at startUp time.
NullPointerException verifications. ant tests passed.
parent
ab3da0f4
Branches
v0.82
Tags
v0.82
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/simpleft/FT.java
+15
-18
15 additions, 18 deletions
src/main/java/net/floodlightcontroller/simpleft/FT.java
with
15 additions
and
18 deletions
src/main/java/net/floodlightcontroller/simpleft/FT.java
+
15
−
18
View file @
f2642f01
...
@@ -2,7 +2,6 @@ package net.floodlightcontroller.simpleft;
...
@@ -2,7 +2,6 @@ package net.floodlightcontroller.simpleft;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -74,9 +73,6 @@ IRPCListener
...
@@ -74,9 +73,6 @@ IRPCListener
@Override
@Override
public
Collection
<
Class
<?
extends
IFloodlightService
>>
getModuleServices
()
{
public
Collection
<
Class
<?
extends
IFloodlightService
>>
getModuleServices
()
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
/*Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
return l;*/
return
null
;
return
null
;
}
}
...
@@ -84,9 +80,6 @@ IRPCListener
...
@@ -84,9 +80,6 @@ IRPCListener
@Override
@Override
public
Map
<
Class
<?
extends
IFloodlightService
>,
IFloodlightService
>
getServiceImpls
()
{
public
Map
<
Class
<?
extends
IFloodlightService
>,
IFloodlightService
>
getServiceImpls
()
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
/*Map<Class<? extends IFloodlightService>, IFloodlightService> m =
new HashMap<Class<? extends IFloodlightService>, IFloodlightService>();
return m;*/
return
null
;
return
null
;
}
}
...
@@ -96,10 +89,8 @@ IRPCListener
...
@@ -96,10 +89,8 @@ IRPCListener
// TODO Auto-generated method stub
// TODO Auto-generated method stub
Collection
<
Class
<?
extends
IFloodlightService
>>
l
=
Collection
<
Class
<?
extends
IFloodlightService
>>
l
=
new
ArrayList
<
Class
<?
extends
IFloodlightService
>>();
new
ArrayList
<
Class
<?
extends
IFloodlightService
>>();
//l.add(IFloodlightProviderService.class);
l
.
add
(
IStorageSourceService
.
class
);
l
.
add
(
IStorageSourceService
.
class
);
l
.
add
(
ISyncService
.
class
);
l
.
add
(
ISyncService
.
class
);
l
.
add
(
IThreadPoolService
.
class
);
l
.
add
(
IOFSwitchService
.
class
);
l
.
add
(
IOFSwitchService
.
class
);
return
l
;
return
l
;
}
}
...
@@ -146,8 +137,6 @@ IRPCListener
...
@@ -146,8 +137,6 @@ IRPCListener
return
null
;
return
null
;
}
}
@Override
@Override
public
void
keysModified
(
Iterator
<
String
>
keys
,
public
void
keysModified
(
Iterator
<
String
>
keys
,
org
.
sdnplatform
.
sync
.
IStoreListener
.
UpdateType
type
)
{
org
.
sdnplatform
.
sync
.
IStoreListener
.
UpdateType
type
)
{
...
@@ -163,7 +152,7 @@ IRPCListener
...
@@ -163,7 +152,7 @@ IRPCListener
);*/
);*/
if
(
type
.
name
().
equals
(
"REMOTE"
)){
if
(
type
.
name
().
equals
(
"REMOTE"
)){
String
swIds
=
storeFT
.
get
(
k
).
getValue
();
String
swIds
=
storeFT
.
get
(
k
).
getValue
();
logger
.
debug
(
"REMOTE:
key:{}, Value
:{}"
,
k
,
swIds
);
logger
.
debug
(
"REMOTE:
NodeId:{}, Switches
:{}"
,
k
,
swIds
);
}
}
}
catch
(
SyncException
e
)
{
}
catch
(
SyncException
e
)
{
// TODO Auto-generated catch block
// TODO Auto-generated catch block
...
@@ -210,8 +199,10 @@ IRPCListener
...
@@ -210,8 +199,10 @@ IRPCListener
@Override
@Override
public
void
switchChanged
(
DatapathId
switchId
)
{
public
void
switchChanged
(
DatapathId
switchId
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
String
switches
=
getActiveSwitches
();
if
(
switches
==
null
)
return
;
try
{
try
{
this
.
storeFT
.
put
(
controllerId
,
getActiveS
witches
()
);
this
.
storeFT
.
put
(
controllerId
,
s
witches
);
}
catch
(
SyncException
e
)
{
}
catch
(
SyncException
e
)
{
// TODO Auto-generated catch block
// TODO Auto-generated catch block
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -220,14 +211,20 @@ IRPCListener
...
@@ -220,14 +211,20 @@ IRPCListener
public
String
getActiveSwitches
(){
public
String
getActiveSwitches
(){
if
(
switchService
==
null
)
return
null
;
String
activeSwitches
=
""
;
String
activeSwitches
=
""
;
Iterator
<
DatapathId
>
itDpid
=
switchService
.
getAllSwitchDpids
().
iterator
();
Iterator
<
DatapathId
>
itDpid
=
switchService
.
getAllSwitchDpids
().
iterator
();
while
(
itDpid
.
hasNext
())
{
while
(
itDpid
.
hasNext
())
{
DatapathId
dpid
=
itDpid
.
next
();
DatapathId
dpid
=
itDpid
.
next
();
if
(
switchService
.
getActiveSwitch
(
dpid
).
isActive
()){
try
{
activeSwitches
+=
dpid
;
if
(
switchService
.
getActiveSwitch
(
dpid
).
isActive
()){
if
(
itDpid
.
hasNext
())
activeSwitches
+=
dpid
;
activeSwitches
+=
","
;
if
(
itDpid
.
hasNext
())
activeSwitches
+=
","
;
}
}
catch
(
NullPointerException
npe
){
return
null
;
}
}
}
}
return
activeSwitches
;
return
activeSwitches
;
...
@@ -274,7 +271,7 @@ IRPCListener
...
@@ -274,7 +271,7 @@ IRPCListener
public
void
connectedNode
(
Short
nodeId
)
{
public
void
connectedNode
(
Short
nodeId
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
String
activeSwicthes
=
getActiveSwitches
();
String
activeSwicthes
=
getActiveSwitches
();
logger
.
debug
(
"NodeID: {} connected,
informing
my switches: {}"
,
nodeId
,
activeSwicthes
);
logger
.
debug
(
"NodeID: {} connected, my switches: {}"
,
nodeId
,
activeSwicthes
);
try
{
try
{
storeFT
.
put
(
controllerId
,
activeSwicthes
);
storeFT
.
put
(
controllerId
,
activeSwicthes
);
}
catch
(
SyncException
e
)
{
}
catch
(
SyncException
e
)
{
...
...
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