alshabib

cleaning

...@@ -65,7 +65,6 @@ import org.slf4j.LoggerFactory; ...@@ -65,7 +65,6 @@ import org.slf4j.LoggerFactory;
65 */ 65 */
66 class OFChannelHandler extends IdleStateAwareChannelHandler { 66 class OFChannelHandler extends IdleStateAwareChannelHandler {
67 private static final Logger log = LoggerFactory.getLogger(OFChannelHandler.class); 67 private static final Logger log = LoggerFactory.getLogger(OFChannelHandler.class);
68 - private static final long DEFAULT_ROLE_TIMEOUT_MS = 2 * 1000; // 10 sec
69 private final Controller controller; 68 private final Controller controller;
70 private AbstractOpenFlowSwitch sw; 69 private AbstractOpenFlowSwitch sw;
71 private long thisdpid; // channelHandler cached value of connected switch id 70 private long thisdpid; // channelHandler cached value of connected switch id
......
1 package org.onlab.onos.of.drivers; 1 package org.onlab.onos.of.drivers;
2 2
3 3
4 -import java.util.List;
5 4
6 import org.onlab.onos.of.controller.Dpid; 5 import org.onlab.onos.of.controller.Dpid;
7 import org.onlab.onos.of.controller.RoleState; 6 import org.onlab.onos.of.controller.RoleState;
...@@ -56,52 +55,39 @@ public final class DriverManager { ...@@ -56,52 +55,39 @@ public final class DriverManager {
56 + "Assigning OFSwitchImplBase", desc); 55 + "Assigning OFSwitchImplBase", desc);
57 AbstractOpenFlowSwitch base = new AbstractOpenFlowSwitch(dpid) { 56 AbstractOpenFlowSwitch base = new AbstractOpenFlowSwitch(dpid) {
58 57
59 - @Override
60 - public void write(List<OFMessage> msgs) {
61 - // TODO Auto-generated method stub
62 - }
63 58
64 @Override 59 @Override
65 public void sendMsg(OFMessage m) { 60 public void sendMsg(OFMessage m) {
66 - // TODO Auto-generated method stub 61 + channel.write(m);
67 } 62 }
68 63
69 @Override 64 @Override
70 public Boolean supportNxRole() { 65 public Boolean supportNxRole() {
71 - // TODO Auto-generated method stub 66 + return false;
72 - return null;
73 } 67 }
74 68
75 @Override 69 @Override
76 - public void startDriverHandshake() { 70 + public void startDriverHandshake() {}
77 - // TODO Auto-generated method stub
78 - }
79 71
80 @Override 72 @Override
81 public void setFeaturesReply(OFFeaturesReply featuresReply) { 73 public void setFeaturesReply(OFFeaturesReply featuresReply) {
82 - // TODO Auto-generated method stub 74 + this.features = featuresReply;
83 -
84 } 75 }
85 76
86 @Override 77 @Override
87 - public void processDriverHandshakeMessage(OFMessage m) { 78 + public void processDriverHandshakeMessage(OFMessage m) {}
88 - // TODO Auto-generated method stub
89 - }
90 79
91 @Override 80 @Override
92 public boolean isDriverHandshakeComplete() { 81 public boolean isDriverHandshakeComplete() {
93 - // TODO Auto-generated method stub 82 + return true;
94 - return false;
95 } 83 }
96 84
97 @Override 85 @Override
98 public RoleState getRole() { 86 public RoleState getRole() {
99 - // TODO Auto-generated method stub 87 + return role;
100 - return null;
101 } 88 }
102 }; 89 };
103 base.setSwitchDescription(desc); 90 base.setSwitchDescription(desc);
104 - // XXX S must set counter here - unidentified switch
105 return base; 91 return base;
106 } 92 }
107 93
......