Merge "Make test tool work with schemas with no revision"
authorMaros Marsalek <mmarsale@cisco.com>
Wed, 16 Dec 2015 14:33:23 +0000 (14:33 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Dec 2015 14:33:23 +0000 (14:33 +0000)
42 files changed:
features/netconf/pom.xml
features/netconf/src/main/features/features.xml
features/restconf/pom.xml
features/restconf/src/main/features/features.xml
opendaylight/netconf/mdsal-netconf-monitoring/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/monitoring/NetconfMdsalMonitoringMapperModule.java
opendaylight/netconf/mdsal-netconf-monitoring/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/monitoring/NetconfMdsalMonitoringMapperModuleFactory.java
opendaylight/netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/NetconfMdsalNotificationMapperModule.java
opendaylight/netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/NetconfMdsalNotificationMapperModuleFactory.java
opendaylight/netconf/messagebus-netconf/src/main/java/org/opendaylight/controller/config/yang/messagebus/netconf/MessageBusNetconfModule.java
opendaylight/netconf/messagebus-netconf/src/main/java/org/opendaylight/controller/config/yang/messagebus/netconf/MessageBusNetconfModuleFactory.java
opendaylight/netconf/models/ietf-netconf-notifications/src/main/yang/ietf-netconf-notifications@2012-02-06.yang
opendaylight/netconf/netconf-config-dispatcher/src/test/java/org/opendaylight/controller/config/yang/config/netconf/client/dispatcher/NetconfClientDispatcherModuleTest.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfMapperAggregatorModule.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfMapperAggregatorModuleFactory.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfServerDispatcherModule.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfServerDispatcherModuleFactory.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfServerMonitoringModule.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/config/yang/config/netconf/northbound/impl/NetconfServerMonitoringModuleFactory.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/netconf/impl/osgi/NetconfImplActivator.java
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/exi/NetconfStartExiMessage.java
opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/notification/impl/NetconfNotificationManagerModule.java
opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/notification/impl/NetconfNotificationManagerModuleFactory.java
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/ssh/NetconfNorthboundSshModule.java
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/ssh/NetconfNorthboundSshModuleFactory.java
opendaylight/netconf/netconf-tcp/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/tcp/NetconfNorthboundTcpModule.java
opendaylight/netconf/netconf-tcp/src/main/java/org/opendaylight/controller/config/yang/netconf/northbound/tcp/NetconfNorthboundTcpModuleFactory.java
opendaylight/netconf/netconf-topology/src/main/java/org/opendaylight/controller/config/yang/clustered/netconf/topology/ClusteredNetconfTopologyModule.java
opendaylight/netconf/netconf-topology/src/main/java/org/opendaylight/controller/config/yang/clustered/netconf/topology/ClusteredNetconfTopologyModuleFactory.java
opendaylight/netconf/netconf-topology/src/main/java/org/opendaylight/controller/config/yang/netconf/topology/shared/schema/repository/SchemaRepositoryImplModule.java
opendaylight/netconf/netconf-topology/src/main/java/org/opendaylight/controller/config/yang/netconf/topology/shared/schema/repository/SchemaRepositoryImplModuleFactory.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/OrderedNormalizedNodeWriter.java
opendaylight/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/KeepaliveSalFacade.java
opendaylight/netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/KeepaliveSalFacadeTest.java
opendaylight/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/Parameters.java
opendaylight/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/PerfClientCallable.java
opendaylight/restconf/sal-rest-connector/pom.xml
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/md/sal/rest/connector/RestConnectorModule.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/md/sal/rest/connector/RestConnectorModuleFactory.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/sal/restconf/service/JSONRestconfServiceModule.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/sal/restconf/service/JSONRestconfServiceModuleFactory.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfDocumentedExceptionMapper.java
opendaylight/restconf/sal-rest-connector/src/main/resources/WEB-INF/web.xml

index 9d24f37e543de15a7134445937adc614b7f91f74..b79e70badd9140036ce1bff4fac4532efa9ff112 100644 (file)
   </dependencyManagement>
 
   <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.aaa</groupId>
+      <artifactId>features-aaa-shiro</artifactId>
+      <version>${aaa.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>features-protocol-framework</artifactId>
       <groupId>io.netty</groupId>
       <artifactId>netty-transport</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.bouncycastle</groupId>
+      <artifactId>bcpkix-jdk15on</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.bouncycastle</groupId>
+      <artifactId>bcprov-jdk15on</artifactId>
+    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>netconf-client</artifactId>
index 9a123722831d041fd961c64cb03aa71288182e11..65d89fe4310eb5f088e4db1bba24f32402202528 100644 (file)
@@ -81,8 +81,8 @@
     <feature version='${project.version}'>odl-netconf-mapping-api</feature>
     <feature version='${project.version}'>odl-netconf-util</feature>
     <bundle>mvn:org.opendaylight.netconf/netconf-netty-util/{{VERSION}}</bundle>
-    <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.version}</bundle>
-    <bundle>mvn:org.bouncycastle/bcprov-jdk15on/${bouncycastle.version}</bundle>
+    <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/{{VERSION}}</bundle>
+    <bundle>mvn:org.bouncycastle/bcprov-jdk15on/{{VERSION}}</bundle>
     <bundle>mvn:org.apache.sshd/sshd-core/{{VERSION}}</bundle>
     <bundle>mvn:openexi/nagasena/{{VERSION}}</bundle>
     <bundle>mvn:io.netty/netty-codec/{{VERSION}}</bundle>
index fa4c63882c97f3f93124b264aea2e78ea34175ce..d130180040ce8048b0015ab189f71ed9f336d6b0 100644 (file)
     <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>
-    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
     <surefire.version>2.15</surefire.version>
+    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
 
     <features.file>features.xml</features.file>
     <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.aaa</groupId>
-      <artifactId>features-aaa</artifactId>
+      <artifactId>features-aaa-shiro</artifactId>
       <version>${aaa.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
-
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-remote</artifactId>
     <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-core</artifactId>
-      <version>${jersey.version}</version>
     </dependency>
     <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-server</artifactId>
-      <version>${jersey.version}</version>
     </dependency>
     <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-servlet</artifactId>
-      <version>${jersey.version}</version>
     </dependency>
     <dependency>
       <groupId>io.netty</groupId>
index 10060895fe0230b47dbda2492d66a686f2b1e9c5..2ede2bc45a21d2aa6bad2bcdbd88dc9fa8589030 100644 (file)
 
     <repository>mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features</repository>
     <repository>mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features</repository>
-    <repository>mvn:org.opendaylight.aaa/features-aaa/{{VERSION}}/xml/features</repository>
+    <repository>mvn:org.opendaylight.aaa/features-aaa-shiro/{{VERSION}}/xml/features</repository>
     <feature name='odl-restconf-all' version='${project.version}' description='OpenDaylight :: Restconf :: All'>
         <feature version='${project.version}'>odl-restconf</feature>
         <feature version='${project.version}'>odl-mdsal-apidocs</feature>
     </feature>
 
     <feature name='odl-restconf' version='${project.version}' description="OpenDaylight :: Restconf">
-        <feature version='${aaa.version}'>odl-aaa-authn</feature>
+        <!-- Enables AAA through the odl-shiro-act bundle Activator -->
+        <bundle>mvn:org.opendaylight.aaa/aaa-shiro-act/{{VERSION}}</bundle>
         <feature version='${project.version}'>odl-restconf-noauth</feature>
     </feature>
     <feature name='odl-restconf-noauth' version='${project.version}' description="OpenDaylight :: Restconf">
+        <feature version='${aaa.version}'>odl-aaa-shiro</feature>
         <feature version='${controller.mdsal.version}'>odl-mdsal-broker</feature>
         <feature>war</feature>
         <!-- presently we need sal-remote to be listed BEFORE sal-rest-connector because sal-rest-connector
index 985c728788438b93898f954fcd4587aa394a1919..9b779ac5571c294cec99d90a16ee80287612bb93 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.mdsal.monitoring;
 
 import java.util.Collections;
index e0d459318fe6be4c366e9cb386f4c4eabeb19c33..026b4159ed21778398f1be23a8954c4fd9cf1dfa 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index df97717531303b56728695b8afd84f1d2c9d33aa..584f59de7e131583feab4f634e364a2ddcce646d 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.mdsal.notification;
 
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
index 0f8f08f69a4324c251b82563ae4e032985d17e85..c87382cea19a4b608d61dc94a64ed69d44bec1d0 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 9b90f4798af1a43362dc95d203885c5361ab0fe6..19761d495d1d2c4121d11cd8882ee21907ae1621 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.messagebus.netconf;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
index 7681cdf02d33281ee60feaaae5363be532b3b49c..fe41f43d812e3b00320e86e0c2d749aa5a4685d6 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 1c8d94438e0f39963233214400d006ccc40d68e5..456fde49266c44f759073662ca801c081cf57ea8 100644 (file)
@@ -103,15 +103,13 @@ module ietf-netconf-notifications {
          of the session that made the change will be reported.";
       choice server-or-user {
         mandatory true;
-        //FIXME: After Bug 4414 is resolved, use shorthand version of case statement
-        case server {
-          leaf server {
-            type empty;
-            description
+        leaf server {
+          type empty;
+          description
             "If present, the change was caused
-            by the server.";
-          }
+             by the server.";
         }
+
         case by-user {
           uses common-session-parms;
         }
index 85477a02377af870142092de73a8c223308c703b..bd4f4e8dff98c9a47b01ff945c2b9c7488e8b14a 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.config.netconf.client.dispatcher;
 
 import javax.management.InstanceAlreadyExistsException;
index 59f20373592ba5a2e1b0cb001644ac51509466bf..4b49941ae80ee9c4ad962136f202e2ed8b5734d3 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.config.netconf.northbound.impl;
 
 import org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory;
index 0e415bdfcb440db004ab24f244fe922ab2605056..8a8ffb748af07b64ab93a86fac7d99d00534d41c 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 5135d268312e1459ce6dac84d697a899671418d4..ce91d01334ab58e4dcfb02ba4d0f77d2b9dca554 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.config.netconf.northbound.impl;
 
 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
index de44caddaca201849799439e608eaaba43d28a4d..61c0c7137e054afaf567fe2f9dc80c8785cdf9c9 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 4bb0345c3561403656027a0ba0eaa51bfeabaae5..5a7aa06ad72148600a024fc0e211545f1f498c1e 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.config.netconf.northbound.impl;
 
 import org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl;
index fe74486a7717dcdbf959e105b4c36674341b71ef..8b4cb65ed2731cf5e6b9ad7d2d526f7c53bf8ad4 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index e62089601b0ffc15026c3d17facb3a8ebafbb1f2..7512f2616b4eac6c44a905d2ea9b10c3a9703071 100644 (file)
@@ -72,7 +72,7 @@ public class NetconfImplActivator implements BundleActivator {
                     new ServiceTracker<>(context, NetconfNotificationCollector.class, new ServiceTrackerCustomizer<NetconfNotificationCollector, NetconfNotificationCollector>() {
                         @Override
                         public NetconfNotificationCollector addingService(ServiceReference<NetconfNotificationCollector> reference) {
-                            Preconditions.checkState(listenerReg != null, "Notification collector service was already added");
+                            Preconditions.checkState(listenerReg == null, "Notification collector service was already added");
                             listenerReg = context.getService(reference).registerBaseNotificationPublisher();
                             monitoringService.setNotificationPublisher(listenerReg);
                             return null;
index 5d8efa4b55ebb67a05d19f5df613bd25ed090062..7bdff44d746fb5a3304cb048dba608910bf85c3b 100644 (file)
@@ -16,6 +16,8 @@ import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
 import org.openexi.proc.common.EXIOptions;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Start-exi netconf message.
@@ -30,7 +32,7 @@ public final class NetconfStartExiMessage extends NetconfMessage {
     public static final String LEXICAL_VALUES_KEY = "lexical-values";
     public static final String PIS_KEY = "pis";
     public static final String PREFIXES_KEY = "prefixes";
-
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfStartExiMessage.class);
     private NetconfStartExiMessage(final Document doc) {
         super(doc);
     }
@@ -77,16 +79,12 @@ public final class NetconfStartExiMessage extends NetconfMessage {
         final Element alignmentElement = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0,
                 ALIGNMENT_KEY);
 
-        String alignmentString = EXIParameters.EXI_PARAMETER_BIT_PACKED;
+        String alignmentString;
         switch (exiOptions.getAlignmentType()) {
         case byteAligned: {
             alignmentString = EXIParameters.EXI_PARAMETER_BYTE_ALIGNED;
             break;
         }
-        case bitPacked: {
-            alignmentString = EXIParameters.EXI_PARAMETER_BIT_PACKED;
-            break;
-        }
         case compress: {
             alignmentString = EXIParameters.EXI_PARAMETER_COMPRESSED;
             break;
@@ -95,6 +93,12 @@ public final class NetconfStartExiMessage extends NetconfMessage {
             alignmentString = EXIParameters.EXI_PARAMETER_PRE_COMPRESSION;
             break;
         }
+        default:
+            LOG.warn("Unexpected value in EXI alignment type: {} , using default value", exiOptions.getAlignmentType());
+        case bitPacked: {
+            alignmentString = EXIParameters.EXI_PARAMETER_BIT_PACKED;
+            break;
+        }
         }
 
         alignmentElement.setTextContent(alignmentString);
index b50ff024c6c970cb54237142a6ddeb1b580ac51b..d9dce4b99d95327b0ef5a4326fa7a38573d817e2 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.northbound.notification.impl;
 
 import org.opendaylight.netconf.notifications.impl.NetconfNotificationManager;
index 624c262d20640e9d0d934cc5f82ae796ca643f5d..dadf7562006e935300970cffef73e4586b93c0c8 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index f212edc2d3f3a4f44aae85d53c1fa06d993d2afa..be457f961d78f9ba07fd5023ec0aed3bc80fc9c0 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.northbound.ssh;
 
 import io.netty.channel.ChannelFuture;
index 4e107ec24d6c291c315d6adca8747101405aac4c..88ad64bcf74a10f6a6181a18f5aa2de7abb79919 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index b9156f6c82538ac0546fa123ff665439ec90a240..bb33aaa23340f4afd438f403153f402bc31284df 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.northbound.tcp;
 
 import io.netty.channel.ChannelFuture;
index 081486ecf4cafb8c7647580d0f639b4568ff1ba7..3ed70d9ce5ce86b70f929a72517761e491957934 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 61e15700c015a39dd94926087d64825bcfa8c2f4..54be237e369d9da9d51e704d2eda7f138934893d 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.clustered.netconf.topology;
 
 import org.opendaylight.netconf.topology.impl.ClusteredNetconfTopology;
index 6017de309733e24fd1a21f6b0c308554ad67daf3..0fb3a5bcc44b5aab83a68cc874d8c29572e13673 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 5ea2f50fc93ff5b5102ae194a8fc2af2522e0a1b..c4f5f98820609cb8aad41522edeee925ef1a00a2 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.netconf.topology.shared.schema.repository;
 
 import org.opendaylight.netconf.topology.SchemaRepositoryProvider;
index b3a64d496e4c62ff65bc4df6f60daf7ff5518dd8..9cf6e1cc6a02bd46ecdef6e8ec9c6d8fd63ddc24 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 /*
 * Generated file
 *
index 5ffe2033915dbead42d7a2a8460373aeb850caaf..11a3e077c44172cf080a74365d18660725b9f7b9 100644 (file)
@@ -15,11 +15,14 @@ import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Iterables;
+
 import java.io.Closeable;
 import java.io.Flushable;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
+import java.util.Objects;
+
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
@@ -62,7 +65,7 @@ public class OrderedNormalizedNodeWriter implements Closeable, Flushable{
     }
 
     public OrderedNormalizedNodeWriter write(final NormalizedNode<?, ?> node) throws IOException {
-        if (root == schemaContext) {
+        if (Objects.equals(root, schemaContext)) {
             return write(node, schemaContext.getDataChildByName(node.getNodeType()));
         }
 
index cadfc35050a765b20188d1af8e40869bd974af62..862b860eef38ab7e4e001428b220382595dc44b6 100644 (file)
@@ -185,8 +185,13 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
 
         @Override
         public void onSuccess(final DOMRpcResult result) {
-            LOG.debug("{}: Keepalive RPC successful with response: {}", id, result.getResult());
-            scheduleKeepalive();
+            if (result != null && result.getResult() != null) {
+                LOG.debug("{}: Keepalive RPC successful with response: {}", id, result.getResult());
+                scheduleKeepalive();
+            } else {
+                LOG.warn("{} Keepalive RPC returned null with response: {}. Reconnecting netconf session", id, result);
+                reconnect();
+            }
         }
 
         @Override
index b6ea4ddbe141cfd166d4371db79f9e3b4de5d6b0..5dda13a956ca5e9c4fe7a9ed02b988c3dce92e93 100644 (file)
@@ -98,10 +98,13 @@ public class KeepaliveSalFacadeTest {
         final DOMRpcResult result = new DefaultDOMRpcResult(Builders.containerBuilder().withNodeIdentifier(
                 new YangInstanceIdentifier.NodeIdentifier(NetconfMessageTransformUtil.NETCONF_RUNNING_QNAME)).build());
 
-        final DOMRpcResult resultFail = new DefaultDOMRpcResult(mock(RpcError.class));
+        RpcError error = mock(RpcError.class);
+        doReturn("Failure").when(error).toString();
+
+        final DOMRpcResult resultFailWithResultAndError = new DefaultDOMRpcResult(mock(NormalizedNode.class), error);
 
         doReturn(Futures.immediateCheckedFuture(result))
-                .doReturn(Futures.immediateCheckedFuture(resultFail))
+                .doReturn(Futures.immediateCheckedFuture(resultFailWithResultAndError))
                 .doReturn(Futures.immediateFailedCheckedFuture(new IllegalStateException("illegal-state")))
                 .when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
 
@@ -121,7 +124,7 @@ public class KeepaliveSalFacadeTest {
 
         // Reconnect with same keepalive responses
         doReturn(Futures.immediateCheckedFuture(result))
-                .doReturn(Futures.immediateCheckedFuture(resultFail))
+                .doReturn(Futures.immediateCheckedFuture(resultFailWithResultAndError))
                 .doReturn(Futures.immediateFailedCheckedFuture(new IllegalStateException("illegal-state")))
                 .when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
 
@@ -131,6 +134,16 @@ public class KeepaliveSalFacadeTest {
         verify(listener, timeout(15000).times(2)).disconnect();
         // 6 attempts now total
         verify(deviceRpc, times(3 * 2)).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
+
+        final DOMRpcResult resultFailwithError = new DefaultDOMRpcResult(error);
+
+        doReturn(Futures.immediateCheckedFuture(resultFailwithError))
+                .when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
+
+        keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
+
+        // 1 failed that results in disconnect, 3 total with previous fail
+        verify(listener, timeout(15000).times(3)).disconnect();
     }
 
     @Test
index 32bb6a36b983fdb43830c0017cbf6d4a74355d85..7985eef925204e3656fc75698cbaaf3081141dea 100644 (file)
@@ -13,6 +13,7 @@ import java.io.File;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.UnknownHostException;
+import java.util.ArrayList;
 import net.sourceforge.argparse4j.ArgumentParsers;
 import net.sourceforge.argparse4j.annotation.Arg;
 import net.sourceforge.argparse4j.inf.ArgumentParser;
@@ -49,6 +50,9 @@ public class Parameters {
     @Arg(dest = "throttle")
     public int throttle;
 
+    @Arg(dest = "auth")
+    public ArrayList<String> auth;
+
     static ArgumentParser getParser() {
         final ArgumentParser parser = ArgumentParsers.newArgumentParser("netconf stress client");
 
@@ -113,6 +117,11 @@ public class Parameters {
                         "with mutltiple threads this gets divided among all threads")
                 .dest("throttle");
 
+        parser.addArgument("--auth")
+                .nargs(2)
+                .help("Username and password for HTTP basic authentication in order username password.")
+                .dest("auth");
+
         return parser;
     }
 
@@ -123,6 +132,9 @@ public class Parameters {
         Preconditions.checkArgument(editContent.exists(), "Edit content file missing");
         Preconditions.checkArgument(editContent.isDirectory() == false, "Edit content file is a dir");
         Preconditions.checkArgument(editContent.canRead(), "Edit content file is unreadable");
+
+        Preconditions.checkArgument(destination.startsWith("/"), "Destination should start with a '/'");
+
         // TODO validate
     }
 
index e073fbcb2624d9e1cf9edbb413afd8fd319874c8..fed504abb0d212c0cce3cb911518270e0f503d6a 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.netconf.test.tool.client.http.perf;
 
 import com.ning.http.client.AsyncHttpClient;
 import com.ning.http.client.AsyncHttpClientConfig;
+import com.ning.http.client.Realm;
 import com.ning.http.client.Request;
 import java.util.ArrayList;
 import java.util.concurrent.Callable;
@@ -36,12 +37,22 @@ public class PerfClientCallable implements Callable<Void>{
                 .build());
         this.payloads = new ArrayList<>();
         for (DestToPayload payload : payloads) {
-            this.payloads.add(asyncHttpClient.preparePost(payload.getDestination())
+            AsyncHttpClient.BoundRequestBuilder requestBuilder = asyncHttpClient.preparePost(payload.getDestination())
                     .addHeader("content-type", "application/json")
                     .addHeader("Accept", "application/xml")
                     .setBody(payload.getPayload())
-                    .setRequestTimeout(Integer.MAX_VALUE)
-                    .build());
+                    .setRequestTimeout(Integer.MAX_VALUE);
+
+            if(params.auth != null) {
+                requestBuilder.setRealm(new Realm.RealmBuilder()
+                        .setScheme(Realm.AuthScheme.BASIC)
+                        .setPrincipal(params.auth.get(0))
+                        .setPassword(params.auth.get(1))
+                        .setUsePreemptiveAuth(true)
+                        .build());
+            }
+
+            this.payloads.add(requestBuilder.build());
         }
         executionStrategy = getExecutionStrategy();
     }
index 41d746284b07d603298980dd2df67396c6368341..d826a2573570fc594235c9e10d190057f8cf15c4 100644 (file)
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-remote</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>yang-data-api</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>yang-data-impl</artifactId>
       <artifactId>logback-classic</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-server</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.findbugs</groupId>
+      <artifactId>jsr305</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>javax.annotation-api</artifactId>
+      <version>1.2</version>
+    </dependency>
 
     <!-- Testing Dependencies -->
     <dependency>
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <classpathDependencyExcludes>
+            <!-- Removes com.sun.jersey from testing classpath so there is no conflict with org.glassfish.jersey -->
+            <classpathDependencyExclude>com.sun.jersey</classpathDependencyExclude>
+          </classpathDependencyExcludes>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
               org.opendaylight.netconf.sal.restconf.impl,
               org.opendaylight.netconf.md.sal.rest.common.*,
               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.rest.connector.rev140724.*,
+              javax.annotation
             </Private-Package>
             <Import-Package>
-              com.sun.jersey.spi.container.servlet, org.eclipse.jetty.servlets,
-              <!-- Set the javax packages version to 0. Relying on "*" includes versions from jsr305 dependency whic are
-              incompatible with karaf provided packages -->
-              javax.*;version="0.0",
               *,
+              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>
             <Embed-Dependency>stax-utils</Embed-Dependency>
             <Web-ContextPath>/restconf</Web-ContextPath>
index a7d6c8816b8cd46a0721c5eca9ce3c067a46079f..6b2aedcce459f7796831b175e06675eb46bb8157 100644 (file)
@@ -1,3 +1,11 @@
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.md.sal.rest.connector;
 
 import org.opendaylight.netconf.sal.restconf.impl.RestconfProviderImpl;
index 1964a174729f2133159f0cacb5fdbb90fd7fc387..fb664628903d017b149831949ba804b555e2c6f1 100644 (file)
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 /*
 * Generated file
 *
index 8da5dcb6cbb4ce54dae9713f2f4d335fc1e95444..5aa0e8ebd52ea175f5171f0c1f96b58c5721612f 100644 (file)
@@ -1,3 +1,11 @@
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.config.yang.sal.restconf.service;
 
 import org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl;
index d822afd76e689b4173e11167e14a800b2cd77d43..68e3856529091c100f81427f15fd92cb56e3d6f6 100644 (file)
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 /*
 * Generated file
 *
index 22dabf42efbd20ebd8d2fba6ee5cc0d65a12b9ef..6cdb33bf8cfc7a4edfb36c1aef39dabbf08b12dc 100644 (file)
@@ -37,7 +37,6 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
@@ -46,6 +45,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
 import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.stream.ForwardingNormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter;
 import org.opendaylight.yangtools.yang.data.codec.gson.JSONCodecFactory;
@@ -239,7 +239,12 @@ public class RestconfDocumentedExceptionMapper implements ExceptionMapper<Restco
         // stream writer validates the node type against the schema and thus will expect a LeafSchemaNode but
         // the schema has a ContainerSchemaNode so, to avoid an error, we override the leafNode behavior
         // for error-info.
-        final NormalizedNodeStreamWriter streamWriter = new DelegatingNormalizedNodeStreamWriter(jsonStreamWriter) {
+        final NormalizedNodeStreamWriter streamWriter = new ForwardingNormalizedNodeStreamWriter() {
+            @Override
+            protected NormalizedNodeStreamWriter delegate() {
+                return jsonStreamWriter;
+            }
+
             @Override
             public void leafNode(final NodeIdentifier name, final Object value) throws IOException {
                 if(name.getNodeType().equals(Draft02.RestConfModule.ERROR_INFO_QNAME)) {
@@ -301,7 +306,12 @@ public class RestconfDocumentedExceptionMapper implements ExceptionMapper<Restco
         // stream writer validates the node type against the schema and thus will expect a LeafSchemaNode but
         // the schema has a ContainerSchemaNode so, to avoid an error, we override the leafNode behavior
         // for error-info.
-        final NormalizedNodeStreamWriter streamWriter = new DelegatingNormalizedNodeStreamWriter(xmlStreamWriter) {
+        final NormalizedNodeStreamWriter streamWriter = new ForwardingNormalizedNodeStreamWriter() {
+            @Override
+            protected NormalizedNodeStreamWriter delegate() {
+                return xmlStreamWriter;
+            }
+
             @Override
             public void leafNode(final NodeIdentifier name, final Object value) throws IOException {
                 if(name.getNodeType().equals(Draft02.RestConfModule.ERROR_INFO_QNAME)) {
@@ -365,99 +375,4 @@ public class RestconfDocumentedExceptionMapper implements ExceptionMapper<Restco
             nnWriter.flush();
         }
     }
-
-    private static class DelegatingNormalizedNodeStreamWriter implements NormalizedNodeStreamWriter {
-        private final NormalizedNodeStreamWriter delegate;
-
-        DelegatingNormalizedNodeStreamWriter(NormalizedNodeStreamWriter delegate) {
-            this.delegate = delegate;
-        }
-
-        @Override
-        public void leafNode(NodeIdentifier name, Object value) throws IOException, IllegalArgumentException {
-            delegate.leafNode(name, value);
-        }
-
-        @Override
-        public void startLeafSet(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
-            delegate.startLeafSet(name, childSizeHint);
-        }
-
-        @Override
-        public void leafSetEntryNode(Object value) throws IOException, IllegalArgumentException {
-            delegate.leafSetEntryNode(value);
-        }
-
-        @Override
-        public void startContainerNode(NodeIdentifier name, int childSizeHint) throws IOException,
-                IllegalArgumentException {
-            delegate.startContainerNode(name, childSizeHint);
-        }
-
-        @Override
-        public void startUnkeyedList(NodeIdentifier name, int childSizeHint) throws IOException,
-                IllegalArgumentException {
-            delegate.startUnkeyedList(name, childSizeHint);
-        }
-
-        @Override
-        public void startUnkeyedListItem(NodeIdentifier name, int childSizeHint) throws IOException,
-                IllegalStateException {
-            delegate.startUnkeyedListItem(name, childSizeHint);
-        }
-
-        @Override
-        public void startMapNode(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
-            delegate.startMapNode(name, childSizeHint);
-        }
-
-        @Override
-        public void startMapEntryNode(NodeIdentifierWithPredicates identifier, int childSizeHint) throws IOException,
-                IllegalArgumentException {
-            delegate.startMapEntryNode(identifier, childSizeHint);
-        }
-
-        @Override
-        public void startOrderedMapNode(NodeIdentifier name, int childSizeHint) throws IOException,
-                IllegalArgumentException {
-            delegate.startOrderedMapNode(name, childSizeHint);
-        }
-
-        @Override
-        public void startChoiceNode(NodeIdentifier name, int childSizeHint) throws IOException,
-                IllegalArgumentException {
-            delegate.startChoiceNode(name, childSizeHint);
-        }
-
-        @Override
-        public void startAugmentationNode(AugmentationIdentifier identifier) throws IOException,
-                IllegalArgumentException {
-            delegate.startAugmentationNode(identifier);
-        }
-
-        @Override
-        public void anyxmlNode(NodeIdentifier name, Object value) throws IOException, IllegalArgumentException {
-            delegate.anyxmlNode(name, value);
-        }
-
-        @Override
-        public void startYangModeledAnyXmlNode(NodeIdentifier name, int childSizeHint) throws IOException {
-            delegate.startYangModeledAnyXmlNode(name, childSizeHint);
-        }
-
-        @Override
-        public void endNode() throws IOException, IllegalStateException {
-            delegate.endNode();
-        }
-
-        @Override
-        public void close() throws IOException {
-            delegate.close();
-        }
-
-        @Override
-        public void flush() throws IOException {
-            delegate.flush();
-        }
-    }
 }
index 66cadd0cbce4ea9db0f9f83c67b52280c515b4bf..493572952598594c7cb32d0e80b3cab03c8ad461 100644 (file)
             <param-name>javax.ws.rs.Application</param-name>
             <param-value>org.opendaylight.netconf.sal.rest.impl.RestconfApplication</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>JAXRSRestconf</servlet-name>
         <url-pattern>/*</url-pattern>