Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tom
2014-09-11 15:10:02 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
fe2dd7e6b57118969d5168bb6a8dd0e9e20531b6
fe2dd7e6
2 parents
613d8143
898033d5
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OpenFlowControllerImpl.java
of/ctl/src/main/java/org/onlab/onos/of/drivers/impl/DriverManager.java
of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OpenFlowControllerImpl.java
View file @
fe2dd7e
...
...
@@ -250,9 +250,12 @@ public class OpenFlowControllerImpl implements OpenFlowController {
}
OpenFlowSwitch
sw
=
activeMasterSwitches
.
remove
(
dpid
);
if
(
sw
==
null
)
{
log
.
error
(
"Transition to equal called on sw {}, but switch "
+
"was not found in controller-cache"
,
dpid
);
return
;
sw
=
getSwitch
(
dpid
);
if
(
sw
==
null
)
{
log
.
error
(
"Transition to equal called on sw {}, but switch "
+
"was not found in controller-cache"
,
dpid
);
return
;
}
}
log
.
info
(
"Transitioned switch {} to EQUAL"
,
dpid
);
activeEqualSwitches
.
put
(
dpid
,
sw
);
...
...
of/ctl/src/main/java/org/onlab/onos/of/drivers/impl/DriverManager.java
View file @
fe2dd7e
...
...
@@ -2,10 +2,15 @@ package org.onlab.onos.of.drivers.impl;
import
java.util.Collections
;
import
java.util.List
;
import
org.onlab.onos.of.controller.Dpid
;
import
org.onlab.onos.of.controller.driver.AbstractOpenFlowSwitch
;
import
org.onlab.onos.of.controller.driver.OpenFlowSwitchDriver
;
import
org.onlab.onos.of.controller.driver.OpenFlowSwitchDriverFactory
;
import
org.projectfloodlight.openflow.protocol.OFDescStatsReply
;
import
org.projectfloodlight.openflow.protocol.OFMessage
;
import
org.projectfloodlight.openflow.protocol.OFVersion
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -51,8 +56,36 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory {
}
log
.
warn
(
"DriverManager could not identify switch desc: {}. "
+
"Assigning OFSwitchImplBase"
,
desc
);
return
null
;
+
"Assigning AbstractOpenFlowSwich"
,
desc
);
return
new
AbstractOpenFlowSwitch
(
dpid
)
{
@Override
public
void
write
(
List
<
OFMessage
>
msgs
)
{
channel
.
write
(
msgs
);
}
@Override
public
void
write
(
OFMessage
msg
)
{
channel
.
write
(
Collections
.
singletonList
(
msg
));
}
@Override
public
Boolean
supportNxRole
()
{
return
false
;
}
@Override
public
void
startDriverHandshake
()
{}
@Override
public
void
processDriverHandshakeMessage
(
OFMessage
m
)
{}
@Override
public
boolean
isDriverHandshakeComplete
()
{
return
true
;
}
};
}
/**
...
...
Please
register
or
login
to post a comment