Low level openflow drivers have been promoted to the driver subsystem.
All new device drivers should provide a handshaking behaviour as well
as well as a pipeline behaviour.
Change-Id: I883830b074e5d254a8cc6100e6c4fa0023594a36
diff --git a/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/RoleManager.java b/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/RoleManager.java
index eac39c3..2d7e2e7 100644
--- a/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/RoleManager.java
+++ b/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/RoleManager.java
@@ -15,10 +15,8 @@
*/
package org.onosproject.openflow.controller.impl;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.concurrent.TimeUnit;
-
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
import org.onosproject.openflow.controller.RoleState;
import org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver;
import org.onosproject.openflow.controller.driver.RoleHandler;
@@ -30,7 +28,6 @@
import org.projectfloodlight.openflow.protocol.OFErrorType;
import org.projectfloodlight.openflow.protocol.OFExperimenter;
import org.projectfloodlight.openflow.protocol.OFFactories;
-import org.projectfloodlight.openflow.protocol.OFMessage;
import org.projectfloodlight.openflow.protocol.OFNiciraControllerRole;
import org.projectfloodlight.openflow.protocol.OFNiciraControllerRoleReply;
import org.projectfloodlight.openflow.protocol.OFRoleReply;
@@ -42,8 +39,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
/**
@@ -103,7 +100,7 @@
.setXid(xid)
.setRole(roleToSend)
.build();
- sw.write(Collections.<OFMessage>singletonList(roleRequest));
+ sw.sendRoleRequest(roleRequest);
return xid;
}
@@ -133,7 +130,8 @@
//FIXME fix below when we actually use generation ids
.setGenerationId(U64.ZERO)
.build();
- sw.write(rrm);
+
+ sw.sendRoleRequest(rrm);
return xid;
}