Fix Md-SAL store configuration 63/49163/2
authorMohamed El-Serngawy <melserngawy@inocybe.com>
Thu, 8 Dec 2016 21:19:23 +0000 (16:19 -0500)
committerRyan Goulding <ryandgoulding@gmail.com>
Fri, 13 Jan 2017 21:13:01 +0000 (21:13 +0000)
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 <melserngawy@inocybe.com>
aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/pom.xml
aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/java/org/opendaylight/aaa/authn/mdsal/store/AuthNStore.java
aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/initial/aaa-mdsal-config.xml [new file with mode: 0644]
aaa-authn-mdsal-store/aaa-authn-mdsal-store-impl/src/main/resources/org/opendaylight/blueprint/mdsalstore.xml
features/authn/src/main/features/features.xml

index ad1a128f123b4166790857a30e5df8517b5f7a6c..f5b00c539fb245f6025c666643cb454c7497222d 100644 (file)
 
     <dependencies>
         <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-config</artifactId>
+          <groupId>org.opendaylight.controller</groupId>
+          <artifactId>sal-binding-config</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>aaa-encrypt-service</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-core-api</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>aaa-authn-mdsal-api</artifactId>
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>build-helper-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>attach-artifacts</id>
+                <goals>
+                  <goal>attach-artifact</goal>
+                </goals>
+                <phase>package</phase>
+                <configuration>
+                  <artifacts>
+                    <artifact>
+                      <file>${project.build.directory}/classes/initial/aaa-mdsal-config.xml</file>
+                      <type>xml</type>
+                      <classifier>config</classifier>
+                    </artifact>
+                  </artifacts>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+    </build>
+
 </project>
index 00b16a3134186a1533dca23d9c25d8abe4cc6233..987df49e79e9ff74b860d5855042d36b4f6fec75 100644 (file)
@@ -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 (file)
index 0000000..1b6a89b
--- /dev/null
@@ -0,0 +1,4 @@
+<mdsal-config xmlns="config:aaa:authn:mdsal:store">
+  <timeToLive>360000</timeToLive>
+  <timeToWait>10</timeToWait>
+</mdsal-config>
\ No newline at end of file
index 59e4759d07891f3e98ea969946d0794843975390..74a15742195e4f3a0e2c8604904fe35a41d04b60 100644 (file)
@@ -6,7 +6,7 @@
 
   <reference id="encryService" interface="org.opendaylight.aaa.encrypt.AAAEncryptionService"/>
 
-  <odl:clustered-app-config id="mdsalConfig"
+  <odl:clustered-app-config id="mdsalConfig" default-config-file-name="aaa-mdsal-config.xml"
         binding-class="org.opendaylight.yang.gen.v1.config.aaa.authn.mdsal.store.rev141031.MdsalConfig">
   </odl:clustered-app-config>
 
index ed8b56c585f915cc67ce5b6c8c4005a9c84d7bbc..7bb8b024a44f3c571634d6b66ec0f0d78b57f486 100644 (file)
 
         <!-- IDMLight -->
         <bundle>mvn:org.opendaylight.aaa/aaa-idmlight/{{VERSION}}</bundle>
+        <configfile finalname="etc/idmtool">mvn:org.opendaylight.aaa/aaa-idmlight/{{VERSION}}/py/config</configfile>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-core/{{VERSION}}</bundle>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/{{VERSION}}</bundle>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/{{VERSION}}</bundle>
         <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/{{VERSION}}</bundle>
         <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/{{VERSION}}</bundle>
         <bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/{{VERSION}}</bundle>
-        <bundle>wrap:mvn:com.h2database/h2/{{VERSION}}</bundle>
 
         <!-- Federation -->
         <bundle>mvn:org.opendaylight.aaa/aaa-authn-idpmapping/{{VERSION}}</bundle>
-        <bundle>mvn:org.glassfish/javax.json/1.0.4</bundle>
+        <bundle>mvn:org.glassfish/javax.json/{{VERSION}}</bundle>
 
         <!-- REST -->
         <feature>war</feature>
         <bundle>mvn:com.sun.jersey/jersey-server/{{VERSION}}</bundle>
         <bundle>mvn:com.sun.jersey/jersey-client/{{VERSION}}</bundle>
 
+        <configfile finalname="/etc/opendaylight/datastore/initial/config/aaa-mdsal-config.xml">mvn:org.opendaylight.aaa/aaa-authn-mdsal-store-impl/{{VERSION}}/xml/config</configfile>
         <configfile finalname="/etc/org.opendaylight.aaa.authn.cfg">mvn:org.opendaylight.aaa/aaa-authn/{{VERSION}}/cfg/config</configfile>
         <configfile finalname="/etc/org.opendaylight.aaa.filterchain.cfg">mvn:org.opendaylight.aaa/aaa-filterchain/{{VERSION}}/cfg/config</configfile>
     </feature>