Bump to yangtools-2.0.0 and odlparent-3.0.2 09/66509/9
authorTom Pantelis <tompantelis@gmail.com>
Fri, 15 Dec 2017 14:02:04 +0000 (09:02 -0500)
committerMichael Vorburger <vorburger@redhat.com>
Tue, 16 Jan 2018 12:10:00 +0000 (12:10 +0000)
This patch also embeds MOXy inside northbound-api in order to deal
with javax.ws.rs version mismatch between jersey (1.1.x) and jackson
(2.0.1), where MOXy has a revisionless import and hence binding
to jackson version -- preventing it from working with jersey;
see NEUTRON-154 for full background.

Change-Id: I9663ad4df3bae44e9de27ee0c7659cb2e3fa578a
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 files changed:
.gitignore
artifacts/pom.xml
features/production/features-neutron/pom.xml
features/production/odl-neutron-hostconfig-ovs/pom.xml
features/production/odl-neutron-hostconfig-vpp/pom.xml
features/production/odl-neutron-logger/pom.xml
features/production/odl-neutron-northbound-api/pom.xml
features/production/odl-neutron-service/pom.xml
features/production/odl-neutron-spi/pom.xml
features/production/odl-neutron-transcriber/pom.xml
features/production/pom.xml
features/test/features-neutron-test/pom.xml
features/test/odl-neutron-logger-test/pom.xml
features/test/pom.xml
integration/test/pom.xml
integration/test/src/test/java/org/opendaylight/neutron/e2etest/ITNeutronE2E.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronNetworkTests.java
karaf/pom.xml
neutron-hostconfig/pom.xml
neutron-hostconfig/utils/src/main/java/org/opendaylight/neutron/hostconfig/utils/NeutronHostconfigUtils.java
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java
northbound-api/pom.xml
parent/pom.xml

index 6c6cdb3bcff43e410ec53f58b9c570fd29d9670e..a2903aeafcbac73855fb19e740db9ac4c945d5be 100644 (file)
@@ -27,3 +27,4 @@ target-ide/
 yang-gen-config
 yang-gen-sal
 maven-metadata-local.xml
+.factorypath
index 61fc838af5f689d8e317edab7d5f518f4fccaed7..a25aac99260146d427b5cb9076d815c717d2f564 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
index 37c2fa3794d3b81c1aaac6b4291824b715e1aefe..d7dc491ec761089318de59ad0a5f6dec96b6d71d 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index a3e4159f748ccf1e87765e5272e1e27afe101fa1..f4e27ef6073dbba183eefcc9aca03a73f4398718 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index f2a563fce6b6f8fdd374c95225518860168a4210..1a56a82fce142a3665e746d34062b246d3b1333b 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 025a3a4cfe00b25e1b8043cefa8c733368d6964f..a42c0b7e697f7ba190a9b257b23015d80fdf66d3 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 39c44482473d9afebe714dde7a7d651a107bbde9..f993d5171e9c581fce276a0c1e1775d7150df629 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-servlet</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.eclipse.persistence</groupId>
-            <artifactId>org.eclipse.persistence.moxy</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>org.eclipse.persistence.core</artifactId>
index 8c726bfd1b22fd503ee608ca27ef70050e1a9fca..9ca1ae64f770d40c85cf8c19cdfb043905000130 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 133f7cd251774ab501f24ff88e592f894a7c2e41..0ff695f8d4452ce5dc34b0e8cae40616d2229f17 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index d1d01f49155c657460a8ec0f0c46efdda88fbe15..fab42be078a4408f84dda2ea46c27f42fff7f99a 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 04cbc370b4b169084267dcb1d7798083e1a77433..6a4bd0c33bc002fc5a8d5af97264c8e2439ad6a0 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>2.0.5</version>
+    <version>3.0.2</version>
     <relativePath/>
   </parent>
 
index 553ee52e8c046f8f4a37c5ce1f39a452c0980b45..ad9a786a87a41570bb74d06a54c8765f20d09cc2 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 2159d28613713245f66f98b734e7530c38829aae..9e39159d3a76fa5fc2261e06d9b36fcc58688d75 100644 (file)
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
 
index 869380130f1304c0417f387b7b41e2327f63e66c..0698dd668173cca644366e7a696288f29682e1c8 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>2.0.5</version>
+    <version>3.0.2</version>
     <relativePath/>
   </parent>
 
index 0d7e26bfcc6901b5fdc3f4c2530edc21149fd29c..8fd5644ee8ed5ace222ac534bc3e28548920f1eb 100644 (file)
@@ -11,7 +11,6 @@
   <groupId>org.opendaylight.neutron</groupId>
   <artifactId>integration-test</artifactId>
   <version>0.10.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
 
   <!-- <name> formatting is used by autorelease to parse and notify projects on
        build failure. Please do not modify this unless you have a good reason. -->
index 564a7d2904dd07d0e223f9ff4694169c72468e9c..2a14560618095cb68b4fca39732811cbac000fd4 100644 (file)
@@ -5,7 +5,6 @@
  * 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.neutron.e2etest;
 
 import static org.ops4j.pax.exam.CoreOptions.maven;
