Merge "Fix empty revision handling in NETCONF capability"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 4 Jan 2016 10:44:35 +0000 (10:44 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 4 Jan 2016 10:44:35 +0000 (10:44 +0000)
features/restconf/pom.xml
opendaylight/netconf/abstract-topology/pom.xml
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/exi/EXIParameters.java
opendaylight/netconf/netconf-topology/pom.xml
opendaylight/restconf/sal-rest-docgen/pom.xml
opendaylight/restconf/sal-rest-docgen/src/main/resources/WEB-INF/web.xml
pom.xml

index d130180040ce8048b0015ab189f71ed9f336d6b0..df2201cc2ed524891c2eff50b16299d08b846726 100644 (file)
@@ -24,7 +24,6 @@
     <commons.opendaylight.version>1.6.0-SNAPSHOT</commons.opendaylight.version>
     <controller.mdsal.version>1.3.0-SNAPSHOT</controller.mdsal.version>
     <features.test.version>1.6.0-SNAPSHOT</features.test.version>
-    <jersey-servlet.version>1.17</jersey-servlet.version>
     <mdsal.version>2.0.0-SNAPSHOT</mdsal.version>
     <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
     <restconf.version>1.3.0-SNAPSHOT</restconf.version>
index 703ee4e9bfa5fb349db5a27050151563bd2f8cc9..b600b6a98aab7e2af52ccc05c46db9330e42872f 100644 (file)
@@ -61,7 +61,6 @@
         <dependency>
             <groupId>com.typesafe</groupId>
             <artifactId>config</artifactId>
-            <version>${typesafe.config.version}</version>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <version>1.9.5</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>com.typesafe</groupId>
-            <artifactId>config</artifactId>
-            <version>1.2.1</version>
-        </dependency>
         <dependency>
             <groupId>com.jayway.awaitility</groupId>
             <artifactId>awaitility</artifactId>
index 2bc96beb0517d766a6dcbd8aefea1d184cd77363..6fcea5130a7e18b42fc3d069f0c0d179386e229f 100644 (file)
@@ -14,6 +14,8 @@ import org.openexi.proc.common.EXIOptions;
 import org.openexi.proc.common.EXIOptionsException;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class EXIParameters {
     private static final String EXI_PARAMETER_ALIGNMENT = "alignment";
@@ -30,6 +32,7 @@ public final class EXIParameters {
     private static final String EXI_FIDELITY_PREFIXES = "prefixes";
 
     private final EXIOptions options;
+    private static final Logger LOG = LoggerFactory.getLogger(EXIParameters.class);
 
     private EXIParameters(final EXIOptions options) {
         this.options = Preconditions.checkNotNull(options);
@@ -38,18 +41,12 @@ public final class EXIParameters {
 
     public static EXIParameters fromXmlElement(final XmlElement root) throws EXIOptionsException {
         final EXIOptions options =  new EXIOptions();
-
-        options.setAlignmentType(AlignmentType.bitPacked);
-
         final NodeList alignmentElements = root.getElementsByTagName(EXI_PARAMETER_ALIGNMENT);
         if (alignmentElements.getLength() > 0) {
             final Element alignmentElement = (Element) alignmentElements.item(0);
             final String alignmentTextContent = alignmentElement.getTextContent().trim();
 
             switch (alignmentTextContent) {
-            case EXI_PARAMETER_BIT_PACKED:
-                options.setAlignmentType(AlignmentType.bitPacked);
-                break;
             case EXI_PARAMETER_BYTE_ALIGNED:
                 options.setAlignmentType(AlignmentType.byteAligned);
                 break;
@@ -59,7 +56,14 @@ public final class EXIParameters {
             case EXI_PARAMETER_PRE_COMPRESSION:
                 options.setAlignmentType(AlignmentType.preCompress);
                 break;
+            default:
+                LOG.warn("Unexpected value in alignmentTextContent: {} , using default value", alignmentTextContent);
+            case EXI_PARAMETER_BIT_PACKED:
+                options.setAlignmentType(AlignmentType.bitPacked);
+                break;
             }
+        } else {
+            options.setAlignmentType(AlignmentType.bitPacked);
         }
 
         if (root.getElementsByTagName(EXI_PARAMETER_FIDELITY).getLength() > 0) {
index 94b0d40e19325ee7a07c22ee54c91e9da211310c..fb9c4257f5010dc0f3e4963a5333948a686f87e3 100644 (file)
@@ -89,7 +89,6 @@
         <dependency>
             <groupId>com.typesafe</groupId>
             <artifactId>config</artifactId>
-            <version>${typesafe.config.version}</version>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
index 2a14fe28aaa8f0f44cfb53b1dc80b9c6440e033c..30f78ea494ace7f4cfec7cd23583606c8558eb78 100644 (file)
               !org.apache.maven.project,
               !org.opendaylight.yangtools.yang2sources.spi,
               *,
-              com.sun.jersey.spi.container.servlet, org.eclipse.jetty.servlets
+              com.sun.jersey.spi.container.servlet,
+              org.eclipse.jetty.servlets,
+              org.opendaylight.aaa.shiro.filters,
+              org.opendaylight.aaa.shiro.realm,
+              org.opendaylight.aaa.shiro.web.env,
+              org.apache.shiro.web.env
             </Import-Package>
             <Bundle-Activator>org.opendaylight.netconf.sal.rest.doc.DocProvider</Bundle-Activator>
             <Web-ContextPath>/apidoc</Web-ContextPath>
index 930a39db8e8083c3f394d20d6d3991bde385a453..cd267696304312eac072d295aba47b1529b6b343 100644 (file)
             <param-name>javax.ws.rs.Application</param-name>
             <param-value>org.opendaylight.netconf.sal.rest.doc.jaxrs.ApiDocApplication</param-value>
         </init-param>
-        <!-- AAA Auth Filter -->
-        <init-param>
-            <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
-            <param-value> org.opendaylight.aaa.sts.TokenAuthFilter</param-value>
-        </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
 
+    <context-param>
+      <param-name>shiroEnvironmentClass</param-name>
+      <param-value>org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
+    </listener>
+
+    <filter>
+        <filter-name>ShiroFilter</filter-name>
+        <filter-class>org.opendaylight.aaa.shiro.filters.AAAFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>ShiroFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
     <servlet-mapping>
         <servlet-name>JAXRSApiDoc</servlet-name>
         <url-pattern>/apis/*</url-pattern>
diff --git a/pom.xml b/pom.xml
index 55532876972bee49c50efbb84d22b2113d142f00..51077a81914b108f74b4b3958912907da00b3d18 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,6 @@
         <ietf-restconf.version>2013.10.19.8-SNAPSHOT</ietf-restconf.version>
         <ietf-topology.version>2013.10.21.8-SNAPSHOT</ietf-topology.version>
         <ietf-yang-types.version>2010.09.24.8-SNAPSHOT</ietf-yang-types.version>
-        <jersey-servlet.version>1.17</jersey-servlet.version>
 
         <mdsal.version>2.0.0-SNAPSHOT</mdsal.version>
         <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
@@ -47,7 +46,6 @@
         <scala.major.version>2.10</scala.major.version>
         <scala.minor.version>4</scala.minor.version>
         <surefire.version>2.15</surefire.version>
-        <typesafe.config.version>1.2.1</typesafe.config.version>
         <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
 
         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>