Bump upstreams for Silicon 70/92970/5
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 7 Oct 2020 17:11:00 +0000 (19:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Oct 2020 10:34:09 +0000 (12:34 +0200)
Adopt the following upstream versions:
- odlparent-8.0.0
- yangtools-6.0.0
- mdsal-7.0.0
- controller-3.0.0
- infrautils-1.9.0

We also resurrect the javax.validation dependency which was
removed from odlparent so that it matches our declarations.

Change-Id: I51d518cbe214754f589df4376591f798ef9a21aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 files changed:
artifacts/pom.xml
features/parent/pom.xml
features/production/odl-neutron-model/src/main/feature/feature.xml
features/production/odl-neutron-northbound-api/pom.xml
features/production/odl-neutron-spi/src/main/feature/feature.xml
features/production/pom.xml
features/test/features-neutron-test/pom.xml
features/test/pom.xml
integration/test-standalone/pom.xml
integration/test-standalone/src/main/java/org/opendaylight/neutron/e2etest/HttpUtils.java
integration/test/pom.xml
karaf/pom.xml
neutron-hostconfig/pom.xml
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/HostconfigUtil.java
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/SocketInfo.java
neutron-logger/src/main/java/org/opendaylight/neutron/logger/NeutronLogger.java
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronID.java
northbound-api/pom.xml
parent/pom.xml

index 6711f9ef119bd3dd8a362d97d2af5e90b9278ea9..198096b9ec7a36befef7d0f309b3653ecabb5dee 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>7.0.6</version>
+        <version>8.0.0</version>
         <relativePath/>
     </parent>
 
index 879b20d562136e94c999d82e0aed8ef46e6a8b27..8e302f6b78423bc8c80b18102d2f44b24974a295 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>7.0.6</version>
+        <version>8.0.0</version>
         <relativePath/>
     </parent>
 
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>6.0.5</version>
+                <version>7.0.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>controller-artifacts</artifactId>
-                <version>2.0.4</version>
+                <version>3.0.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 27eb5adb139e1d0d51c182df90e2cb65342ec391..9e404ba6620d04c1afabefdcd1fc868e8ada8ced 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="odl-neutron-model-${project.version}">
    <feature name="odl-neutron-model" version="${project.version}">
-     <feature version="[6,7)">odl-mdsal-model-rfc6991</feature>
+     <feature version="[7,8)">odl-mdsal-model-rfc6991</feature>
    </feature>
 </features>
index e3fc39c421a974ce605743293d104e06652794b2..6f6082b44ffe9cefb51499ea15314f39dc524295 100644 (file)
@@ -30,7 +30,7 @@
             <dependency>
                 <groupId>org.opendaylight.infrautils</groupId>
                 <artifactId>infrautils-artifacts</artifactId>
-                <version>1.8.1</version>
+                <version>1.9.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 221d14fd73700b6f3458c4f999f1f759ce828a34..632a8507d5a19f7e736955cb393f392c19335989 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="odl-neutron-spi-${project.version}">
    <feature name="odl-neutron-spi" version="${project.version}">
-     <feature version="[7,8)">odl-apache-commons-net</feature>
-     <feature version="[2,3)">odl-mdsal-broker</feature>
+     <feature version="[8,9)">odl-apache-commons-net</feature>
+     <feature version="[3,4)">odl-mdsal-broker</feature>
    </feature>
 </features>
index cfb7786094eece50d6d70dc26dc5980fd42fdac3..91711e69a276ef0e902bd6230fe864ff85915d89 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>7.0.6</version>
+    <version>8.0.0</version>
     <relativePath/>
   </parent>
 
index 140495f4aa0db4a648721f8cfcd5d53ac0f7c699..e0b115cecbc5769eb7facef5c1d88a67a82c1cf0 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>7.0.6</version>
+        <version>8.0.0</version>
         <relativePath/>
     </parent>
 
index 3ad230267048140736b9a14590be765640ab5dc2..17e8369591854ab45acfd8656bf595869376bb3e 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>7.0.6</version>
+    <version>8.0.0</version>
     <relativePath/>
   </parent>
 
index a9b8c6b99d6c2f264f55e9c97b476fbffea185d7..a1ea03328a52211dc2b8a2b73506541fe094ded4 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>7.0.6</version>
+    <version>8.0.0</version>
     <relativePath/>
   </parent>
 
@@ -27,7 +27,7 @@
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>6.0.5</version>
+        <version>7.0.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -41,7 +41,7 @@
       <dependency>
         <groupId>org.opendaylight.infrautils</groupId>
         <artifactId>infrautils-artifacts</artifactId>
-        <version>1.8.1</version>
+        <version>1.9.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index e34c70d15b18a45f5123b3c4e1e11d61ead57b30..e4552d98798439fadfc78596dacdcae82995301d 100644 (file)
@@ -31,6 +31,7 @@ public final class HttpUtils {
 
     }
 
+    // TODO: Java 11+ has HttpClient, we should be using that instead
     static HttpURLConnection httpURLConnectionFactoryGet(URL url) throws IOException {
         HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
         httpConn.setRequestMethod("GET");
@@ -180,7 +181,7 @@ public final class HttpUtils {
     }
 
     private static String fetchResponse(String urlStr, String context) {
-        StringBuffer response = new StringBuffer();
+        StringBuilder response = new StringBuilder();
 
         try {
             URL url = new URL(urlStr);
index 8a59f7b34f2151c268a2b7088bfe7161b7648633..8c0221589ccab19af31dd079a8dfbd052232fc14 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>mdsal-it-parent</artifactId>
-    <version>2.0.4</version>
+    <version>3.0.0</version>
     <relativePath/>
   </parent>
 
index 5704e75579a709b3faca6d7c2083261ab38eff0d..f51a47d93de56af7de5570d515db1e69e8a95af2 100644 (file)
@@ -9,7 +9,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>7.0.6</version>
+        <version>8.0.0</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
index 05aa925439f5d771d23dfa6cde9b8ef5b75c5d5d..5cfde9372512d157ab240647a6c34625812c1262 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>7.0.6</version>
+    <version>8.0.0</version>
     <relativePath/>
   </parent>
 
index 973b0322ad1d1455556e76ce4ce553be1cc7cbc8..a792880709363a2b8d8a059d02317f41103041ce 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.neutron.hostconfig.vpp;
 
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
+import static java.util.Objects.requireNonNull;
+
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 import java.util.HashMap;
@@ -23,14 +23,14 @@ public final class HostconfigUtil {
     private static final String VNIC_TYPE = "normal";
     private static final String HAS_DATAPATH_TYPE_NETDEV = "False";
     private static final String SUPPORT_VHOST_USER = "True";
-    private static final List<String> SUPPORTED_NET_TYPES = Lists.newArrayList("local", "vlan", "vxlan", "gre");
+    private static final List<String> SUPPORTED_NET_TYPES = List.of("local", "vlan", "vxlan", "gre");
 
     private HostconfigUtil() {
     }
 
     public static Map<String, String> createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) {
-        Preconditions.checkNotNull(nodeId);
-        Preconditions.checkNotNull(socketInfo);
+        requireNonNull(nodeId);
+        requireNonNull(socketInfo);
         JsonObject odlL2 = new JsonObject();
         odlL2.add("allowed_network_types", buildSupportedNetworkTypes());
         odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo));
index 305c4b3dab0a407276c7bd0e8b2554feb5bff80b..a838865ed3d7d5ea0c2b253cf6d2eac1b96268ea 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.neutron.hostconfig.vpp;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.Preconditions;
 import java.net.URI;
 import java.util.ArrayList;
@@ -63,14 +65,14 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
     private static final List<QName> REQUIRED_CAPABILITIES = new ArrayList<>();
     private final SocketInfo socketInfo;
 
-    public NeutronHostconfigVppListener(final DataBroker dataBroker, String spath, String sname, String vhostMode) {
+    public NeutronHostconfigVppListener(final DataBroker dataBroker, final String spath, final String sname,
+            final String vhostMode) {
         LOG.info("Initializing Neutron-Hostconfig-Vpp-Listener");
-        this.dataBroker = Preconditions.checkNotNull(dataBroker);
-        final String vhostModeChecked = Preconditions.checkNotNull(vhostMode).toLowerCase(Locale.ROOT);
+        this.dataBroker = requireNonNull(dataBroker);
+        final String vhostModeChecked = requireNonNull(vhostMode).toLowerCase(Locale.ROOT);
         Preconditions.checkArgument(vhostModeChecked.equals("server") || vhostModeChecked.equals("client"),
                 "Supported values for vhostuser-mode are client and server.");
-        this.socketInfo =
-                new SocketInfo(Preconditions.checkNotNull(spath), Preconditions.checkNotNull(sname), vhostModeChecked);
+        this.socketInfo = new SocketInfo(spath, sname, vhostModeChecked);
         this.neutronHostconfig = new NeutronHostconfigUtils(dataBroker);
         REQUIRED_CAPABILITIES.add(V3PO_1704_CAPABILITY);
         REQUIRED_CAPABILITIES.add(V3PO_1701_CAPABILITY);
@@ -78,12 +80,11 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
     }
 
     @Override
-    public void onDataTreeChanged(@NonNull Collection<DataTreeModification<Node>> changes) {
+    public void onDataTreeChanged(@NonNull final Collection<DataTreeModification<Node>> changes) {
         LOG.info("onDataTreeChanged: Received Data Tree Changes: {}", changes);
         executorService.execute(() -> {
             try {
-                for (DataTreeModification<Node> change : Preconditions.checkNotNull(changes,
-                        "Changes may not be null!")) {
+                for (DataTreeModification<Node> change : requireNonNull(changes, "Changes may not be null!")) {
                     processDataTreeModification(change);
                 }
             } catch (TransactionCommitFailedException e) {
@@ -92,7 +93,7 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
         });
     }
 
-    private void processDataTreeModification(DataTreeModification<Node> change)
+    private void processDataTreeModification(final DataTreeModification<Node> change)
             throws TransactionCommitFailedException {
         final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
         final DataObjectModification<Node> mod = change.getRootNode();
@@ -130,7 +131,7 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
         LOG.info("Registered listener to netconf nodes {}.", dataTreeIdentifier.getRootIdentifier());
     }
 
-    private void updateHostConfig(Node node, NeutronHostconfigUtils.Action action)
+    private void updateHostConfig(final Node node, final NeutronHostconfigUtils.Action action)
             throws TransactionCommitFailedException {
         for (Map.Entry<String, String> entry : HostconfigUtil.createHostconfigsDataFor(node.getNodeId(), socketInfo)
             .entrySet()) {
@@ -140,7 +141,7 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
         }
     }
 
-    private static boolean validateVppNode(Node node) {
+    private static boolean validateVppNode(final Node node) {
         LOG.info("Registering new node {}", node.getNodeId().getValue());
         NetconfNode netconfNode = node.augmentation(NetconfNode.class);
         if (netconfNode == null) {
index 5c07fefd664249697de59ed5200bffbec4d58b0c..07cfdeedf2f9257ee0230138143bfb10b0b4e6c2 100644 (file)
@@ -5,10 +5,9 @@
  * 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.hostconfig.vpp;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
 
 public class SocketInfo {
 
@@ -18,9 +17,9 @@ public class SocketInfo {
     private static final String PORT_ID = "$PORT_ID";
 
     public SocketInfo(String socketPath, String socketPrefix, String vhostuserMode) {
-        this.socketPath = Preconditions.checkNotNull(socketPath);
-        this.socketPrefix = Preconditions.checkNotNull(socketPrefix);
-        this.vhostuserMode = Preconditions.checkNotNull(vhostuserMode);
+        this.socketPath = requireNonNull(socketPath);
+        this.socketPrefix = requireNonNull(socketPrefix);
+        this.vhostuserMode = requireNonNull(vhostuserMode);
     }
 
     public String getSocketPath() {
index 4e9d07f37d3b26794f53ebaa06076cad9e546aad..a854a47dff125009193a1a45f4776641d273c1b6 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.neutron.logger;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import java.util.Collection;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -40,7 +41,7 @@ public final class NeutronLogger {
     @Inject
     public NeutronLogger(@NonNull DataBroker db) {
         LOG.info("Creating NeutronLogger {}", db);
-        this.db = Preconditions.checkNotNull(db, "null db");
+        this.db = requireNonNull(db, "null db");
     }
 
     private <T extends DataObject> void formatModification(@NonNull final StringBuilder messageBuilder,
@@ -99,7 +100,7 @@ public final class NeutronLogger {
     @PostConstruct
     public void init() {
         LOG.info("Register listener for Neutron model data changes");
-        InstanceIdentifier<Neutron> instanceId = Preconditions.checkNotNull(InstanceIdentifier.create(Neutron.class));
+        InstanceIdentifier<Neutron> instanceId = InstanceIdentifier.create(Neutron.class);
 
         DataTreeIdentifier<Neutron> configurationDataTreeId = DataTreeIdentifier.create(
                 LogicalDatastoreType.CONFIGURATION, instanceId);
index fa201e61e943ccae94479dcdc2f65ab14bfa39b2..efbd58206455b64804ae2ce062a3eb95906467cb 100644 (file)
@@ -5,9 +5,10 @@
  * 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.spi;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.Preconditions;
 import java.io.Serializable;
 import java.util.regex.Pattern;
@@ -31,8 +32,8 @@ public class NeutronID implements Serializable {
     String uuid;
 
     private static void checkUuidPattern(String uuid) {
-        Preconditions.checkNotNull(uuid, "Supplied value may not be null");
-        Preconditions.checkArgument(UUID_PATTERN.matcher(uuid).matches(),
+        Preconditions.checkArgument(
+                UUID_PATTERN.matcher(requireNonNull(uuid, "Supplied value may not be null")).matches(),
                 "Supplied value \"%s\" does not match uuid pattern \"%s\"", uuid, UUID_PATTERN_REGEX);
     }
 
index 4c953490c9ce2cab370c1bd1fb3a8e6431eae9ab..959aec77ba3687ee1c805f7270ce8b2c38a8975b 100644 (file)
        build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: neutron :: ${project.artifactId}</name>
 
+  <properties>
+    <!-- FIXME: Remove this -->
+    <odlparent.modernizer.enforce>false</odlparent.modernizer.enforce>
+  </properties>
+
   <dependencyManagement>
     <dependencies>
       <dependency>
index 3eb3afa0914c5aa9c5a1e275281c386c9106546e..65dc00184bb358cd245ccdcfcf54737586b293de 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>6.0.5</version>
+    <version>7.0.0</version>
     <relativePath/>
   </parent>
 
       <dependency>
         <groupId>org.opendaylight.infrautils</groupId>
         <artifactId>infrautils-artifacts</artifactId>
-        <version>1.8.1</version>
+        <version>1.9.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>controller-artifacts</artifactId>
-        <version>2.0.4</version>
+        <version>3.0.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
          <groupId>org.eclipse.persistence</groupId>
          <artifactId>org.eclipse.persistence.moxy</artifactId>
-         <!-- This is the same version (of EclipseLink) currently used in odlparent (4.0.6);
-              we just have to repeat it here because, apparently, Maven is too dumb to inherit
-              the version from a dependencyManagement in a parent POM to the dependencyManagement here.
-              (The alternative to repeat the exclusion below in each Neutron project is much worse.) -->
          <version>2.7.5</version>
          <exclusions>
            <exclusion>
         <!-- do not touch this version, see above -->
         <version>1.0.4</version>
       </dependency>
+      <dependency>
+        <groupId>javax.validation</groupId>
+        <artifactId>validation-api</artifactId>
+        <version>1.1.0.Final</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>