use of org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler in project openflowplugin by opendaylight.
the class OFPluginToLibraryTest method handshakeOk2.
/**
* test basic integration with OFLib running the handshake (with version bitmap)
* @throws Exception
*/
@Test
public void handshakeOk2() throws Exception {
LOG.debug("handshakeOk2 integration test");
switchSim = createSimpleClient();
switchSim.setSecuredClient(false);
Deque<ClientEvent> handshakeScenario = ScenarioFactory.createHandshakeScenario((short) 0, ScenarioFactory.VERSION_BITMAP_10_13);
ScenarioHandler scenario = new ScenarioHandler(handshakeScenario);
switchSim.setScenarioHandler(scenario);
scenarioPool.execute(switchSim);
}
use of org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler in project openflowplugin by opendaylight.
the class OFPluginToLibraryTest method handshakeFail1.
/**
* test basic integration with OFLib running the handshake:
* creating auxiliary connection without primary connection -- FAIL
* @throws Exception
*/
@Test
public void handshakeFail1() throws Exception {
LOG.debug("handshakeFail1 integration test");
switchSim = createSimpleClient();
switchSim.setSecuredClient(false);
Deque<ClientEvent> handshakeScenario = ScenarioFactory.createHandshakeScenario((short) 1, ScenarioFactory.VERSION_BITMAP_10_13);
ScenarioHandler scenario = new ScenarioHandler(handshakeScenario);
switchSim.setScenarioHandler(scenario);
scenarioPool.execute(switchSim);
}
use of org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler in project openflowplugin by opendaylight.
the class OFPluginToLibraryTest method handshakeOkNoVBM_OF10_SingleHello.
/**
* test with Mininet running OF10 and OFP running OF13/OF10
*
* Mininet issues an OFPT_ERROR on the version compatability Mininet doesn't
* issue a second HELLO
*
* @throws Exception
*/
@Test
public void handshakeOkNoVBM_OF10_SingleHello() throws Exception {
LOG.debug("handshakeOkMLX10 integration test");
LOG.debug("openflowPluginProvider: " + openflowPluginProvider);
switchSim = createSimpleClient();
switchSim.setSecuredClient(false);
Deque<ClientEvent> handshakeScenario = ScenarioFactory.createHandshakeScenarioNOVBM_OF10_OneHello();
ScenarioHandler scenario = new ScenarioHandler(handshakeScenario);
switchSim.setScenarioHandler(scenario);
scenarioPool.execute(switchSim);
}
use of org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler in project openflowplugin by opendaylight.
the class OFPluginToLibraryTest method handshakeFail2.
/**
* test basic integration with OFLib running the handshake
* adding 5s wait as first event of switch -- FAIL
* @throws Exception
*/
@Test
public void handshakeFail2() throws Exception {
LOG.debug("handshakeFail2 integration test");
LOG.debug("openflowPluginProvider: " + openflowPluginProvider);
switchSim = createSimpleClient();
switchSim.setSecuredClient(false);
Deque<ClientEvent> handshakeScenario = ScenarioFactory.createHandshakeScenario((short) 0, ScenarioFactory.VERSION_BITMAP_10_13);
handshakeScenario.addFirst(new SleepEvent(5000));
ScenarioHandler scenario = new ScenarioHandler(handshakeScenario);
switchSim.setScenarioHandler(scenario);
scenarioPool.execute(switchSim);
}
use of org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler in project openflowplugin by opendaylight.
the class IntegrationTest method testTlsHandshake.
/**
* Library integration and secured communication test with handshake.
*/
@Test
public void testTlsHandshake() throws Exception {
setUp(TransportProtocol.TLS);
final int amountOfCLients = 1;
final Deque<ClientEvent> scenario = ScenarioFactory.createHandshakeScenario();
final ScenarioHandler handler = new ScenarioHandler(scenario);
final List<OFClient> clients = createAndStartClient(amountOfCLients, handler, TransportProtocol.TLS, ClientType.SIMPLE);
final OFClient firstClient = clients.get(0);
firstClient.getScenarioDone().get();
Thread.sleep(1000);
LOGGER.debug("testTlsHandshake() Finished");
}
Aggregations