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
alshabib
2014-09-11 13:09:13 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
898033d568864f9a19e6296020e2c017d4f55365
898033d5
1 parent
c7a691a9
default switch if description is unknown
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 @
898033d
...
...
@@ -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 @
898033d
...
...
@@ -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