Bump upstreams 06/99506/7
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 27 Jan 2022 19:15:27 +0000 (20:15 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Mar 2022 09:43:35 +0000 (10:43 +0100)
Adopt:
- odlparent-10.0.0
- infrautils-3.0.0
- yangtools-8.0.0-SNAPSHOT
- mdsal-9.0.0-SNAPSHOT
- controller-5.0.0-SNAPSHOT

Change-Id: I76f7fe3dcaba9b981445e56de36b1f00154a22bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
44 files changed:
aaa-cert/src/main/java/org/opendaylight/aaa/cert/impl/AaaCertRpcServiceImpl.java
aaa-cert/src/main/java/org/opendaylight/aaa/cert/impl/ODLKeyTool.java
aaa-cli-jar/src/main/java/org/opendaylight/aaa/cli/jar/AbstractMain.java
aaa-encrypt-service/impl/src/main/java/org/opendaylight/aaa/encrypt/impl/AAAEncryptionServiceImpl.java
aaa-encrypt-service/pom.xml
aaa-filterchain/pom.xml
aaa-idm-store-h2/pom.xml
aaa-password-service/impl/pom.xml
aaa-password-service/pom.xml
aaa-shiro/api/pom.xml
aaa-shiro/impl/pom.xml
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/KeystoneAuthRealm.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/TokenAuthRealm.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/util/TokenUtils.java
aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/realm/MDSALDynamicAuthorizationFilterTest.java
aaa-shiro/pom.xml
aaa-shiro/repackaged-shiro-jar/pom.xml
aaa-tokenauthrealm/pom.xml
artifacts/pom.xml
docs/pom.xml
features/features-aaa/pom.xml
features/odl-aaa-api/pom.xml
features/odl-aaa-api/src/main/feature/feature.xml
features/odl-aaa-cert/pom.xml
features/odl-aaa-cert/src/main/feature/feature.xml
features/odl-aaa-cli/pom.xml
features/odl-aaa-encryption-service/pom.xml
features/odl-aaa-encryption-service/src/main/feature/feature.xml
features/odl-aaa-password-service/pom.xml
features/odl-aaa-password-service/src/main/feature/feature.xml
features/odl-aaa-shiro/pom.xml
features/odl-aaa-shiro/src/main/feature/feature.xml
features/odl-aaa-web/pom.xml
features/odl-aaa-web/src/main/feature/feature.xml
features/odl-apache-shiro/pom.xml
features/odl-apache-shiro/src/main/feature/feature.xml
features/pom.xml
karaf/pom.xml
parent/pom.xml
pom.xml
web/impl-osgi/pom.xml
web/pom.xml
web/servlet-jersey2/pom.xml
web/testutils/pom.xml

index 7078317656dcb354bc5b375bc34b8bcaf1ee3902..317fb96c3741a8663e930c74705f232ac1bb618c 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.aaa.cert.impl;
 
 import com.google.common.base.Strings;
 import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.SettableFuture;
 import org.opendaylight.aaa.cert.api.IAaaCertProvider;
 import org.opendaylight.aaa.encrypt.AAAEncryptionService;
 import org.opendaylight.mdsal.binding.api.DataBroker;
@@ -30,7 +29,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rpc.rev151215
 import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rpc.rev151215.SetODLCertificateInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rpc.rev151215.SetODLCertificateOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rpc.rev151215.SetODLCertificateOutputBuilder;
-import org.opendaylight.yangtools.yang.common.RpcError;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
@@ -75,71 +75,54 @@ public class AaaCertRpcServiceImpl implements AaaCertRpcService {
 
     @Override
     public ListenableFuture<RpcResult<GetNodeCertificateOutput>> getNodeCertificate(
-           final GetNodeCertificateInput input) {
-        final SettableFuture<RpcResult<GetNodeCertificateOutput>> futureResult = SettableFuture.create();
+            final GetNodeCertificateInput input) {
         final String cert = aaaCertProvider.getCertificateTrustStore(input.getNodeAlias(), false);
-        if (!Strings.isNullOrEmpty(cert)) {
-            final GetNodeCertificateOutput nodeCertOutput = new GetNodeCertificateOutputBuilder().setNodeCert(cert)
-                    .build();
-            futureResult.set(RpcResultBuilder.success(nodeCertOutput).build());
-        } else {
-            String errorMsg = "getNodeCertificate does not fetch certificate for the alias " + input.getNodeAlias();
-            futureResult.set(RpcResultBuilder.<GetNodeCertificateOutput>failed().withRpcError(RpcResultBuilder
-                .newError(RpcError.ErrorType.APPLICATION, "", errorMsg)).build());
+        if (Strings.isNullOrEmpty(cert)) {
+            return RpcResultBuilder.<GetNodeCertificateOutput>failed()
+                .withRpcError(RpcResultBuilder.newError(ErrorType.APPLICATION, ErrorTag.DATA_MISSING,
+                    "getNodeCertificate does not fetch certificate for the alias " + input.getNodeAlias()))
+                .buildFuture();
         }
-        return futureResult;
+
+        return RpcResultBuilder.success(new GetNodeCertificateOutputBuilder().setNodeCert(cert).build()).buildFuture();
     }
 
     @Override
     public ListenableFuture<RpcResult<SetODLCertificateOutput>> setODLCertificate(final SetODLCertificateInput input) {
-        final SettableFuture<RpcResult<SetODLCertificateOutput>> futureResult = SettableFuture.create();
         if (aaaCertProvider.addCertificateODLKeyStore(input.getOdlCertAlias(), input.getOdlCert())) {
-            futureResult.set(RpcResultBuilder.success(new SetODLCertificateOutputBuilder().build()).build());
-        } else {
-            futureResult.set(RpcResultBuilder.<SetODLCertificateOutput>failed().build());
-            LOG.info("Error while adding ODL certificate");
+            return RpcResultBuilder.success(new SetODLCertificateOutputBuilder().build()).buildFuture();
         }
-        return futureResult;
+        LOG.info("Error while adding ODL certificate");
+        return RpcResultBuilder.<SetODLCertificateOutput>failed().buildFuture();
     }
 
     @Override
     public ListenableFuture<RpcResult<GetODLCertificateOutput>> getODLCertificate(final GetODLCertificateInput input) {
-        final SettableFuture<RpcResult<GetODLCertificateOutput>> futureResult = SettableFuture.create();
         final String cert = aaaCertProvider.getODLKeyStoreCertificate(false);
-        if (!Strings.isNullOrEmpty(cert)) {
-            final GetODLCertificateOutput odlCertOutput = new GetODLCertificateOutputBuilder().setOdlCert(cert).build();
-            futureResult.set(RpcResultBuilder.success(odlCertOutput).build());
-        } else {
-            futureResult.set(RpcResultBuilder.<GetODLCertificateOutput>failed().build());
+        if (Strings.isNullOrEmpty(cert)) {
+            return RpcResultBuilder.<GetODLCertificateOutput>failed().buildFuture();
         }
-        return futureResult;
+        return RpcResultBuilder.success(new GetODLCertificateOutputBuilder().setOdlCert(cert).build()).buildFuture();
     }
 
     @Override
     public ListenableFuture<RpcResult<GetODLCertificateReqOutput>> getODLCertificateReq(
             final GetODLCertificateReqInput input) {
-        final SettableFuture<RpcResult<GetODLCertificateReqOutput>> futureResult = SettableFuture.create();
         final String certReq = aaaCertProvider.genODLKeyStoreCertificateReq(false);
-        if (!Strings.isNullOrEmpty(certReq)) {
-            final GetODLCertificateReqOutput odlCertReqOutput = new GetODLCertificateReqOutputBuilder()
-                    .setOdlCertReq(certReq).build();
-            futureResult.set(RpcResultBuilder.success(odlCertReqOutput).build());
-        } else {
-            futureResult.set(RpcResultBuilder.<GetODLCertificateReqOutput>failed().build());
+        if (Strings.isNullOrEmpty(certReq)) {
+            return RpcResultBuilder.<GetODLCertificateReqOutput>failed().buildFuture();
         }
-        return futureResult;
+        return RpcResultBuilder.success(new GetODLCertificateReqOutputBuilder().setOdlCertReq(certReq).build())
+            .buildFuture();
     }
 
     @Override
     public ListenableFuture<RpcResult<SetNodeCertificateOutput>> setNodeCertificate(
            final SetNodeCertificateInput input) {
-        final SettableFuture<RpcResult<SetNodeCertificateOutput>> futureResult = SettableFuture.create();
         if (aaaCertProvider.addCertificateTrustStore(input.getNodeAlias(), input.getNodeCert())) {
-            futureResult.set(RpcResultBuilder.success(new SetNodeCertificateOutputBuilder().build()).build());
-        } else {
-            futureResult.set(RpcResultBuilder.<SetNodeCertificateOutput>failed().build());
-            LOG.info("Error while adding the Node certificate");
+            return RpcResultBuilder.success(new SetNodeCertificateOutputBuilder().build()).buildFuture();
         }
-        return futureResult;
+        LOG.info("Error while adding the Node certificate");
+        return RpcResultBuilder.<SetNodeCertificateOutput>failed().buildFuture();
     }
 }
index 2097f61ac15dcfe5ee78c8afab0361fa6af26eb8..14e8f30e8431ebf041fa7dcba7894f2aa51c73eb 100644 (file)
@@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory;
  */
 public class ODLKeyTool {
     private static final Logger LOG = LoggerFactory.getLogger(ODLKeyTool.class);
+    private static final SecureRandom RANDOM = new SecureRandom();
 
     private final String workingDir;
 
@@ -320,7 +321,7 @@ public class ODLKeyTool {
      * @return X509Certificate if the certificate string is not well formated
      *         will return null
      */
-    private X509Certificate getCertificate(String certificate) {
+    private static X509Certificate getCertificate(String certificate) {
         if (certificate.isEmpty()) {
             return null;
         }
@@ -350,9 +351,8 @@ public class ODLKeyTool {
      *
      * @return secure random number as BigInteger.
      */
-    private BigInteger getSecureRandomeInt() {
-        final SecureRandom secureRandom = new SecureRandom();
-        final BigInteger bigInt = BigInteger.valueOf(secureRandom.nextInt());
+    private static BigInteger getSecureRandomeInt() {
+        final BigInteger bigInt = BigInteger.valueOf(RANDOM.nextInt());
         return new BigInteger(1, bigInt.toByteArray());
     }
 
index 0b0d496c055bbb30e38646817ada5a3435348f51..0b0957f0b43d72e3b36fb7dea95763d2c8ed53c3 100644 (file)
@@ -7,11 +7,8 @@
  */
 package org.opendaylight.aaa.cli.jar;
 
-import static java.util.Arrays.asList;
-
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 import joptsimple.OptionParser;
 import joptsimple.OptionSet;
@@ -48,7 +45,7 @@ public abstract class AbstractMain {
     protected static final int RETURN_PASSWORD_MISMATCH = -7;
 
     @SuppressWarnings({ "unchecked", "checkstyle:IllegalThrows", "checkstyle:IllegalCatch" })
-    public int parseArguments(String[] args) throws Exception {
+    public int parseArguments(final String[] args) throws Exception {
         boolean isInDebugLogging = false;
         try {
             OptionParser optionParser = getOptionParser();
@@ -69,14 +66,14 @@ public abstract class AbstractMain {
                         + ", -" + OPTION_NEW_USER);
                 return RETURN_ARGUMENTS_INCOMPATIBLE;
             } else if (optionSet.has(OPTION_PASS)
-                    && !(optionSet.has(OPTION_CHANGE_USER) || optionSet.has(OPTION_VERIFY_USER))
+                    && !optionSet.has(OPTION_CHANGE_USER) && !optionSet.has(OPTION_VERIFY_USER)
                     && !optionSet.has(OPTION_NEW_USER)) {
                 System.err.println("If passwords are specificied, then must use one or the other of these options: -"
                         + OPTION_CHANGE_USER + ", -" + OPTION_NEW_USER);
                 return RETURN_ARGUMENTS_MISSING;
             }
 
-            List<String> userNames = new ArrayList<>();
+            final List<String> userNames;
             if (optionSet.has(OPTION_CHANGE_USER)) {
                 userNames = (List<String>) optionSet.valuesOf(OPTION_CHANGE_USER);
             } else if (optionSet.has(OPTION_NEW_USER)) {
@@ -85,6 +82,8 @@ public abstract class AbstractMain {
                 userNames = (List<String>) optionSet.valuesOf(OPTION_DEL_USER);
             } else if (optionSet.has(OPTION_VERIFY_USER)) {
                 userNames = (List<String>) optionSet.valuesOf(OPTION_VERIFY_USER);
+            } else {
+                userNames = List.of();
             }
             List<String> passwords = (List<String>) optionSet.valuesOf(OPTION_PASS);
             if (!optionSet.has(OPTION_DEL_USER) && passwords.size() != userNames.size()) {
@@ -126,34 +125,34 @@ public abstract class AbstractMain {
         }
     }
 
-    private OptionParser getOptionParser() {
-        return new OptionParser() { {
-                acceptsAll(asList(OPTION_HELP, "?"), "Show help").forHelp();
-                accepts(OPTION_DB_DIR, "databaseDirectory").withRequiredArg().ofType(File.class)
-                        .defaultsTo(new File(".")).describedAs("path");
-                acceptsAll(asList(OPTION_LIST_USERS, "listUsers"), "List all existing users");
-                acceptsAll(asList(OPTION_NEW_USER, "newUser"), "New user to create").withRequiredArg();
-                acceptsAll(asList(OPTION_CHANGE_USER, "changeUser"), "Existing user name to change password")
-                        .withRequiredArg();
-                acceptsAll(asList(OPTION_DEL_USER, "deleteUser"), "Existing user name to delete")
-                        .withRequiredArg();
-                acceptsAll(asList(OPTION_VERIFY_USER, "verifyUser"), "Existing user name to verify password of")
-                        .withRequiredArg();
-                acceptsAll(asList(OPTION_PASS, "passwd"), "New password").withRequiredArg();
-                accepts(OPTION_ADMINS, "New User(s) added with 'admin' role");
-                // TODO accepts("v", "Display version information").forHelp();
-                acceptsAll(asList(OPTION_DEBUG, "debug"), "Produce execution debug output");
-
-                allowsUnrecognizedOptions();
-            }
-        };
+    private static OptionParser getOptionParser() {
+        final var parser = new OptionParser();
+
+        parser.acceptsAll(List.of(OPTION_HELP, "?"), "Show help").forHelp();
+        parser.accepts(OPTION_DB_DIR, "databaseDirectory").withRequiredArg().ofType(File.class)
+            .defaultsTo(new File(".")).describedAs("path");
+        parser.acceptsAll(List.of(OPTION_LIST_USERS, "listUsers"), "List all existing users");
+        parser.acceptsAll(List.of(OPTION_NEW_USER, "newUser"), "New user to create").withRequiredArg();
+        parser.acceptsAll(List.of(OPTION_CHANGE_USER, "changeUser"), "Existing user name to change password")
+            .withRequiredArg();
+        parser.acceptsAll(List.of(OPTION_DEL_USER, "deleteUser"), "Existing user name to delete")
+            .withRequiredArg();
+        parser.acceptsAll(List.of(OPTION_VERIFY_USER, "verifyUser"), "Existing user name to verify password of")
+            .withRequiredArg();
+        parser.acceptsAll(List.of(OPTION_PASS, "passwd"), "New password").withRequiredArg();
+        parser.accepts(OPTION_ADMINS, "New User(s) added with 'admin' role");
+        // TODO accepts("v", "Display version information").forHelp();
+        parser.acceptsAll(List.of(OPTION_DEBUG, "debug"), "Produce execution debug output");
+
+        parser.allowsUnrecognizedOptions();
+        return parser;
     }
 
-    protected void unrecognizedOptions(List<?> unrecognizedOptions) {
+    protected void unrecognizedOptions(final List<?> unrecognizedOptions) {
         System.err.println("Unrecognized options: " + unrecognizedOptions);
     }
 
-    protected void printHelp(OptionParser optionParser) throws IOException {
+    protected void printHelp(final OptionParser optionParser) throws IOException {
         optionParser.printHelpOn(System.out);
     }
 
index 045a8268ee7f71ce828945f72aab4bec3ed7e55d..4e77ede8f32a2b1333ecdd20688eda5af03bb541 100644 (file)
@@ -17,7 +17,6 @@ import java.security.SecureRandom;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.KeySpec;
 import java.util.Base64;
-import java.util.Random;
 import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
 import javax.crypto.IllegalBlockSizeException;
@@ -59,6 +58,7 @@ public class AAAEncryptionServiceImpl implements AAAEncryptionService {
     private static final String DEFAULT_CONFIG_FILE_PATH = "etc" + File.separator + "opendaylight" + File.separator
             + "datastore" + File.separator + "initial" + File.separator + "config" + File.separator
             + "aaa-encrypt-service-config.xml";
+    private static final SecureRandom RANDOM = new SecureRandom();
 
     private final SecretKey key;
     private final IvParameterSpec ivspec;
@@ -75,9 +75,8 @@ public class AAAEncryptionServiceImpl implements AAAEncryptionService {
         if (encrySrvConfig.getEncryptKey() != null && encrySrvConfig.getEncryptKey().isEmpty()) {
             LOG.debug("Set the Encryption service password and encrypt salt");
             String newPwd = RandomStringUtils.random(encrySrvConfig.getPasswordLength(), true, true);
-            final Random random = new SecureRandom();
             byte[] salt = new byte[16];
-            random.nextBytes(salt);
+            RANDOM.nextBytes(salt);
             String encodedSalt = Base64.getEncoder().encodeToString(salt);
             encrySrvConfig = new AaaEncryptServiceConfigBuilder(encrySrvConfig).setEncryptKey(newPwd)
                     .setEncryptSalt(encodedSalt).build();
@@ -105,7 +104,7 @@ public class AAAEncryptionServiceImpl implements AAAEncryptionService {
                 | InvalidKeyException e) {
             LOG.error("Failed to create encrypt cipher.", e);
         }
-        this.encryptCipher = cipher;
+        encryptCipher = cipher;
         cipher = null;
         try {
             cipher = Cipher.getInstance(encrySrvConfig.getCipherTransforms());
@@ -114,7 +113,7 @@ public class AAAEncryptionServiceImpl implements AAAEncryptionService {
                 | InvalidKeyException e) {
             LOG.error("Failed to create decrypt cipher.", e);
         }
-        this.decryptCipher = cipher;
+        decryptCipher = cipher;
     }
 
     @Override
index e66af82dc9d2230c03f60900d618509021a2a6e6..5a31b033cc702bab5916a15e269d6fafca0969d9 100644 (file)
@@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>9.0.13</version>
+    <version>10.0.0</version>
     <relativePath/>
   </parent>
 
index d92d15cfa855923c472b61198f38352e2819fcb6..0c0c7140899db2eae18088005636103dda222f0a 100644 (file)
@@ -27,7 +27,7 @@
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
-      <artifactId>osgi.cmpn</artifactId>
+      <artifactId>org.osgi.service.component.annotations</artifactId>
     </dependency>
   </dependencies>
 
index ffe54ab00ca0510cfd4423e42f739fbfe22c253e..b8f40c03108089fb09cdd841b2168cac19b637a6 100644 (file)
         <!-- OSGI dependencies -->
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
+            <artifactId>org.osgi.service.component.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.metatype.annotations</artifactId>
         </dependency>
 
         <!-- External dependencies -->
index 2709d8ddb68e2407de7c6ea5a99cafc2a188e051..81628ecb78810e13060f8c048032e89d100a1f69 100644 (file)
@@ -33,7 +33,15 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
-      <artifactId>osgi.cmpn</artifactId>
+      <artifactId>org.osgi.service.component</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.service.component.annotations</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal</groupId>
+      <artifactId>yang-binding</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal</groupId>
index 8ad0096e123252a49141e7da5ab997d3f1ab36c2..d3ddaf0bd1112bd732ffb4b15d589529d57bc4f7 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>odlparent-lite</artifactId>
-    <version>9.0.13</version>
+    <version>10.0.0</version>
     <relativePath/>
   </parent>
 
index 80036c58ca1de2064769ab1c53acc38716249b87..66813820774c875a2b606e196c084e52c6f59ab8 100644 (file)
@@ -27,10 +27,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>concepts</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>yang-common</artifactId>
index e3d9d1e4369bea2045cd02a1f96cbf26f9f993b8..9750fd15288d27e1f6e5d0d1c5df4ad5038b652e 100644 (file)
@@ -76,7 +76,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
+            <artifactId>org.osgi.service.component.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.http</artifactId>
         </dependency>
         <dependency>
             <groupId>com.guicedee.services</groupId>
index 1749515c9be26aa29b055847445f78f0b1cf59bf..f06fe1a1d57f893d059a0910fd46eb0adb8a3ece 100644 (file)
@@ -7,16 +7,17 @@
  */
 package org.opendaylight.aaa.shiro.realm;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
 import com.google.common.util.concurrent.UncheckedExecutionException;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.util.Objects;
-import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -49,11 +50,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * KeystoneAuthRealm is a Shiro Realm that authenticates users from
- * OpenStack Keystone.
+ * KeystoneAuthRealm is a Shiro Realm that authenticates users from OpenStack Keystone.
  */
+// Non-final for testing
 public class KeystoneAuthRealm extends AuthorizingRealm {
-
     private static final Logger LOG = LoggerFactory.getLogger(KeystoneAuthRealm.class);
 
     private static final String NO_CATALOG_OPTION = "nocatalog";
@@ -71,12 +71,14 @@ public class KeystoneAuthRealm extends AuthorizingRealm {
     private volatile boolean sslVerification = true;
     private volatile String defaultDomain = DEFAULT_KEYSTONE_DOMAIN;
 
-    private final LoadingCache<Boolean, SimpleHttpClient> clientCache = buildCache();
+    private final LoadingCache<Boolean, SimpleHttpClient> clientCache;
 
     private final ICertificateManager certManager;
 
+    @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Legacy class layout")
     public KeystoneAuthRealm() {
-        this.certManager = Objects.requireNonNull(ThreadLocals.CERT_MANAGER_TL.get());
+        certManager = requireNonNull(ThreadLocals.CERT_MANAGER_TL.get());
+        clientCache = buildCache();
         LOG.info("KeystoneAuthRealm created");
     }
 
@@ -102,7 +104,7 @@ public class KeystoneAuthRealm extends AuthorizingRealm {
             return doGetAuthenticationInfo(authenticationToken, client);
         } catch (UncheckedExecutionException e) {
             Throwable cause = e.getCause();
-            if (!Objects.isNull(cause) && cause instanceof AuthenticationException) {
+            if (cause instanceof AuthenticationException) {
                 throw (AuthenticationException) cause;
             }
             throw e;
@@ -130,7 +132,7 @@ public class KeystoneAuthRealm extends AuthorizingRealm {
             throw new AuthenticationException(FATAL_ERROR_BASIC_AUTH_ONLY);
         }
 
-        if (Objects.isNull(theServerUri)) {
+        if (theServerUri == null) {
             LOG.error("Invalid URL to Keystone server");
             throw new AuthenticationException(FATAL_ERROR_INVALID_URL);
         }
@@ -183,7 +185,7 @@ public class KeystoneAuthRealm extends AuthorizingRealm {
                 .expireAfterWrite(CLIENT_EXPIRE_AFTER_WRITE, TimeUnit.SECONDS)
                 .build(new CacheLoader<Boolean, SimpleHttpClient>() {
                     @Override
-                    public SimpleHttpClient load(Boolean withSslVerification) throws Exception {
+                    public SimpleHttpClient load(final Boolean withSslVerification) throws Exception {
                         return buildClient(withSslVerification, certManager, SimpleHttpClient.clientBuilder());
                     }
                 });
@@ -218,15 +220,16 @@ public class KeystoneAuthRealm extends AuthorizingRealm {
                 .build();
     }
 
-    private SSLContext getSecureSSLContext(final ICertificateManager certificateManager) {
-        final SSLContext sslContext = Optional.ofNullable(certificateManager)
-                .map(ICertificateManager::getServerContext)
-                .orElse(null);
-        if (Objects.isNull(sslContext)) {
-            LOG.error("Could not get a valid SSL context from certificate manager");
-            throw new AuthenticationException(UNABLE_TO_AUTHENTICATE);
+    private static SSLContext getSecureSSLContext(final ICertificateManager certificateManager) {
+        if (certificateManager != null) {
+            final SSLContext sslContext = certificateManager.getServerContext();
+            if (sslContext != null) {
+                return sslContext;
+            }
         }
-        return sslContext;
+
+        LOG.error("Could not get a valid SSL context from certificate manager");
+        throw new AuthenticationException(UNABLE_TO_AUTHENTICATE);
     }
 
     /**
index f0025379090d232633da2aff116094d633494e24..4812925df1cce4e3b43860c453ce53bea1fcc5bd 100644 (file)
@@ -115,8 +115,11 @@ public class TokenAuthRealm extends AuthorizingRealm {
      * .apache.shiro.authc.AuthenticationToken)
      */
     @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(
-            final AuthenticationToken authenticationToken) throws AuthenticationException {
+    protected AuthenticationInfo doGetAuthenticationInfo(final AuthenticationToken authenticationToken)
+            throws AuthenticationException {
+        if (authenticationToken == null) {
+            throw new AuthenticationException(FATAL_ERROR_DECODING_CREDENTIALS);
+        }
 
         final String username;
         final String password;
@@ -127,9 +130,6 @@ public class TokenAuthRealm extends AuthorizingRealm {
             username = HeaderUtils.extractUsername(possiblyQualifiedUser);
             domain = HeaderUtils.extractDomain(possiblyQualifiedUser);
             password = TokenUtils.extractPassword(authenticationToken);
-
-        } catch (NullPointerException e) {
-            throw new AuthenticationException(FATAL_ERROR_DECODING_CREDENTIALS, e);
         } catch (ClassCastException e) {
             throw new AuthenticationException(FATAL_ERROR_BASIC_AUTH_ONLY, e);
         }
index 3623702f874ab57a8c5df7c8b68c938738711be9..a4e619f3a8344b39f24ccc0f0d83d9cd510bf45a 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.aaa.shiro.realm.util;
 
 import org.apache.shiro.authc.AuthenticationToken;
@@ -15,8 +14,8 @@ import org.apache.shiro.authc.UsernamePasswordToken;
  * Utilities for manipulating <code>AuthenticationToken</code> instances from Shiro.
  */
 public final class TokenUtils {
-
     private TokenUtils() {
+        // Hidden on purpose
     }
 
     /**
@@ -25,9 +24,7 @@ public final class TokenUtils {
      * @param authenticationToken authentication token
      * @return string with the user name
      */
-    public static String extractUsername(final AuthenticationToken authenticationToken)
-            throws ClassCastException, NullPointerException {
-
+    public static String extractUsername(final AuthenticationToken authenticationToken) throws ClassCastException {
         return (String) authenticationToken.getPrincipal();
     }
 
@@ -37,9 +34,7 @@ public final class TokenUtils {
      * @param authenticationToken authentication token
      * @return string with the extracted password
      */
-    public static String extractPassword(final AuthenticationToken authenticationToken)
-            throws ClassCastException, NullPointerException {
-
+    public static String extractPassword(final AuthenticationToken authenticationToken) throws ClassCastException {
         final UsernamePasswordToken upt = (UsernamePasswordToken) authenticationToken;
         return new String(upt.getPassword());
     }
index 0573f15a672788f48a7a15ae033e2c59d5b07edd..4edb06ba7106377764fb46bce8559ac7d4f04e14 100644 (file)
@@ -16,10 +16,9 @@ import static org.mockito.Mockito.when;
 import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateFailedFluentFuture;
 import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateFluentFuture;
 
-import com.google.common.collect.Lists;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
+import java.util.Set;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
@@ -84,32 +83,24 @@ public class MDSALDynamicAuthorizationFilterTest {
     }
 
     // test helper method to generate some cool mdsal data
-    private static DataBroker getTestData() throws Exception {
+    private static DataBroker getTestData() {
         return getTestData("/**", "admin", "Default Test AuthZ Rule", Permissions.Actions.Put);
     }
 
     // test helper method to generate some cool mdsal data
     private static DataBroker getTestData(final String resource, final String role, final String description,
-                                   final Permissions.Actions actions) throws Exception {
+            final Permissions.Actions actions) {
 
-        final List<Permissions.Actions> actionsList = Lists.newArrayList(actions);
         final Permissions permissions = mock(Permissions.class);
         when(permissions.getRole()).thenReturn(role);
-        when(permissions.getActions()).thenReturn(actionsList);
-        final List<Permissions> permissionsList = Lists.newArrayList(permissions);
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies
-                innerPolicies = mock(
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                        .policies.Policies.class);
+        when(permissions.getActions()).thenReturn(Set.of(actions));
+        final var innerPolicies = mock(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214
+            .http.authorization.policies.Policies.class);
         when(innerPolicies.getResource()).thenReturn(resource);
         when(innerPolicies.getDescription()).thenReturn(description);
-        when(innerPolicies.getPermissions()).thenReturn(permissionsList);
-        final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies>
-                policiesList = Lists.newArrayList(innerPolicies);
+        when(innerPolicies.getPermissions()).thenReturn(List.of(permissions));
         final Policies policies = mock(Policies.class);
-        when(policies.getPolicies()).thenReturn(policiesList);
+        when(policies.getPolicies()).thenReturn(List.of(innerPolicies));
         final HttpAuthorization httpAuthorization = mock(HttpAuthorization.class);
         when(httpAuthorization.getPolicies()).thenReturn(policies);
 
@@ -134,7 +125,7 @@ public class MDSALDynamicAuthorizationFilterTest {
         // Same as above, but with an empty policy list returned.
 
         final Policies policies = mock(Policies.class);
-        when(policies.getPolicies()).thenReturn(new ArrayList<>());
+        when(policies.getPolicies()).thenReturn(List.of());
         final HttpAuthorization httpAuthorization = mock(HttpAuthorization.class);
         when(httpAuthorization.getPolicies()).thenReturn(policies);
         filter = newFilter(mock(Subject.class), mockDataBroker(httpAuthorization));
@@ -223,9 +214,8 @@ public class MDSALDynamicAuthorizationFilterTest {
         //
         // Create some mock data which has a couple of rules which may/may not match.  This
         // test ensures the correct application of said rules.
-        final List<Permissions.Actions> actionsList = Lists
-                .newArrayList(Permissions.Actions.Get, Permissions.Actions.Delete, Permissions.Actions.Patch,
-                              Permissions.Actions.Put, Permissions.Actions.Post);
+        final Set<Permissions.Actions> actionsList = Set.of(Permissions.Actions.Get, Permissions.Actions.Delete,
+            Permissions.Actions.Patch, Permissions.Actions.Put, Permissions.Actions.Post);
         final String role = "admin";
         final String resource = "/**";
         final String resource2 = "/specialendpoint/**";
@@ -233,33 +223,23 @@ public class MDSALDynamicAuthorizationFilterTest {
         final Permissions permissions = mock(Permissions.class);
         when(permissions.getRole()).thenReturn(role);
         when(permissions.getActions()).thenReturn(actionsList);
-        final List<Permissions> permissionsList = Lists.newArrayList(permissions);
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies
-                innerPolicies = mock(
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                        .policies.Policies.class);
+        final var innerPolicies = mock(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214
+            .http.authorization.policies.Policies.class);
         when(innerPolicies.getResource()).thenReturn(resource);
         when(innerPolicies.getIndex()).thenReturn(Uint32.valueOf(5));
         when(innerPolicies.getDescription()).thenReturn(description);
-        when(innerPolicies.getPermissions()).thenReturn(permissionsList);
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies
-                innerPolicies2 = mock(
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                        .policies.Policies.class);
+        when(innerPolicies.getPermissions()).thenReturn(List.of(permissions));
+        final var innerPolicies2 = mock(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214
+            .http.authorization.policies.Policies.class);
         when(innerPolicies2.getResource()).thenReturn(resource2);
-        when(innerPolicies2.getIndex()).thenReturn(Uint32.valueOf(10));
+        when(innerPolicies2.getIndex()).thenReturn(Uint32.TEN);
         final Permissions permissions2 = mock(Permissions.class);
         when(permissions2.getRole()).thenReturn("dog");
         when(permissions2.getActions()).thenReturn(actionsList);
-        when(innerPolicies2.getPermissions()).thenReturn(Lists.newArrayList(permissions2));
+        when(innerPolicies2.getPermissions()).thenReturn(List.of(permissions2));
         when(innerPolicies2.getDescription()).thenReturn("Specialized Rule");
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies>
-                policiesList = Lists.newArrayList(innerPolicies, innerPolicies2);
         final Policies policies = mock(Policies.class);
-        when(policies.getPolicies()).thenReturn(policiesList);
+        when(policies.getPolicies()).thenReturn(List.of(innerPolicies, innerPolicies2));
         final HttpAuthorization httpAuthorization = mock(HttpAuthorization.class);
         when(httpAuthorization.getPolicies()).thenReturn(policies);
 
@@ -295,8 +275,7 @@ public class MDSALDynamicAuthorizationFilterTest {
         // Now reverse the ordering of the rules, and ensure that access is denied (except for
         // the first non-applicable rule, which should still be allowed).  This is
         // because the Subject making the request is not granted the "dog" role.
-        policiesList = Lists.newArrayList(innerPolicies2, innerPolicies);
-        when(policies.getPolicies()).thenReturn(policiesList);
+        when(policies.getPolicies()).thenReturn(List.of(innerPolicies2, innerPolicies));
         // Modify Index to ensure the innerPolicies2 actually gets
         // used instead of innerPolicies
         when(innerPolicies2.getIndex()).thenReturn(Uint32.valueOf(4));
@@ -316,29 +295,20 @@ public class MDSALDynamicAuthorizationFilterTest {
         final String role = "admin";
         final String resource = "/**";
         final String description = "Test description";
-        final List<Permissions.Actions> actionsList = Lists
-                .newArrayList(Permissions.Actions.Get, Permissions.Actions.Put, Permissions.Actions.Delete,
-                              Permissions.Actions.Patch, Permissions.Actions.Post);
         final Permissions permissions = mock(Permissions.class);
         when(permissions.getRole()).thenReturn(role);
-        when(permissions.getActions()).thenReturn(actionsList);
+        when(permissions.getActions()).thenReturn(Set.of(Permissions.Actions.Get, Permissions.Actions.Put,
+            Permissions.Actions.Delete, Permissions.Actions.Patch, Permissions.Actions.Post));
         final Permissions permissions2 = mock(Permissions.class);
         when(permissions2.getRole()).thenReturn("user");
-        when(permissions2.getActions()).thenReturn(Lists.newArrayList(Permissions.Actions.Get));
-        final List<Permissions> permissionsList = Lists.newArrayList(permissions, permissions2);
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies
-                innerPolicies = mock(
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                        .policies.Policies.class);
+        when(permissions2.getActions()).thenReturn(Set.of(Permissions.Actions.Get));
+        final var innerPolicies = mock(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214
+            .http.authorization.policies.Policies.class);
         when(innerPolicies.getResource()).thenReturn(resource);
         when(innerPolicies.getDescription()).thenReturn(description);
-        when(innerPolicies.getPermissions()).thenReturn(permissionsList);
-        final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.aaa.rev161214.http.authorization
-                .policies.Policies>
-                policiesList = Lists.newArrayList(innerPolicies);
+        when(innerPolicies.getPermissions()).thenReturn(List.of(permissions, permissions2));
         final Policies policies = mock(Policies.class);
-        when(policies.getPolicies()).thenReturn(policiesList);
+        when(policies.getPolicies()).thenReturn(List.of(innerPolicies));
         final HttpAuthorization httpAuthorization = mock(HttpAuthorization.class);
         when(httpAuthorization.getPolicies()).thenReturn(policies);
 
@@ -354,6 +324,5 @@ public class MDSALDynamicAuthorizationFilterTest {
         assertFalse(filter.isAccessAllowed(request, null, null));
         when(request.getMethod()).thenReturn("Get");
         assertTrue(filter.isAccessAllowed(request, null, null));
-
     }
 }
index 3888a80e95182be3284335c43081db170d10efe9..0c9e0839c3515487c2964b2a5aeb8ab2907b7443 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>odlparent-lite</artifactId>
-    <version>9.0.13</version>
+    <version>10.0.0</version>
     <relativePath/>
   </parent>
 
index 4713d62545635d0f958203beb70218d03f9f7b4f..fd9703f5767797ebfd4d0818a9b5a6608278f175 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index 0cfa6afb93d4a7b98bdc27e04b7ab4c5b6886a31..db075e2a934c45e5f5a7b1e4ab7c0e3826ac7149 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
+            <artifactId>org.osgi.service.component.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.metatype.annotations</artifactId>
         </dependency>
         <dependency>
             <groupId>com.guicedee.services</groupId>
index 592daf3c5f75b5a9a280c2a55bf59044d3cbdba9..95f8b22f2d48b19b9e7409cd132fd005b362aa78 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>9.0.13</version>
+      <version>10.0.0</version>
       <relativePath/>
     </parent>
 
index aa90f4e6212c514625d2839c293584f0ee0b5448..22dd554279c6578270d0ad49cbcea39e82be3ba0 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
         <dependency>
             <groupId>org.opendaylight.infrautils</groupId>
             <artifactId>inject.guice.testutils</artifactId>
-            <version>2.0.13</version>
+            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
                         <link>https://commons.apache.org/proper/commons-lang/javadocs/api-release/</link>
                         <link>https://commons.apache.org/proper/commons-codec/apidocs/</link>
 
-                        <link>https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/9.0.13/</link>
-                        <link>https://www.javadoc.io/doc/org.opendaylight.infrautils/infrautils-docs/2.0.13/</link>
-                        <link>https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/7.0.14/</link>
-                        <link>https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/8.0.11/</link>
-                        <link>https://www.javadoc.io/doc/org.opendaylight.controller/controller-docs/4.0.10/</link>
+                        <link>https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/10.0.0/</link>
+                        <link>https://www.javadoc.io/doc/org.opendaylight.infrautils/infrautils-docs/3.0.0/</link>
+                        <link>https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/8.0.0-SNAPSHOT/</link>
+                        <link>https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/9.0.0-SNAPSHOT/</link>
+                        <link>https://www.javadoc.io/doc/org.opendaylight.controller/controller-docs/5.0.0-SNAPSHOT/</link>
                     </links>
 
                     <!--groups>
index c4f6806aba7d8c68285b44da8d5080908cdff841..4da69c044c566dfe8f40cc1aba4261c9abdce7a5 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index e17a0d47388f46430fa325b518c6294aa139e6ed..4a8a2c7ec76d2ef437428390a392d94f67ab8fd1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
@@ -50,7 +50,7 @@
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>odl-mdsal-binding-base</artifactId>
-            <version>8.0.11</version>
+            <version>9.0.0-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 0175940c92a0f1b67301dbc6a0be6f5bab2b8231..a114213b56a4d41b69696f2a9f3b499beb3ef04c 100644 (file)
@@ -8,9 +8,9 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-aaa-${project.version}">
     <feature name="odl-aaa-api" version="${project.version}">
-        <feature version="[9,10)">odl-jakarta-activation-api</feature>
-        <feature version="[9,10)">odl-servlet-api</feature>
-        <feature version="[9,10)">odl-ws-rs-api</feature>
-        <feature version="[8,9)">odl-mdsal-binding-base</feature>
+        <feature version="[10,11)">odl-jakarta-activation-api</feature>
+        <feature version="[10,11)">odl-servlet-api</feature>
+        <feature version="[10,11)">odl-ws-rs-api</feature>
+        <feature version="[9,10)">odl-mdsal-binding-base</feature>
     </feature>
 </features>
index eb99d5a9c35b195f92ffedc524f5280d7503cf6b..d72b48c063e45f2d08aaf174bed7dd9b2a309e1d 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
@@ -27,7 +27,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-mdsal-broker</artifactId>
-            <version>4.0.10</version>
+            <version>5.0.0-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 890995d1936a07a6f8210a448d680a98705cfc74..733ec6170cb10a451221f5aed7508d1ba0a5393c 100644 (file)
@@ -8,7 +8,7 @@
  -->
 <features name="odl-aaa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
     <feature name="odl-aaa-cert" version="${project.version}">
-        <feature version="[4,5)">odl-mdsal-broker</feature>
+        <feature version="[5,6)">odl-mdsal-broker</feature>
         <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-cert-config.xml">
             mvn:org.opendaylight.aaa/aaa-cert/${project.version}/xml/config
         </configfile>
index b803a97b315475357cb25f05b954afb08c5db191..eb60d727835ab040b6d0a2f0e839a4fe479e86da 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index 51b4c10c5df57a705d37ae847da9abdaaf0f23f4..eeead78b3ad27487180b7157c1b351e5abfdf9be 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
 
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>controller-artifacts</artifactId>
+                <version>5.0.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>aaa-artifacts</artifactId>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-mdsal-broker</artifactId>
-            <version>4.0.10</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>odl-controller-blueprint</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 899a99b961a8c41727bf013541d3821632c01094..b9af6e401d469c53375dd66fec04d95acdd2cfec 100644 (file)
@@ -8,7 +8,8 @@
  -->
 <features name="odl-aaa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
     <feature name="odl-aaa-encryption-service" version="${project.version}">
-        <feature version="[4,5)">odl-mdsal-broker</feature>
+        <feature version="[5,6)">odl-controller-blueprint</feature>
+        <feature version="[5,6)">odl-mdsal-broker</feature>
         <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-encrypt-service-config.xml">
             mvn:org.opendaylight.aaa/aaa-encrypt-service-impl/${project.version}/xml/config
         </configfile>
index 250d69f93f9b720257a173d748a8c01d189146a6..11a46f156a92ad3053ef72c716eb5227f200654a 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>odl-mdsal-binding-base</artifactId>
-            <version>8.0.11</version>
+            <version>9.0.0-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-mdsal-broker</artifactId>
-            <version>4.0.10</version>
+            <version>5.0.0-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 42c8bd2aa251178056e4fcf4825223bd672b59e0..74455f17fbeca22f0f59a2e12e2a496f39c0540b 100644 (file)
@@ -8,8 +8,8 @@
  -->
 <features name="odl-aaa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
     <feature name="odl-aaa-password-service" version="${project.version}">
-        <feature version="[8,9)">odl-mdsal-binding-base</feature>
-        <feature version="[4,5)">odl-mdsal-broker</feature>
+        <feature version="[9,10)">odl-mdsal-binding-base</feature>
+        <feature version="[5,6)">odl-mdsal-broker</feature>
         <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-password-service-config.xml">
             mvn:org.opendaylight.aaa/aaa-password-service-impl/${project.version}/xml/aaa-password-service-config
         </configfile>
index f540f28938217c0826c432e25d99df864711ed0a..e60681d590bbbcbd05e32620f8cf3c78b9a9e47c 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index 011c5adeff235c103460b4cbc43c79394417a633..d714fff14fb9c4819c56d397dcb26948af2997fa 100644 (file)
@@ -23,8 +23,8 @@
         <configfile finalname="/etc/org.opendaylight.aaa.filterchain.cfg">
             mvn:org.opendaylight.aaa/aaa-filterchain/${project.version}/cfg/config
         </configfile>
-        <feature version="[9,10)">odl-karaf-feat-jdbc</feature>
-        <feature version="[9,10)">odl-karaf-feat-jetty</feature>
-        <feature version="[4,5)">odl-jolokia</feature>
+        <feature version="[10,11)">odl-karaf-feat-jdbc</feature>
+        <feature version="[10,11)">odl-karaf-feat-jetty</feature>
+        <feature version="[5,6)">odl-jolokia</feature>
     </feature>
 </features>
index d96387595ea8819c28de4a1bcad52a9f8b5bc7ea..3c591e0593830c90b2d07b18721074bd77d29b8a 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
@@ -35,7 +35,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>7.0.14</version>
+                <version>8.0.0-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index a3d1dffe25c9f41ceeade8ec6f24547d2497d5a6..47528abd7addba9a51ca24761667728248bf9bd0 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-aaa-${project.version}">
     <feature name="odl-aaa-web" version="${project.version}">
-        <feature version="[9,10)">odl-karaf-feat-jetty</feature>
-        <feature version="[9,10)">odl-guava</feature>
-        <feature version="[9,10)">odl-jersey-2</feature>
-        <feature version="[7,8)">odl-yangtools-util</feature>
+        <feature version="[10,11)">odl-karaf-feat-jetty</feature>
+        <feature version="[10,11)">odl-guava</feature>
+        <feature version="[10,11)">odl-jersey-2</feature>
+        <feature version="[8,9)">odl-yangtools-util</feature>
     </feature>
 </features>
index a05a566f27822be45da4ff4ddc30bedef10df98c..f4f9660f511fa3bdbff08ebd25335af3a079a6e9 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index 209d3421c65e4d8ff106c94d69ab65f1344de8da..29c2225b0c2d7a5d8f296aed0732a2cfed06574d 100644 (file)
@@ -8,6 +8,6 @@
  -->
 <features name="odl-aaa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
     <feature name="odl-apache-shiro" version="${project.version}">
-        <feature version="[9,10)">odl-servlet-api</feature>
+        <feature version="[10,11)">odl-servlet-api</feature>
     </feature>
 </features>
index 1ef0424cac75b007b94b9a14935f37e9802acb53..3dc22ae1b021e0b07382bc28057ff06a0ee9af4a 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index b062b80b37c44c4098e271793bcf0389a54392ad..d24358b0778746ea5f3f298caafe7928f1fb56c5 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>karaf4-parent</artifactId>
-        <version>9.0.13</version>
+        <version>10.0.0</version>
         <relativePath/>
     </parent>
 
index 0ae127dee9859e414c2393b0805794c0b227a227..d0101fb4fcfb2eb794521f570bd05d6a4ea193e8 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.11</version>
+    <version>9.0.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>controller-artifacts</artifactId>
-        <version>4.0.10</version>
+        <version>5.0.0-SNAPSHOT</version>
         <scope>import</scope>
         <type>pom</type>
       </dependency>
 
       <!-- Third-party -->
+      <dependency>
+        <groupId>com.h2database</groupId>
+        <artifactId>h2</artifactId>
+        <version>1.4.200</version>
+      </dependency>
       <dependency>
         <groupId>net.sf.ehcache</groupId>
         <artifactId>ehcache</artifactId>
diff --git a/pom.xml b/pom.xml
index b7e09b3b28221deccf66c51bda2c86b978dc00b5..32fefc0470d6166a9e26b81ca63f828132c5884b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>9.0.13</version>
+    <version>10.0.0</version>
     <relativePath/>
   </parent>
 
index 454beba9372547b039d26918a99001db79314c1d..cf7d3a701dc4f35530534cab6bc548fde9828ee4 100644 (file)
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
-      <artifactId>osgi.core</artifactId>
+      <artifactId>org.osgi.framework</artifactId>
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
-      <artifactId>osgi.cmpn</artifactId>
+      <artifactId>org.osgi.service.component</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.service.component.annotations</artifactId>
     </dependency>
   </dependencies>
 </project>
index a0903dece26abeb2ae93c2feea99cef679cb7d86..23f2d745fb1c1608f53b7d19037a7336c73d4da3 100644 (file)
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>9.0.13</version>
+    <version>10.0.0</version>
     <relativePath/>
   </parent>
 
index c9b2a1b646648e44cf1c7a04769acb9222f406b5..e3112b3d0c0c1ffd4f84fb85e9057fccfd57646b 100644 (file)
@@ -45,7 +45,7 @@
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
+            <artifactId>org.osgi.service.component.annotations</artifactId>
         </dependency>
     </dependencies>
 </project>
index 75671ca388c054b03ad55643745dfcebb418378c..92455ddba5ab4e6be5cb64c8922ca405e92ab4d9 100644 (file)
@@ -27,7 +27,7 @@
       <dependency>
         <groupId>org.opendaylight.infrautils</groupId>
         <artifactId>infrautils-artifacts</artifactId>
-        <version>2.0.13</version>
+        <version>3.0.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>