@@ -40,30 +39,16 @@ import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
 import org.ops4j.pax.exam.options.MavenUrlReference;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class ITNeutronE2E  extends AbstractMdsalTestBase {
 
-    private static final Logger LOG = LoggerFactory.getLogger(ITNeutronE2E.class);
     private static final String KARAF_DEBUG_PORT = "5005";
     private static final String KARAF_DEBUG_PROP = "karaf.debug";
 
     final String base = "http://127.0.0.1:8181/controller/nb/v2/neutron";
 
-    @Override
-    public String getKarafDistro() {
-        return maven()
-            .groupId("org.opendaylight.neutron")
-            .artifactId("neutron-karaf")
-            .versionAsInProject()
-            .type("zip")
-            .getURL();
-    }
-
     @Override
     public MavenUrlReference getFeatureRepo() {
         return maven()
@@ -79,6 +64,7 @@ public class ITNeutronE2E  extends AbstractMdsalTestBase {
         return "odl-neutron-logger-test";
     }
 
+    @Override
     @Configuration
     public Option[] config() {
         Option[] options = super.config();
@@ -282,7 +268,8 @@ public class ITNeutronE2E  extends AbstractMdsalTestBase {
         JsonElement jsonElementValue = entrySet.iterator().next().getValue();
         String key = entrySet.iterator().next().getKey();
         Assert.assertEquals(context, collectionName, key);
-        Assert.assertTrue("E2E Tests Failed - Collection not Array", jsonElementValue.isJsonArray());
+        Assert.assertTrue("E2E Tests Failed - Collection not Array: " + jsonElementValue,
+                jsonElementValue.isJsonArray());
         JsonArray jsonArray = jsonElementValue.getAsJsonArray();
         Assert.assertNotEquals(context, jsonArray.size(), 0);
     }
index 7175f50133b83ef86ad4c93fe4ba0010da0028de..eee371a15bc7ca00f28749bf4cc8a0dcfbf515bb 100644 (file)
@@ -31,29 +31,27 @@ public class NeutronNetworkTests {
     }
 
     public void network_collection_get_test_with_wait() throws IOException, InterruptedException {
-        String urlS = base + "/networks";
+        URL url = new URL(base + "/networks");
         for (int retry = 0; retry < TIMEOUT; retry++) {
-            URL url = new URL(urlS);
             HttpURLConnection httpConn = ITNeutronE2E.httpURLConnectionFactoryGet(url);
             int responseCode;
             try {
                 responseCode = httpConn.getResponseCode();
             } catch (ConnectException e) {
-                LOG.info("connection " + Integer.toString(retry) + ": failed", e);
+                LOG.info("connection trial {} failed to URL {}", retry, url, e);
                 Thread.sleep(1000);
                 continue;
             }
 
             if (responseCode != 200) {
-                LOG.info("trial " + Integer.toString(retry) + ": failed with: "
-                        + Integer.toString(httpConn.getResponseCode()));
+                LOG.info("trial {} to URL {} failed with {}", retry, url, httpConn.getResponseCode());
                 Thread.sleep(1000);
             } else {
                 Assert.assertEquals("Network Collection GET failed", 200, httpConn.getResponseCode());
                 return;
             }
         }
-        Assert.assertFalse("Network Collection GET with wait failed", true);
+        Assert.assertFalse("Network Collection GET to URL " + url + " with wait failed", true);
     }
 
     //TODO handle SB check
index e5977bb7185a38c824f8930cbb251b19e60ca49f..337067449d45669d4733aca34c5616fad68d0912 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>karaf4-parent</artifactId>
-        <version>2.0.5</version>
+        <version>3.0.2</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
index 332093cf3f6f84fa639d2a535a4e07dfdcd28b7b..8c297417bc923d568eb88282cdebde5fbfce41c4 100644 (file)
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>2.0.5</version>
+    <version>3.0.2</version>
     <relativePath/>
   </parent>
 
index fcab6e31ce3d06f26d7302e62a171e7e2827f5b6..c42aa0d4020488fd221f873181b8361366937782 100644 (file)
@@ -8,9 +8,6 @@
 
 package org.opendaylight.neutron.hostconfig.utils;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import java.util.concurrent.ExecutionException;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -80,16 +77,4 @@ public class NeutronHostconfigUtils {
         return InstanceIdentifier.create(Neutron.class).child(Hostconfigs.class)
                 .child(Hostconfig.class, hostconfig.getKey());
     }
-
-    /**
-     * Used for parsing model revisions.
-     */
-    public static Date parseDate(final String strDate) {
-        final SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-        try {
-            return formatter.parse(strDate);
-        } catch (final ParseException e) {
-            throw new IllegalArgumentException("Date " + strDate + " not valid.", e);
-        }
-    }
 }
index fb40b2ac4832fc499198d26a26622aeab78c98ef..7faa9aaa079fe90c6aae697c6cabe44b8d2b6dbd 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.neutron.hostconfig.vpp;
 
 import com.google.common.base.Preconditions;
-
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -19,9 +18,7 @@ import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
-
 import javax.annotation.Nonnull;
-
 import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
@@ -41,6 +38,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Revision;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -55,15 +53,15 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
     private static final TopologyId TOPOLOGY_NETCONF = new TopologyId("topology-netconf");
     private static final QName V3PO_1704_CAPABILITY = QName.create(
             URI.create("urn:opendaylight:params:xml:ns:yang:v3po"),
-            NeutronHostconfigUtils.parseDate("2017-03-15"), "v3po");
+            Revision.of("2017-03-15"), "v3po");
     private static final QName V3PO_1701_CAPABILITY = QName.create(
             URI.create("urn:opendaylight:params:xml:ns:yang:v3po"),
-            NeutronHostconfigUtils.parseDate("2016-12-14"), "v3po");
+            Revision.of("2016-12-14"), "v3po");
     private static final QName INTERFACES_CAPABILITY =
             QName.create(URI.create("urn:ietf:params:xml:ns:yang:ietf-interfaces"),
-                    NeutronHostconfigUtils.parseDate("2014-05-08"), "ietf-interfaces");
+                    Revision.of("2014-05-08"), "ietf-interfaces");
     private static final List<QName> REQUIRED_CAPABILITIES = new ArrayList<>();
