From 02e37fce046bfcaf46ce8f2b0b167877262d9099 Mon Sep 17 00:00:00 2001 From: Mohamed El-Serngawy Date: Thu, 8 Dec 2016 16:19:23 -0500 Subject: [PATCH] Fix Md-SAL store configuration add aaa-mdsal-config.xml file to make the md-sal datastore configuration editable by the end user. Change-Id: I0861046a1b5644f8c3ecaa3aa9bb5b6432ec9ca5 Signed-off-by: Mohamed El-Serngawy --- .../aaa-authn-mdsal-store-impl/pom.xml | 59 +++++++++---------- .../aaa/authn/mdsal/store/AuthNStore.java | 5 +- .../resources/initial/aaa-mdsal-config.xml | 4 ++ .../org/opendaylight/blueprint/mdsalstore.xml | 2 +- features/authn/src/main/features/features.xml | 5 +- 5 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/initial/aaa-mdsal-config.xml diff --git a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/pom.xml b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/pom.xml index ad1a128f1..f5b00c539 100644 --- a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/pom.xml +++ b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/pom.xml @@ -38,32 +38,8 @@ - org.opendaylight.controller - sal-binding-util - - - org.opendaylight.controller - sal-common-util - - - org.opendaylight.yangtools - yang-data-api - - - commons-codec - commons-codec - - - org.opendaylight.controller - sal-binding-api - - - org.opendaylight.controller - config-api - - - org.opendaylight.controller - sal-binding-config + org.opendaylight.controller + sal-binding-config org.opendaylight.aaa @@ -77,10 +53,6 @@ org.opendaylight.aaa aaa-encrypt-service - - org.opendaylight.controller - sal-core-api - org.opendaylight.aaa aaa-authn-mdsal-api @@ -109,4 +81,31 @@ + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/initial/aaa-mdsal-config.xml + xml + config + + + + + + + + + diff --git a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/java/org/opendaylight/aaa/authn/mdsal/store/AuthNStore.java b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/java/org/opendaylight/aaa/authn/mdsal/store/AuthNStore.java index 00b16a313..987df49e7 100644 --- a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/java/org/opendaylight/aaa/authn/mdsal/store/AuthNStore.java +++ b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/java/org/opendaylight/aaa/authn/mdsal/store/AuthNStore.java @@ -39,8 +39,8 @@ public class AuthNStore implements AutoCloseable, TokenStore { private static final Logger LOG = LoggerFactory.getLogger(AuthNStore.class); private DataBroker broker; - private static BigInteger timeToLive; - private static Integer timeToWait; + private BigInteger timeToLive; + private Integer timeToWait; private final ExecutorService deleteExpiredTokenThread = Executors.newFixedThreadPool(1); private final AAAEncryptionService dataEncrypter; @@ -56,7 +56,6 @@ public class AuthNStore implements AutoCloseable, TokenStore { public void close() throws Exception { deleteExpiredTokenThread.shutdown(); LOG.info("MD-SAL AAA Token Cache closed..."); - } @Override diff --git a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/initial/aaa-mdsal-config.xml b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/initial/aaa-mdsal-config.xml new file mode 100644 index 000000000..1b6a89b0f --- /dev/null +++ b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/initial/aaa-mdsal-config.xml @@ -0,0 +1,4 @@ + + 360000 + 10 + \ No newline at end of file diff --git a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/org/opendaylight/blueprint/mdsalstore.xml b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/org/opendaylight/blueprint/mdsalstore.xml index 59e4759d0..74a157421 100644 --- a/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/org/opendaylight/blueprint/mdsalstore.xml +++ b/aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/org/opendaylight/blueprint/mdsalstore.xml @@ -6,7 +6,7 @@ - diff --git a/features/authn/src/main/features/features.xml b/features/authn/src/main/features/features.xml index ed8b56c58..7bb8b024a 100644 --- a/features/authn/src/main/features/features.xml +++ b/features/authn/src/main/features/features.xml @@ -142,6 +142,7 @@ mvn:org.opendaylight.aaa/aaa-idmlight/{{VERSION}} + mvn:org.opendaylight.aaa/aaa-idmlight/{{VERSION}}/py/config mvn:com.fasterxml.jackson.core/jackson-core/{{VERSION}} mvn:com.fasterxml.jackson.core/jackson-annotations/{{VERSION}} mvn:com.fasterxml.jackson.core/jackson-databind/{{VERSION}} @@ -149,11 +150,10 @@ mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/{{VERSION}} mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/{{VERSION}} mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/{{VERSION}} - wrap:mvn:com.h2database/h2/{{VERSION}} mvn:org.opendaylight.aaa/aaa-authn-idpmapping/{{VERSION}} - mvn:org.glassfish/javax.json/1.0.4 + mvn:org.glassfish/javax.json/{{VERSION}} war @@ -162,6 +162,7 @@ mvn:com.sun.jersey/jersey-server/{{VERSION}} mvn:com.sun.jersey/jersey-client/{{VERSION}} + mvn:org.opendaylight.aaa/aaa-authn-mdsal-store-impl/{{VERSION}}/xml/config mvn:org.opendaylight.aaa/aaa-authn/{{VERSION}}/cfg/config mvn:org.opendaylight.aaa/aaa-filterchain/{{VERSION}}/cfg/config -- 2.36.6