use of org.onosproject.openflow.OpenFlowSwitchListenerAdapter in project onos by opennetworkinglab.
the class OpenFlowControllerImplPacketsTest method setUp.
/**
* Sets up switches to use as data, mocks and launches a controller instance.
*/
@Before
public void setUp() {
try {
switch1 = new OpenflowSwitchDriverAdapter();
dpid1 = Dpid.dpid(new URI("of:0000000000000111"));
} catch (URISyntaxException ex) {
// Does not happen
fail();
}
controller = new OpenFlowControllerImpl();
agent = controller.agent;
switchListener = new OpenFlowSwitchListenerAdapter();
controller.addListener(switchListener);
packetListener = new TestPacketListener();
controller.addPacketListener(100, packetListener);
statsExecutorService = new TestExecutorService();
errorMsgExecutorService = new TestExecutorService();
controller.executorMsgs = statsExecutorService;
controller.executorErrorMsgs = errorMsgExecutorService;
}
Aggregations