-    private SocketInfo socketInfo;
+    private final SocketInfo socketInfo;
 
     public NeutronHostconfigVppListener(final DataBroker dataBroker, String spath, String sname, String vhostMode) {
         LOG.info("Initializing Neutron-Hostconfig-Vpp-Listener");
index 1f595c446675d56bb0a239bd83e1eaf1a1dc5a0b..ee1ff1155e2428c3a766c7ff0ddeeffde202e991 100644 (file)
               org.opendaylight.aaa.shiro.web.env,
               org.apache.shiro.web.env,
               !org.codehaus.enunciate.jaxrs,
-              javax.validation,
-              javax.ws.rs.ext,
-              javax.xml.bind,
+
+              com.sun.xml.bind;resolution:=optional,
+              com.sun.xml.bind.annotation;resolution:=optional,
+              com.sun.xml.bind.api;resolution:=optional,
+              com.sun.xml.bind.api.impl;resolution:=optional,
+              com.sun.codemodel;resolution:=optional,
+              com.sun.xml.xsom;resolution:=optional,
+              com.sun.xml.xsom.impl;resolution:=optional,
+              com.sun.xml.xsom.impl.parser;resolution:=optional,
+              com.sun.tools.xjc;resolution:=optional,
+              com.sun.tools.xjc.model;resolution:=optional,
+              com.sun.tools.xjc.outline;resolution:=optional,
+              javax.activation;resolution:=optional,
+              javax.json;resolution:=optional,
+              javax.json.stream;resolution:=optional,
+              javax.naming;resolution:=optional,
+              javax.validation;resolution:=optional,
+              javax.validation.constraints;resolution:=optional;
+              javax.validation.groups;resolution:=optional;
+              javax.ws.rs;resolution:=optional,
+              javax.ws.rs.core;resolution:=optional,
+              javax.ws.rs.ext;resolution:=optional,
+              javax.xml.namespace;resolution:=optional,
+              javax.xml.parsers;resolution:=optional,
+              javax.xml.stream;resolution:=optional,
+              javax.xml.transform;resolution:=optional,
+              javax.xml.transform.dom;resolution:=optional,
+              javax.xml.transform.sax;resolution:=optional,
+              javax.xml.transform.stax;resolution:=optional,
+              javax.xml.transform.stream;resolution:=optional,
+              javax.xml.validation;resolution:=optional,
+              org.eclipse.persistence.internal.libraries.asm;resolution:=optional,
               *
             </Import-Package>
+
             <Web-ContextPath>/controller/nb/v2/neutron</Web-ContextPath>
+
+            <!-- Workaround for javax.ws.rs version mismatch with jackson/jersey/moxy -->
+            <Embed-Transitive>true</Embed-Transitive>
+            <Embed-Dependency>org.eclipse.persistence.moxy;inline</Embed-Dependency>
           </instructions>
         </configuration>
       </plugin>
index b6a84f7197961867ab1d72024c61abe8b3ecd2f1..75e10b4036c5baebb8945f3859e4541358e430a1 100644 (file)
@@ -8,7 +8,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>2.0.5</version>
+    <version>3.0.2</version>
     <relativePath/>
   </parent>
 
@@ -26,7 +26,7 @@
     <ietf-inet-types.version>1.4.0-SNAPSHOT</ietf-inet-types.version>
     <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
     <mdsal.model.version>0.12.0-SNAPSHOT</mdsal.model.version>
-    <yangtools.version>1.2.0</yangtools.version>
+    <yangtools.version>2.0.0</yangtools.version>
     <yang-ext.version>2013.09.07.12.0-SNAPSHOT</yang-ext.version>
     <sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
     <sonar.jacoco.itReportPath>../target/jacoco-it.exec</sonar.jacoco.itReportPath>