import org.opendaylight.openflowjava.protocol.impl.clients.SleepEvent;
import org.opendaylight.openflowjava.protocol.impl.clients.UdpSimpleClient;
import org.opendaylight.openflowjava.protocol.impl.clients.WaitForMessageEvent;
-import org.opendaylight.openflowjava.protocol.impl.connection.SwitchConnectionProviderImpl;
+import org.opendaylight.openflowjava.protocol.impl.core.SwitchConnectionProviderImpl;
import org.opendaylight.openflowjava.protocol.impl.core.TcpHandler;
import org.opendaylight.openflowjava.protocol.impl.core.UdpHandler;
+import org.opendaylight.openflowjava.protocol.impl.core.connection.ConnectionConfigurationImpl;
import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.KeystoreType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
private static final Logger LOGGER = LoggerFactory
.getLogger(IntegrationTest.class);
-
+
private static int port;
private TlsConfiguration tlsConfiguration;
private static final int SWITCH_IDLE_TIMEOUT = 2000;
*/
public void setUp(TransportProtocol protocol) throws Exception {
LOGGER.debug("\n starting test -------------------------------");
-
+
String currentDir = System.getProperty("user.dir");
LOGGER.debug("Current dir using System:" +currentDir);
startupAddress = InetAddress.getLocalHost();
connConfig = new ConnectionConfigurationImpl(startupAddress, 0, tlsConfiguration, SWITCH_IDLE_TIMEOUT);
connConfig.setTransferProtocol(protocol);
mockPlugin = new MockPlugin();
-
+
switchConnectionProvider = new SwitchConnectionProviderImpl();
switchConnectionProvider.setSwitchConnectionHandler(mockPlugin);
switchConnectionProvider.setConfiguration(connConfig);
/**
* Library integration and communication test with handshake
- * @throws Exception
+ * @throws Exception
*/
@Test
public void testHandshake() throws Exception {
OFClient firstClient = clients.get(0);
firstClient.getScenarioDone().get();
Thread.sleep(1000);
-
+
LOGGER.debug("testHandshake() Finished") ;
}
/**
* Library integration and secured communication test with handshake
- * @throws Exception
+ * @throws Exception
*/
@Test
public void testTlsHandshake() throws Exception {
OFClient firstClient = clients.get(0);
firstClient.getScenarioDone().get();
Thread.sleep(1000);
-
+
LOGGER.debug("testTlsHandshake() Finished") ;
}
/**
* Library integration and communication test with handshake + echo exchange
- * @throws Exception
+ * @throws Exception
*/
@Test
public void testHandshakeAndEcho() throws Exception {
/**
* Library integration and secured communication test with handshake + echo exchange
- * @throws Exception
+ * @throws Exception
*/
@Test
public void testTlsHandshakeAndEcho() throws Exception {
/**
* Library udp integration and communication test with handshake + echo exchange
- * @throws Exception
+ * @throws Exception
*/
@Test
public void testUdpHandshakeAndEcho() throws Exception {
}
/**
- * @param amountOfCLients
+ * @param amountOfCLients
* @param protocol true if encrypted connection should be used
* @return new clients up and running
* @throws ExecutionException if some client could not start