use of org.opendaylight.openflowjava.protocol.impl.clients.ClientEvent in project openflowplugin by opendaylight.
the class ScenarioFactory method createHandshakeScenarioNOVBM_OF10_OneHello.
/**
* Attempt to simulate the MLX running 1.0 talking to ODL
*
* @return handshake scenario without switch version bitmap
*/
public static Deque<ClientEvent> createHandshakeScenarioNOVBM_OF10_OneHello() {
System.out.println("createHandshakeScenarioMininet");
Deque<ClientEvent> stack = new ArrayDeque<>();
stack.addFirst(new SendEvent(ByteBufUtils.hexStringToBytes("01 00 00 08 00 00 00 0d")));
stack.addFirst(new WaitForMessageEvent(ByteBufUtils.hexStringToBytes("04 00 00 10 00 00 00 15")));
stack.addFirst(new WaitForMessageEvent(ByteBufUtils.hexStringToBytes("01 00 00 08 00 00 00 0e")));
stack.addFirst(new WaitForMessageEvent(ByteBufUtils.hexStringToBytes("01 05 00 08 00 00 00 0f")));
stack.addFirst(new SendEvent(ByteBufUtils.hexStringToBytes("01 01 00 14 00 00 00 0e 00 01 00 01 01 00 00 08 00 00 00 0e")));
stack.addFirst(new SendEvent(ByteBufUtils.hexStringToBytes(" 01 06 00 b0 00 00 00 0f 00 00 00 00 00 00 00 01 00 00 01 00 fe 00" + " 00 00 00 00 00 c7 00 00 0f ff 00 01 fa 01 ff 57 86 aa 73 31 2d" + " 65 74 68 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01" + " 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 02 c2 51 d8" + " 24 38 97 73 31 2d 65 74 68 32 00 00 00 00 00 00 00 00 00 00 00" + " 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00" + " 00 ff fe ea bd f8 db 41 40 73 31 00 00 00 00 00 00 00 00 00 00" + " 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00" + " 00 00 00 00 00 00 00")));
addSleep(stack);
return stack;
}
use of org.opendaylight.openflowjava.protocol.impl.clients.ClientEvent in project openflowplugin by opendaylight.
the class OFPluginFlowTest method testFlowMod.
/**
* test basic integration with OFLib running the handshake
* @throws Exception
*/
@Test
public void testFlowMod() throws Exception {
LOG.debug("testFlowMod integration test");
TriggerTestListener brmListener = new TriggerTestListener();
final DataTreeIdentifier<FlowCapableNode> dataTreeIdentifier = new DataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, getWildcardPath());
dataBroker.registerDataTreeChangeListener(dataTreeIdentifier, brmListener);
switchSim = createSimpleClient();
switchSim.setSecuredClient(false);
Deque<ClientEvent> handshakeScenario = ScenarioFactory.createHandshakeScenarioVBM(ScenarioFactory.VERSION_BITMAP_13, (short) 0, ScenarioFactory.VERSION_BITMAP_10_13, false);
handshakeScenario.addFirst(new SleepEvent(6000L));
ScenarioFactory.appendPostHandshakeScenario(handshakeScenario, true);
WaitForMessageEvent flowModEvent = new WaitForMessageEvent(ByteBufUtils.hexStringToBytes("04 0e 00 58 00 00 00 03 00 00 00 00 00 00 00 0a " + "00 00 00 00 00 00 00 0a 00 00 00 00 00 00 80 00 " + "ff ff ff ff ff ff ff ff ff ff ff ff 00 01 00 00 " + "00 01 00 16 80 00 0a 02 08 00 80 00 19 08 0a 00 " + "00 01 ff ff ff 00 00 00 00 04 00 10 00 00 00 00 " + "00 18 00 08 00 00 00 00"));
handshakeScenario.addFirst(flowModEvent);
ScenarioHandler scenario = new ScenarioHandler(handshakeScenario);
switchSim.setScenarioHandler(scenario);
scenarioPool.execute(switchSim);
LOG.info("finishing testFlowMod");
}
Aggregations