diff --git a/.gitignore b/.gitignore index 49e9ad86..87966d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -target/ -.classpath -.project -.settings/ -.externalToolBuilders/ -maven-eclipse.xml -.checkstyle -.idea -*.iws -*.iml +target/ +target-ide/ +.classpath +.project +.settings/ +.externalToolBuilders/ +maven-eclipse.xml +.checkstyle +.idea +*.iws +*.iml diff --git a/artifacts/pom.xml b/artifacts/pom.xml index a54a33e0..54204e90 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -14,14 +14,17 @@ org.opendaylight.odlparent odlparent-lite - 1.8.0-SNAPSHOT + 2.0.0 org.opendaylight.openflowjava openflowjava-artifacts - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT pom + + ODL :: openflowjava :: ${project.artifactId} @@ -94,4 +97,3 @@ - diff --git a/features/features-openflowjava/pom.xml b/features/features-openflowjava/pom.xml index e14cb2ae..036501c4 100644 --- a/features/features-openflowjava/pom.xml +++ b/features/features-openflowjava/pom.xml @@ -3,177 +3,33 @@ 4.0.0 org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT + feature-repo-parent + 2.0.0 org.opendaylight.openflowjava features-openflowjava - 0.9.0-SNAPSHOT - jar - - - 0.6.0-SNAPSHOT - 1.5.0-SNAPSHOT - 2.2.0-SNAPSHOT - 0.10.0-SNAPSHOT - - - - - - - org.opendaylight.openflowjava - openflowjava-artifacts - ${project.version} - import - pom - - - - - org.opendaylight.odlparent - odlparent-artifacts - 1.8.0-SNAPSHOT - import - pom - - - - - org.opendaylight.mdsal - mdsal-artifacts - ${mdsal.version} - import - pom - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${mdsal.model.version} - import - pom - - - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - - - org.opendaylight.controller - mdsal-artifacts - ${controller.mdsal.version} - import - pom - - - - + 0.10.0-SNAPSHOT + feature + + ODL :: openflowjava :: ${project.artifactId} - - org.opendaylight.mdsal - features-mdsal - ${mdsal.version} - features - xml - - - org.opendaylight.mdsal.model - features-mdsal-model - ${mdsal.model.version} - features - xml - - - org.opendaylight.controller - features-config - features + ${project.groupId} + odl-openflowjava-all + ${project.version} xml - - - org.opendaylight.controller - features-mdsal - ${controller.mdsal.version} features - xml - - - org.opendaylight.odlparent - features-odlparent - features - xml - - - - - org.opendaylight.openflowjava - openflow-protocol-api - - - org.opendaylight.openflowjava - openflow-protocol-spi - - - org.opendaylight.openflowjava - openflow-protocol-impl - - - - org.opendaylight.openflowjava - openflowjava-blueprint-config - xml - config - - - org.opendaylight.openflowjava - openflowjava-blueprint-config - xml - legacyConfig - - - - org.opendaylight.openflowjava - openflowjava-util ${project.groupId} - openflowjava-config + odl-openflowjava-protocol + ${project.version} xml - configstats - - - io.netty - netty-codec - - - io.netty - netty-handler - - - io.netty - netty-common - - - io.netty - netty-buffer - - - io.netty - netty-transport - - - io.netty - netty-transport-native-epoll - - linux-x86_64 + features diff --git a/features/features-openflowjava/src/main/features/features.xml b/features/features-openflowjava/src/main/features/features.xml deleted file mode 100644 index f1b58ba6..00000000 --- a/features/features-openflowjava/src/main/features/features.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-config/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features - mvn:org.opendaylight.odlparent/features-odlparent/{{VERSION}}/xml/features - - odl-openflowjava-protocol - - - odl-mdsal-binding-base - odl-mdsal-models - odl-config-api - odl-mdsal-common - odl-netty - mvn:org.opendaylight.openflowjava/openflow-protocol-api/{{VERSION}} - mvn:org.opendaylight.openflowjava/openflow-protocol-spi/{{VERSION}} - mvn:org.opendaylight.openflowjava/openflow-protocol-impl/{{VERSION}} - mvn:org.opendaylight.openflowjava/openflowjava-util/{{VERSION}} - mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/{{VERSION}} - mvn:org.opendaylight.openflowjava/openflowjava-config/${project.version}/xml/configstats - mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/${project.version}/xml/config - mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/${project.version}/xml/legacyConfig - - \ No newline at end of file diff --git a/features/features4-openflowjava/pom.xml b/features/features4-openflowjava/pom.xml deleted file mode 100644 index a5a28e6d..00000000 --- a/features/features4-openflowjava/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - 4.0.0 - - org.opendaylight.odlparent - feature-repo-parent - 1.8.0-SNAPSHOT - - - - org.opendaylight.openflowjava - features4-openflowjava - 0.9.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-openflowjava-all - ${project.version} - xml - features - - - ${project.groupId} - odl-openflowjava-protocol - ${project.version} - xml - features - - - - diff --git a/features/odl-openflowjava-all/pom.xml b/features/odl-openflowjava-all/pom.xml index 67a750e4..38d7c4fe 100644 --- a/features/odl-openflowjava-all/pom.xml +++ b/features/odl-openflowjava-all/pom.xml @@ -7,16 +7,18 @@ org.opendaylight.odlparent single-feature-parent - 1.8.0-SNAPSHOT + 2.0.0 org.opendaylight.openflowjava odl-openflowjava-all - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT feature - OpenDaylight :: Openflow Java :: All + + ODL :: openflowjava :: ${project.artifactId} diff --git a/features/odl-openflowjava-protocol/pom.xml b/features/odl-openflowjava-protocol/pom.xml index e709f752..9092873c 100644 --- a/features/odl-openflowjava-protocol/pom.xml +++ b/features/odl-openflowjava-protocol/pom.xml @@ -7,23 +7,25 @@ org.opendaylight.odlparent single-feature-parent - 1.8.0-SNAPSHOT + 2.0.0 org.opendaylight.openflowjava odl-openflowjava-protocol - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT feature - OpenDaylight :: Openflow Java :: Protocol + + ODL :: openflowjava :: ${project.artifactId} - 0.6.0-SNAPSHOT - 1.5.0-SNAPSHOT - 2.2.0-SNAPSHOT - 0.10.0-SNAPSHOT - 1.8.0-SNAPSHOT + 0.7.0-SNAPSHOT + 1.6.0-SNAPSHOT + 2.3.0-SNAPSHOT + 0.11.0-SNAPSHOT + 1.9.0 @@ -127,6 +129,17 @@ org.opendaylight.openflowjava openflow-protocol-impl + + org.opendaylight.openflowjava + openflowjava-util + + + + org.opendaylight.openflowjava + openflowjava-config + xml + configstats + org.opendaylight.openflowjava openflowjava-blueprint-config @@ -135,7 +148,9 @@ org.opendaylight.openflowjava - openflowjava-util + openflowjava-blueprint-config + xml + legacyConfig diff --git a/features/odl-openflowjava-protocol/src/main/features/features.xml b/features/odl-openflowjava-protocol/src/main/feature/feature.xml similarity index 100% rename from features/odl-openflowjava-protocol/src/main/features/features.xml rename to features/odl-openflowjava-protocol/src/main/feature/feature.xml diff --git a/features/pom.xml b/features/pom.xml index a1ef0fd9..44633fb4 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -4,21 +4,22 @@ org.opendaylight.odlparent odlparent-lite - 1.8.0-SNAPSHOT + 2.0.0 org.opendaylight.openflowjava features-aggregator - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT pom + + ODL :: openflowjava :: ${project.artifactId} features-openflowjava - features4-openflowjava odl-openflowjava-protocol odl-openflowjava-all - diff --git a/openflow-protocol-api/pom.xml b/openflow-protocol-api/pom.xml index 7eb15821..5a2777d0 100644 --- a/openflow-protocol-api/pom.xml +++ b/openflow-protocol-api/pom.xml @@ -4,22 +4,24 @@ org.opendaylight.mdsal binding-parent - 0.10.0-SNAPSHOT + 0.11.0-SNAPSHOT org.opendaylight.openflowjava openflow-protocol-api - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT bundle - Openflow Protocol Library - API + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD - 2.2.0-SNAPSHOT - 0.10.0-SNAPSHOT + 2.3.0-SNAPSHOT + 0.11.0-SNAPSHOT diff --git a/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/ConnectionAdapter.java b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/ConnectionAdapter.java index 89cd461f..a61ea513 100644 --- a/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/ConnectionAdapter.java +++ b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/ConnectionAdapter.java @@ -10,6 +10,7 @@ import com.google.common.annotations.Beta; import java.net.InetSocketAddress; import java.util.concurrent.Future; +import org.opendaylight.openflowjava.protocol.api.extensibility.AlienMessageListener; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolService; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.system.rev130927.SystemNotificationsListener; @@ -35,6 +36,7 @@ public interface ConnectionAdapter extends OpenflowProtocolService { * @return address of the remote end - address of a switch if connected */ InetSocketAddress getRemoteAddress(); + /** * @param messageListener here will be pushed all messages from switch */ @@ -45,6 +47,12 @@ public interface ConnectionAdapter extends OpenflowProtocolService { */ void setSystemListener(SystemNotificationsListener systemListener); + /** + * Set handler for alien messages received from device + * @param alienMessageListener here will be pushed all alien messages from switch + */ + void setAlienMessageListener(AlienMessageListener alienMessageListener); + /** * Throws exception if any of required listeners is missing */ diff --git a/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/extensibility/AlienMessageListener.java b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/extensibility/AlienMessageListener.java new file mode 100644 index 00000000..a3cd7c6c --- /dev/null +++ b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/extensibility/AlienMessageListener.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.openflowjava.protocol.api.extensibility; + +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; + +public interface AlienMessageListener { + + /** + * Handler for alien but successfully deserialized messages for device + * @param message alien message + */ + void onAlienMessage(OfHeader message); +} diff --git a/openflow-protocol-impl/pom.xml b/openflow-protocol-impl/pom.xml index c97c7acb..62c2ddd3 100644 --- a/openflow-protocol-impl/pom.xml +++ b/openflow-protocol-impl/pom.xml @@ -3,12 +3,14 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent openflow-protocol-impl bundle - Openflow Protocol Library - IMPL + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD @@ -52,12 +54,12 @@ - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} - org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl + org.opendaylight.mdsal.binding.yang.unified.doc.generator.maven.DocumentationGeneratorImpl ${project.build.directory}/site/models diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SwitchConnectionProviderImpl.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SwitchConnectionProviderImpl.java index afa47644..612afcb7 100755 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SwitchConnectionProviderImpl.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SwitchConnectionProviderImpl.java @@ -142,7 +142,7 @@ private ServerFacade createAndConfigureServer() { // TODO : Add option to disable Epoll. boolean isEpollEnabled = Epoll.isAvailable(); - if (transportProtocol.equals(TransportProtocol.TCP) || transportProtocol.equals(TransportProtocol.TLS)) { + if ((TransportProtocol.TCP.equals(transportProtocol) || TransportProtocol.TLS.equals(transportProtocol))) { server = new TcpHandler(connConfig.getAddress(), connConfig.getPort()); final TcpChannelInitializer channelInitializer = factory.createPublishingChannelInitializer(); ((TcpHandler) server).setChannelInitializer(channelInitializer); @@ -152,7 +152,7 @@ private ServerFacade createAndConfigureServer() { connectionInitializer = new TcpConnectionInitializer(workerGroupFromTcpHandler, isEpollEnabled); connectionInitializer.setChannelInitializer(channelInitializer); connectionInitializer.run(); - } else if (transportProtocol.equals(TransportProtocol.UDP)){ + } else if (TransportProtocol.UDP.equals(transportProtocol)){ server = new UdpHandler(connConfig.getAddress(), connConfig.getPort()); ((UdpHandler) server).initiateEventLoopGroups(connConfig.getThreadConfiguration(), isEpollEnabled); ((UdpHandler) server).setChannelInitializer(factory.createUdpChannelInitializer()); diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java index 8d9c8746..e9de9ca2 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java @@ -15,6 +15,7 @@ import org.opendaylight.openflowjava.protocol.api.connection.ConnectionReadyListener; import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueHandler; import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueHandlerRegistration; +import org.opendaylight.openflowjava.protocol.api.extensibility.AlienMessageListener; import org.opendaylight.openflowjava.protocol.impl.core.OFVersionDetector; import org.opendaylight.openflowjava.protocol.impl.core.PipelineHandlers; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoRequestMessage; @@ -47,6 +48,7 @@ public class ConnectionAdapterImpl extends AbstractConnectionAdapterStatistics i private ConnectionReadyListener connectionReadyListener; private OpenflowProtocolListener messageListener; private SystemNotificationsListener systemListener; + private AlienMessageListener alienMessageListener; private AbstractOutboundQueueManager outputManager; private OFVersionDetector versionDetector; @@ -80,6 +82,11 @@ public void setSystemListener(final SystemNotificationsListener systemListener) this.systemListener = systemListener; } + @Override + public void setAlienMessageListener(final AlienMessageListener alienMessageListener) { + this.alienMessageListener = alienMessageListener; + } + @Override public void consumeDeviceMessage(final DataObject message) { LOG.debug("ConsumeIntern msg on {}", channel); @@ -131,19 +138,24 @@ public void consumeDeviceMessage(final DataObject message) { } } else if (message instanceof OfHeader) { LOG.debug("OF header msg received"); + boolean found = false; if (outputManager == null || !outputManager.onMessage((OfHeader) message)) { final RpcResponseKey key = createRpcResponseKey((OfHeader) message); final ResponseExpectedRpcListener listener = findRpcResponse(key); if (listener != null) { + found = true; LOG.debug("Corresponding rpcFuture found"); - listener.completed((OfHeader)message); + listener.completed((OfHeader) message); LOG.debug("After setting rpcFuture"); responseCache.invalidate(key); - } else { - LOG.warn("received unexpected rpc response: {}", key); } } + + if (!found && alienMessageListener != null) { + LOG.debug("Alien message {} received", message.getImplementedInterface()); + alienMessageListener.onAlienMessage((OfHeader) message); + } } else { LOG.warn("message listening not supported for type: {}", message.getClass()); } diff --git a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/UdpHandlerTest.java b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/UdpHandlerTest.java index ff36181f..72bbe8e0 100644 --- a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/UdpHandlerTest.java +++ b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/UdpHandlerTest.java @@ -7,6 +7,7 @@ */ package org.opendaylight.openflowjava.protocol.impl.core.connection; +import com.google.common.util.concurrent.ListenableFuture; import java.io.IOException; import java.net.InetAddress; import java.util.concurrent.ExecutionException; @@ -19,16 +20,20 @@ import org.mockito.MockitoAnnotations; import org.opendaylight.openflowjava.protocol.impl.core.UdpChannelInitializer; import org.opendaylight.openflowjava.protocol.impl.core.UdpHandler; - -import com.google.common.util.concurrent.ListenableFuture; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author madamjak * */ public class UdpHandlerTest { - @Mock UdpChannelInitializer udpChannelInitializerMock; - UdpHandler udpHandler; + + private static final Logger LOG = LoggerFactory.getLogger(UdpHandlerTest.class); + + @Mock + private UdpChannelInitializer udpChannelInitializerMock; + private UdpHandler udpHandler; /** * Mock init */ @@ -44,12 +49,12 @@ public void startUp() { * @throws IOException */ @Test - public void testWithEmptyAddress() throws InterruptedException, ExecutionException, IOException { + public void testWithEmptyAddress() throws Exception { udpHandler = new UdpHandler(null, 0); udpHandler.setChannelInitializer(udpChannelInitializerMock); Assert.assertTrue("Wrong - start server", startupServer(false)); try { - Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS).booleanValue()); + Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { Assert.fail("Wrong - getIsOnlineFuture timed out"); } @@ -64,12 +69,12 @@ public void testWithEmptyAddress() throws InterruptedException, ExecutionExcepti * @throws IOException */ @Test - public void testWithEmptyAddressOnEpoll() throws InterruptedException, ExecutionException, IOException { + public void testWithEmptyAddressOnEpoll() throws Exception { udpHandler = new UdpHandler(null, 0); udpHandler.setChannelInitializer(udpChannelInitializerMock); Assert.assertTrue("Wrong - start server", startupServer(true)); try { - Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS).booleanValue()); + Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { Assert.fail("Wrong - getIsOnlineFuture timed out"); } @@ -84,13 +89,13 @@ public void testWithEmptyAddressOnEpoll() throws InterruptedException, Execution * @throws IOException */ @Test - public void testWithAddressAndPort() throws InterruptedException, ExecutionException, IOException{ + public void testWithAddressAndPort() throws Exception{ int port = 9874; udpHandler = new UdpHandler(InetAddress.getLocalHost(), port); udpHandler.setChannelInitializer(udpChannelInitializerMock); Assert.assertTrue("Wrong - start server", startupServer(false)); try { - Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS).booleanValue()); + Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { Assert.fail("Wrong - getIsOnlineFuture timed out"); } @@ -105,13 +110,13 @@ public void testWithAddressAndPort() throws InterruptedException, ExecutionExcep * @throws IOException */ @Test - public void testWithAddressAndPortOnEpoll() throws InterruptedException, ExecutionException, IOException{ + public void testWithAddressAndPortOnEpoll() throws Exception { int port = 9874; udpHandler = new UdpHandler(InetAddress.getLocalHost(), port); udpHandler.setChannelInitializer(udpChannelInitializerMock); Assert.assertTrue("Wrong - start server", startupServer(true)); try { - Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS).booleanValue()); + Assert.assertTrue(udpHandler.getIsOnlineFuture().get(1500,TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { Assert.fail("Wrong - getIsOnlineFuture timed out"); } @@ -119,25 +124,28 @@ public void testWithAddressAndPortOnEpoll() throws InterruptedException, Executi shutdownServer(); } - private Boolean startupServer(boolean isEpollEnabled) throws InterruptedException, IOException, ExecutionException { + private Boolean startupServer(final boolean isEpollEnabled) throws InterruptedException, IOException, ExecutionException { ListenableFuture online = udpHandler.getIsOnlineFuture(); /** * Test EPoll based native transport if isEpollEnabled is true. * Else use Nio based transport. */ udpHandler.initiateEventLoopGroups(null, isEpollEnabled); - (new Thread(udpHandler)).start(); - int retry = 0; - while (online.isDone() != true && retry++ < 20) { - Thread.sleep(100); - } - return online.isDone() ; + (new Thread(udpHandler)).start(); + + boolean startedSuccessfully = false; + try { + startedSuccessfully = online.get(10, TimeUnit.SECONDS); + } catch (TimeoutException e) { + LOG.warn("Timeout while waiting for UDP handler to start", e); + } + + return online.isDone(); } - private void shutdownServer() throws InterruptedException, ExecutionException { + private void shutdownServer() throws InterruptedException, ExecutionException, TimeoutException { ListenableFuture shutdownRet = udpHandler.shutdown() ; - while ( shutdownRet.isDone() != true ) - Thread.sleep(100) ; - Assert.assertTrue("Wrong - shutdown failed", shutdownRet.get()); + final Boolean shutdownSucceeded = shutdownRet.get(10, TimeUnit.SECONDS); + Assert.assertTrue("Wrong - shutdown failed", shutdownSucceeded); } } diff --git a/openflow-protocol-it/pom.xml b/openflow-protocol-it/pom.xml index b93ba9e6..58628b30 100644 --- a/openflow-protocol-it/pom.xml +++ b/openflow-protocol-it/pom.xml @@ -3,12 +3,14 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent openflow-protocol-it bundle - Openflow Protocol Integration Test + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD diff --git a/openflow-protocol-spi/pom.xml b/openflow-protocol-spi/pom.xml index 2e7057b6..67a9aa90 100644 --- a/openflow-protocol-spi/pom.xml +++ b/openflow-protocol-spi/pom.xml @@ -3,13 +3,15 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent openflow-protocol-spi bundle - Openflow Protocol Library - SPI + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD @@ -50,12 +52,12 @@ - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} - org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl + org.opendaylight.mdsal.binding.yang.unified.doc.generator.maven.DocumentationGeneratorImpl ${project.build.directory}/site/models diff --git a/openflowjava-blueprint-config/pom.xml b/openflowjava-blueprint-config/pom.xml index c3e6c6ca..71efa0d2 100644 --- a/openflowjava-blueprint-config/pom.xml +++ b/openflowjava-blueprint-config/pom.xml @@ -11,13 +11,15 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent openflowjava-blueprint-config Blueprint configuration files for openflowjava statistics bundle - Openflow Protocol Library - Blueprint Config + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD diff --git a/openflowjava-config/pom.xml b/openflowjava-config/pom.xml index 1f7bc3e0..419a0609 100644 --- a/openflowjava-config/pom.xml +++ b/openflowjava-config/pom.xml @@ -11,13 +11,15 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent openflowjava-config Configuration files for openflowjava statistics jar - Openflow Protocol Library - CONFIG + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD diff --git a/openflowjava-util/pom.xml b/openflowjava-util/pom.xml index 27ffc9bc..c296e5a7 100644 --- a/openflowjava-util/pom.xml +++ b/openflowjava-util/pom.xml @@ -5,11 +5,14 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent bundle openflowjava-util + + ODL :: openflowjava :: ${project.artifactId} diff --git a/parent/pom.xml b/parent/pom.xml index 1d42e379..4238e080 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -4,15 +4,17 @@ org.opendaylight.odlparent odlparent - 1.8.0-SNAPSHOT + 2.0.0 org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT pom - openflowjava + + ODL :: openflowjava :: ${project.artifactId} Openflow protocol library - serializes and deserializes openflow messages + handles connections with openflow devices. @@ -51,13 +53,12 @@ UTF-8 ${project.build.directory}/yang-gen-config - 1.8.0-SNAPSHOT ${project.build.directory}/yang-gen-sal - 0.6.0-SNAPSHOT - 1.5.0-SNAPSHOT - 0.10.0-SNAPSHOT - 1.1.0-SNAPSHOT + 0.7.0-SNAPSHOT + 1.6.0-SNAPSHOT + 0.11.0-SNAPSHOT + 1.2.0-SNAPSHOT 0.7.0 @@ -130,7 +131,7 @@ org.apache.maven.plugins - maven-checkstyle-plugin + maven-checkstyle-plugin ${checkstyle.version} false @@ -159,6 +160,21 @@ org.codehaus.mojo build-helper-maven-plugin + + + add-yang-sources + generate-sources + + add-source + + + + ${jmxGeneratorPath} + ${salGeneratorPath} + + + + @@ -251,19 +267,6 @@ - - - org.opendaylight.yangtools - yang-maven-plugin - [0.5,) - - generate-sources - - - - - - org.codehaus.groovy.maven diff --git a/pom.xml b/pom.xml index 0ed98352..e3eda8b0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT parent diff --git a/simple-client/pom.xml b/simple-client/pom.xml index 76dd3575..b399646e 100644 --- a/simple-client/pom.xml +++ b/simple-client/pom.xml @@ -3,12 +3,14 @@ org.opendaylight.openflowjava openflowjava-parent - 0.9.0-SNAPSHOT + 0.10.0-SNAPSHOT ../parent simple-client bundle - Openflow Protocol Simple Client + + ODL :: openflowjava :: ${project.artifactId} https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main HEAD