Merge changes I22b99bc2,I3f296862
authorJakub Morvay <jakub.morvay@gmail.com>
Wed, 23 Jan 2019 08:50:04 +0000 (08:50 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 23 Jan 2019 08:50:04 +0000 (08:50 +0000)
* changes:
  Remove netconf-ssh from netconf-artifacts
  Remove netconf-notification

27 files changed:
features/netconf/odl-netconf-notifications-impl/pom.xml
netconf/mdsal-netconf-notification/pom.xml
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/CapabilityChangeNotificationProducer.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/CapabilityChangeNotificationProducer.java with 98% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManager.java [moved from netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/NetconfNotificationManager.java with 98% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationOperationService.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/NetconfNotificationOperationService.java with 92% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationOperationServiceFactory.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/NetconfNotificationOperationServiceFactory.java with 97% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NotificationToMdsalWriter.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/NotificationToMdsalWriter.java with 98% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/OperationalDatastoreListener.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/OperationalDatastoreListener.java with 96% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/SessionNotificationProducer.java [moved from netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/SessionNotificationProducer.java with 98% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/ops/CreateSubscription.java [moved from netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/ops/CreateSubscription.java with 97% similarity]
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/ops/NotificationsTransformUtil.java [moved from netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/ops/NotificationsTransformUtil.java with 98% similarity]
netconf/mdsal-netconf-notification/src/main/resources/org/opendaylight/blueprint/mdsal-netconf-notification.xml
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/CapabilityChangeNotificationProducerTest.java [moved from netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/CapabilityChangeNotificationProducerTest.java with 99% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManagerTest.java [moved from netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/NetconfNotificationManagerTest.java with 99% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NotificationToMdsalWriterTest.java [moved from netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/NotificationToMdsalWriterTest.java with 98% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/OperationalDatastoreListenerTest.java [moved from netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/OperationalDatastoreListenerTest.java with 96% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/SessionNotificationProducerTest.java [moved from netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/controller/config/yang/netconf/mdsal/notification/SessionNotificationProducerTest.java with 98% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/ops/CreateSubscriptionTest.java [moved from netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/ops/CreateSubscriptionTest.java with 97% similarity]
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/ops/NotificationsTransformUtilTest.java [moved from netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/ops/NotificationsTransformUtilTest.java with 98% similarity]
netconf/netconf-artifacts/pom.xml
netconf/netconf-impl/pom.xml
netconf/netconf-notifications-impl/pom.xml [deleted file]
netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/ops/Get.java [deleted file]
netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java [deleted file]
netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/ops/GetTest.java [deleted file]
netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/osgi/ActivatorTest.java [deleted file]
netconf/pom.xml

index 790e48f4798fdb5f9e83f6524cc98c990ffa9d34..b9002ab020233d16fc3f0ba0566e4410a8e0d0b8 100644 (file)
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-notifications-impl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
     </dependencies>
 </project>
index 4e58605b530554f87ef1fe295bcdde0a6d2e4d25..d06c953f09a9bc96f26daa3bb7be4c6d00778b23 100644 (file)
         <relativePath>../netconf-parent</relativePath>
     </parent>
 
-    <groupId>org.opendaylight.netconf</groupId>
     <artifactId>mdsal-netconf-notification</artifactId>
     <version>1.6.0-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
     <dependencies>
-        <!-- compile dependencies -->
         <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-mapping-api</artifactId>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-notifications-impl</artifactId>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-common-util</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-notifications-api</artifactId>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-binding-generator-impl</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>mdsal-binding-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-util</artifactId>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-binding-dom-codec</artifactId>
         </dependency>
-
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ietf-netconf-notifications</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>netconf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>netconf-notifications-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>netconf-mapping-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>netconf-util</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>mockito-configuration</artifactId>
+            <groupId>org.xmlunit</groupId>
+            <artifactId>xmlunit-legacy</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Embed-Dependency>netconf-notifications-impl</Embed-Dependency>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -5,7 +5,7 @@
  * 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.netconf.notifications.impl;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.HashMultimap;
@@ -19,6 +19,7 @@ import java.util.Map;
 import java.util.Set;
 import javax.annotation.concurrent.GuardedBy;
 import javax.annotation.concurrent.ThreadSafe;
+import org.opendaylight.netconf.mdsal.notification.impl.ops.NotificationsTransformUtil;
 import org.opendaylight.netconf.notifications.BaseNotificationPublisherRegistration;
 import org.opendaylight.netconf.notifications.NetconfNotification;
 import org.opendaylight.netconf.notifications.NetconfNotificationCollector;
@@ -27,7 +28,6 @@ import org.opendaylight.netconf.notifications.NetconfNotificationRegistry;
 import org.opendaylight.netconf.notifications.NotificationListenerRegistration;
 import org.opendaylight.netconf.notifications.NotificationPublisherRegistration;
 import org.opendaylight.netconf.notifications.NotificationRegistration;
-import org.opendaylight.netconf.notifications.impl.ops.NotificationsTransformUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.Streams;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.StreamsBuilder;
@@ -6,14 +6,14 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.netconf.mdsal.notification;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import java.util.Collections;
 import java.util.Set;
 import org.opendaylight.netconf.mapping.api.NetconfOperation;
 import org.opendaylight.netconf.mapping.api.NetconfOperationService;
+import org.opendaylight.netconf.mdsal.notification.impl.ops.CreateSubscription;
 import org.opendaylight.netconf.notifications.NetconfNotificationRegistry;
-import org.opendaylight.netconf.notifications.impl.ops.CreateSubscription;
 
 public class NetconfNotificationOperationService implements NetconfOperationService {
     private final Set<NetconfOperation> netconfOperations;
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import com.google.common.base.Preconditions;
 import java.util.Collection;
@@ -5,7 +5,7 @@
  * 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.netconf.notifications.impl.ops;
+package org.opendaylight.netconf.mdsal.notification.impl.ops;
 
 import com.google.common.base.Preconditions;
 import java.util.ArrayList;
@@ -17,11 +17,11 @@ import org.opendaylight.netconf.api.NetconfSession;
 import org.opendaylight.netconf.api.xml.XmlElement;
 import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.netconf.mapping.api.SessionAwareNetconfOperation;
+import org.opendaylight.netconf.mdsal.notification.impl.NetconfNotificationManager;
 import org.opendaylight.netconf.notifications.NetconfNotification;
 import org.opendaylight.netconf.notifications.NetconfNotificationListener;
 import org.opendaylight.netconf.notifications.NetconfNotificationRegistry;
 import org.opendaylight.netconf.notifications.NotificationListenerRegistration;
-import org.opendaylight.netconf.notifications.impl.NetconfNotificationManager;
 import org.opendaylight.netconf.util.mapping.AbstractSingletonNetconfOperation;
 import org.opendaylight.netconf.util.messages.SubtreeFilter;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionInput;
@@ -5,7 +5,7 @@
  * 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.netconf.notifications.impl.ops;
+package org.opendaylight.netconf.mdsal.notification.impl.ops;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Collections2;
index 05ae2fb635ff56caefdc75de65cd02c628046cb1..2effa174197e95978804cffaf0f6bafa7864e8dd 100755 (executable)
@@ -20,7 +20,7 @@
     <!--This is the MD-SAL netconf server notification blueprint xml file-->
 
     <bean id="netconfNotificationManager"
-          class="org.opendaylight.netconf.notifications.impl.NetconfNotificationManager"
+          class="org.opendaylight.netconf.mdsal.notification.impl.NetconfNotificationManager"
           destroy-method="close">
     </bean>
     <service ref="netconfNotificationManager"
@@ -33,7 +33,7 @@
     </service>
 
     <bean id="notificationToMdsalWriter"
-          class="org.opendaylight.controller.config.yang.netconf.mdsal.notification.NotificationToMdsalWriter"
+          class="org.opendaylight.netconf.mdsal.notification.impl.NotificationToMdsalWriter"
           init-method="start"
           destroy-method="close">
         <argument ref="netconfNotificationManager"/>
     </bean>
 
     <bean id="capabilityChangeNotificationProducer"
-          class="org.opendaylight.controller.config.yang.netconf.mdsal.notification.CapabilityChangeNotificationProducer"
+          class="org.opendaylight.netconf.mdsal.notification.impl.CapabilityChangeNotificationProducer"
           destroy-method="close">
         <argument ref="netconfNotificationManager"/>
         <argument ref="dataBroker"/>
     </bean>
 
     <bean id="sessionNotificationProducer"
-          class="org.opendaylight.controller.config.yang.netconf.mdsal.notification.SessionNotificationProducer"
+          class="org.opendaylight.netconf.mdsal.notification.impl.SessionNotificationProducer"
           destroy-method="close">
         <argument ref="netconfNotificationManager"/>
         <argument ref="dataBroker"/>
     </bean>
 
     <bean id="netconfNotificationOperationServiceFactory"
-          class="org.opendaylight.netconf.mdsal.notification.NetconfNotificationOperationServiceFactory"
+          class="org.opendaylight.netconf.mdsal.notification.impl.NetconfNotificationOperationServiceFactory"
           destroy-method="close">
         <argument ref="netconfNotificationManager"/>
         <argument ref="netconfOperationServiceFactoryListener"/>
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doNothing;
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -5,7 +5,7 @@
  * 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;
+package org.opendaylight.netconf.mdsal.notification.impl;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doNothing;
index deb8dd1ca7bf8702ff8776d5025264306a491eb7..d96050657d6225f7cee29785908c40353919ca50 100644 (file)
                 <artifactId>netconf-netty-util</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>netconf-ssh</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>netconf-testtool</artifactId>
                 <artifactId>netconf-notifications-api</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>netconf-notifications-impl</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>mdsal-netconf-notification</artifactId>
index 2ebd6713b8d8264e3229dcd35045a42e0236bdc0..03414044019e600e793e1066377d927fc2539442 100644 (file)
       <groupId>${project.groupId}</groupId>
       <artifactId>netconf-notifications-api</artifactId>
     </dependency>
-    <dependency>
-       <groupId>${project.groupId}</groupId>
-       <artifactId>netconf-notifications-impl</artifactId>
-    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>netconf-netty-util</artifactId>
diff --git a/netconf/netconf-notifications-impl/pom.xml b/netconf/netconf-notifications-impl/pom.xml
deleted file mode 100644 (file)
index f2c2eeb..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.opendaylight.netconf</groupId>
-        <artifactId>netconf-parent</artifactId>
-        <version>1.6.0-SNAPSHOT</version>
-        <relativePath>../netconf-parent</relativePath>
-    </parent>
-
-    <groupId>org.opendaylight.netconf</groupId>
-    <artifactId>netconf-notifications-impl</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-notifications-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.mdsal</groupId>
-            <artifactId>mdsal-binding-generator-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>netconf-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.mdsal</groupId>
-            <artifactId>mdsal-binding-dom-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>ietf-netconf-notifications</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.xmlunit</groupId>
-            <artifactId>xmlunit-legacy</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>mockito-configuration</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Activator>org.opendaylight.netconf.notifications.impl.osgi.Activator</Bundle-Activator>
-                        <Export-Package>org.opendaylight.netconf.notifications.impl.*</Export-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/ops/Get.java b/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/ops/Get.java
deleted file mode 100644 (file)
index e55f852..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.netconf.notifications.impl.ops;
-
-import com.google.common.base.Preconditions;
-import java.io.IOException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.dom.DOMResult;
-import org.opendaylight.netconf.api.DocumentedException;
-import org.opendaylight.netconf.api.xml.XmlElement;
-import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
-import org.opendaylight.netconf.mapping.api.HandlingPriority;
-import org.opendaylight.netconf.mapping.api.NetconfOperationChainedExecution;
-import org.opendaylight.netconf.notifications.NetconfNotificationRegistry;
-import org.opendaylight.netconf.util.NetconfUtil;
-import org.opendaylight.netconf.util.mapping.AbstractNetconfOperation;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.Netconf;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.NetconfBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.Streams;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Serialize the subtree for netconf notifications into the response of get rpc.
- * This operation just adds its subtree into the common response of get rpc.
- */
-public class Get extends AbstractNetconfOperation implements AutoCloseable {
-
-    private static final String GET = "get";
-    private static final InstanceIdentifier<Netconf> NETCONF_SUBTREE_INSTANCE_IDENTIFIER =
-            InstanceIdentifier.builder(Netconf.class).build();
-
-    private final NetconfNotificationRegistry notificationRegistry;
-
-    public Get(final String netconfSessionIdForReporting, final NetconfNotificationRegistry notificationRegistry) {
-        super(netconfSessionIdForReporting);
-        Preconditions.checkNotNull(notificationRegistry);
-        this.notificationRegistry = notificationRegistry;
-    }
-
-    @Override
-    protected String getOperationName() {
-        return GET;
-    }
-
-    @Override
-    protected Element handle(final Document document, final XmlElement message,
-                             final NetconfOperationChainedExecution subsequentOperation) {
-        throw new UnsupportedOperationException("Never gets called");
-    }
-
-    @Override
-    public Document handle(final Document requestMessage, final NetconfOperationChainedExecution subsequentOperation)
-            throws DocumentedException {
-        final Document partialResponse = subsequentOperation.execute(requestMessage);
-        final Streams availableStreams = notificationRegistry.getNotificationPublishers();
-        if (!availableStreams.getStream().isEmpty()) {
-            serializeStreamsSubtree(partialResponse, availableStreams);
-        }
-        return partialResponse;
-    }
-
-    static void serializeStreamsSubtree(final Document partialResponse, final Streams availableStreams)
-            throws DocumentedException {
-        final Netconf netconfSubtree = new NetconfBuilder().setStreams(availableStreams).build();
-        final NormalizedNode<?, ?> normalized = toNormalized(netconfSubtree);
-
-        final DOMResult result = new DOMResult(getPlaceholder(partialResponse));
-
-        try {
-            NetconfUtil.writeNormalizedNode(normalized, result, SchemaPath.ROOT,
-                    NotificationsTransformUtil.NOTIFICATIONS_SCHEMA_CTX);
-        } catch (final XMLStreamException | IOException e) {
-            throw new IllegalStateException("Unable to serialize " + netconfSubtree, e);
-        }
-    }
-
-    private static Element getPlaceholder(final Document innerResult)
-            throws DocumentedException {
-        final XmlElement rootElement = XmlElement.fromDomElementWithExpected(innerResult.getDocumentElement(),
-                XmlNetconfConstants.RPC_REPLY_KEY, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
-        return rootElement.getOnlyChildElement(XmlNetconfConstants.DATA_KEY).getDomElement();
-    }
-
-    private static NormalizedNode<?, ?> toNormalized(final Netconf netconfSubtree) {
-        return NotificationsTransformUtil.CODEC_REGISTRY
-                .toNormalizedNode(NETCONF_SUBTREE_INSTANCE_IDENTIFIER, netconfSubtree).getValue();
-    }
-
-    @Override
-    protected HandlingPriority getHandlingPriority() {
-        return HandlingPriority.HANDLE_WITH_DEFAULT_PRIORITY.increasePriority(2);
-    }
-
-    @Override
-    public void close() {
-
-    }
-}
diff --git a/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java b/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java
deleted file mode 100644 (file)
index 967bd08..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.netconf.notifications.impl.osgi;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.collect.Sets;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Set;
-import org.opendaylight.netconf.api.capability.BasicCapability;
-import org.opendaylight.netconf.api.capability.Capability;
-import org.opendaylight.netconf.api.monitoring.CapabilityListener;
-import org.opendaylight.netconf.api.util.NetconfConstants;
-import org.opendaylight.netconf.mapping.api.NetconfOperation;
-import org.opendaylight.netconf.mapping.api.NetconfOperationService;
-import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory;
-import org.opendaylight.netconf.notifications.NetconfNotification;
-import org.opendaylight.netconf.notifications.NetconfNotificationCollector;
-import org.opendaylight.netconf.notifications.impl.NetconfNotificationManager;
-import org.opendaylight.netconf.notifications.impl.ops.CreateSubscription;
-import org.opendaylight.netconf.notifications.impl.ops.Get;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Activator implements BundleActivator {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
-
-    private ServiceRegistration<NetconfNotificationCollector> netconfNotificationCollectorServiceRegistration;
-    private ServiceRegistration<NetconfOperationServiceFactory> operationaServiceRegistration;
-    private NetconfNotificationManager netconfNotificationManager;
-
-    @Override
-    public void start(final BundleContext context) {
-        netconfNotificationManager = new NetconfNotificationManager();
-        // Add properties to autowire with netconf-impl instance for cfg subsystem
-        final Dictionary<String, String> props = new Hashtable<>();
-        props.put(NetconfConstants.SERVICE_NAME, NetconfConstants.NETCONF_NOTIFICATION);
-        netconfNotificationCollectorServiceRegistration = context.registerService(NetconfNotificationCollector.class,
-                netconfNotificationManager, new Hashtable<>());
-
-        final NetconfOperationServiceFactory netconfOperationServiceFactory = new NetconfOperationServiceFactory() {
-
-            private final Set<Capability> capabilities =
-                    Collections.singleton(new BasicCapability(NetconfNotification.NOTIFICATION_NAMESPACE));
-
-            @Override
-            public Set<Capability> getCapabilities() {
-                return capabilities;
-            }
-
-            @Override
-            public AutoCloseable registerCapabilityListener(final CapabilityListener listener) {
-                listener.onCapabilitiesChanged(capabilities, Collections.emptySet());
-                return () -> listener.onCapabilitiesChanged(Collections.emptySet(), capabilities);
-            }
-
-            @Override
-            public NetconfOperationService createService(final String netconfSessionIdForReporting) {
-                return new NetconfOperationService() {
-
-                    private final CreateSubscription createSubscription =
-                            new CreateSubscription(netconfSessionIdForReporting, netconfNotificationManager);
-
-                    @Override
-                    public Set<NetconfOperation> getNetconfOperations() {
-                        return Sets.newHashSet(
-                                new Get(netconfSessionIdForReporting, netconfNotificationManager),
-                                createSubscription);
-                    }
-
-                    @Override
-                    public void close() {
-                        createSubscription.close();
-                    }
-                };
-            }
-        };
-
-        final Dictionary<String, String> properties = new Hashtable<>();
-        properties.put(NetconfConstants.SERVICE_NAME, NetconfConstants.NETCONF_MONITORING);
-        operationaServiceRegistration = context.registerService(NetconfOperationServiceFactory.class,
-                netconfOperationServiceFactory, properties);
-    }
-
-    @Override
-    public void stop(final BundleContext context) {
-        if (netconfNotificationCollectorServiceRegistration != null) {
-            netconfNotificationCollectorServiceRegistration.unregister();
-            netconfNotificationCollectorServiceRegistration = null;
-        }
-        if (netconfNotificationManager != null) {
-            netconfNotificationManager.close();
-        }
-        if (operationaServiceRegistration != null) {
-            operationaServiceRegistration.unregister();
-            operationaServiceRegistration = null;
-        }
-    }
-
-    @VisibleForTesting
-    NetconfNotificationManager getNetconfNotificationManager() {
-        return netconfNotificationManager;
-    }
-}
diff --git a/netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/ops/GetTest.java b/netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/ops/GetTest.java
deleted file mode 100644 (file)
index 0a7aa6d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.netconf.notifications.impl.ops;
-
-import com.google.common.collect.Lists;
-import java.io.IOException;
-import org.junit.Test;
-import org.opendaylight.netconf.api.xml.XmlUtil;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.Streams;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.StreamsBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamKey;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-public class GetTest {
-
-    @Test
-    public void testSerializeStreamsSubtree() throws Exception {
-        final StreamsBuilder streamsBuilder = new StreamsBuilder();
-        final StreamBuilder streamBuilder = new StreamBuilder();
-        final StreamNameType base = new StreamNameType("base");
-        streamBuilder.setName(base);
-        streamBuilder.withKey(new StreamKey(base));
-        streamBuilder.setDescription("description");
-        streamBuilder.setReplaySupport(false);
-        streamsBuilder.setStream(Lists.newArrayList(streamBuilder.build()));
-        final Streams streams = streamsBuilder.build();
-
-        final Document response = getBlankResponse();
-        Get.serializeStreamsSubtree(response, streams);
-        NotificationsTransformUtilTest.compareXml(XmlUtil.toString(response),
-                "<rpc-reply message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n"
-                        + "<data>\n"
-                        + "<netconf xmlns=\"urn:ietf:params:xml:ns:netmod:notification\">\n"
-                        + "<streams>\n"
-                        + "<stream>\n"
-                        + "<name>base</name>\n"
-                        + "<description>description</description>\n"
-                        + "<replaySupport>false</replaySupport>\n"
-                        + "</stream>\n"
-                        + "</streams>\n"
-                        + "</netconf>\n"
-                        + "</data>\n"
-                        + "</rpc-reply>\n");
-    }
-
-    private static Document getBlankResponse() throws IOException, SAXException {
-
-        return XmlUtil.readXmlToDocument("<rpc-reply message-id=\"101\"\n"
-                + "xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n"
-                + "<data>\n"
-                + "</data>\n"
-                + "</rpc-reply>");
-    }
-}
diff --git a/netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/osgi/ActivatorTest.java b/netconf/netconf-notifications-impl/src/test/java/org/opendaylight/netconf/notifications/impl/osgi/ActivatorTest.java
deleted file mode 100644 (file)
index ddacdd9..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2016 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.netconf.notifications.impl.osgi;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Set;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.opendaylight.netconf.api.capability.BasicCapability;
-import org.opendaylight.netconf.api.capability.Capability;
-import org.opendaylight.netconf.api.monitoring.CapabilityListener;
-import org.opendaylight.netconf.api.util.NetconfConstants;
-import org.opendaylight.netconf.mapping.api.NetconfOperation;
-import org.opendaylight.netconf.mapping.api.NetconfOperationService;
-import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory;
-import org.opendaylight.netconf.notifications.NetconfNotification;
-import org.opendaylight.netconf.notifications.NetconfNotificationCollector;
-import org.opendaylight.netconf.notifications.impl.NetconfNotificationManager;
-import org.opendaylight.netconf.notifications.impl.ops.CreateSubscription;
-import org.opendaylight.netconf.notifications.impl.ops.Get;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class ActivatorTest {
-
-    @Test
-    public void testActivator() throws Exception {
-        final Activator activator = new Activator();
-        final BundleContext context = mock(BundleContext.class);
-
-
-        final ServiceRegistration netconfNotificationCollectorServiceRegistration  = mock(ServiceRegistration.class);
-        final ServiceRegistration operationaServiceRegistration = mock(ServiceRegistration.class);
-
-        // test registering services
-        doReturn(netconfNotificationCollectorServiceRegistration).when(context)
-                .registerService(eq(NetconfNotificationCollector.class), any(NetconfNotificationManager.class), any());
-        doReturn(operationaServiceRegistration).when(context).registerService(eq(NetconfOperationServiceFactory.class),
-                any(NetconfOperationServiceFactory.class), any());
-
-        activator.start(context);
-
-        verify(context, times(1)).registerService(eq(NetconfNotificationCollector.class),
-                any(NetconfNotificationManager.class), eq(new Hashtable<>()));
-
-        final ArgumentCaptor<NetconfOperationServiceFactory> serviceFactoryArgumentCaptor =
-                ArgumentCaptor.forClass(NetconfOperationServiceFactory.class);
-
-        final Dictionary<String, String> properties = new Hashtable<>();
-        properties.put(NetconfConstants.SERVICE_NAME, NetconfConstants.NETCONF_MONITORING);
-
-        verify(context, times(1)).registerService(eq(NetconfOperationServiceFactory.class),
-                serviceFactoryArgumentCaptor.capture(), eq(properties));
-
-        // test service factory argument requisites
-        final NetconfOperationServiceFactory serviceFactory = serviceFactoryArgumentCaptor.getValue();
-
-        final Set<Capability> capabilities =
-                Collections.singleton(new BasicCapability(NetconfNotification.NOTIFICATION_NAMESPACE));
-
-        assertEquals(capabilities.iterator().next()
-                .getCapabilityUri(), serviceFactory.getCapabilities().iterator().next().getCapabilityUri());
-        assertEquals(capabilities.iterator().next()
-                .getCapabilitySchema(), serviceFactory.getCapabilities().iterator().next().getCapabilitySchema());
-        assertEquals(capabilities.iterator().next()
-                .getModuleNamespace(), serviceFactory.getCapabilities().iterator().next().getModuleNamespace());
-        assertEquals(capabilities.iterator().next()
-                .getModuleName(), serviceFactory.getCapabilities().iterator().next().getModuleName());
-
-        final CapabilityListener listener = mock(CapabilityListener.class);
-
-        doNothing().when(listener).onCapabilitiesChanged(any(), any());
-
-        serviceFactory.registerCapabilityListener(listener);
-
-        verify(listener).onCapabilitiesChanged(serviceFactory.getCapabilities(), Collections.emptySet());
-
-        final NetconfOperationService netconfOperationService = serviceFactory.createService("id");
-        final Set<NetconfOperation> netconfOperations = netconfOperationService.getNetconfOperations();
-
-        final CreateSubscription createSubscription =
-                new CreateSubscription("id", activator.getNetconfNotificationManager());
-
-        netconfOperations.forEach(
-            operation -> {
-                if (operation instanceof CreateSubscription) {
-                    assertEquals(createSubscription.toString(), operation.toString());
-                }
-                if (operation instanceof Get) {
-                    assertEquals("id", ((Get) operation).getNetconfSessionIdForReporting());
-                }
-            }
-        );
-
-        // test unregister after stop
-        doNothing().when(netconfNotificationCollectorServiceRegistration).unregister();
-        doNothing().when(operationaServiceRegistration).unregister();
-
-        activator.stop(context);
-
-        verify(netconfNotificationCollectorServiceRegistration, times(1)).unregister();
-        verify(operationaServiceRegistration, times(1)).unregister();
-
-    }
-
-
-}
index c534a49b8d965ae23e13013ae5c037b45907daf2..d4e70a743e63ada7162316852e3bbaf426ea6bd2 100644 (file)
@@ -46,7 +46,6 @@
     <module>netconf-client</module>
     <module>netconf-auth</module>
     <module>aaa-authn-odl-plugin</module>
-    <module>netconf-notifications-impl</module>
     <module>netconf-notifications-api</module>
     <module>netconf-topology</module>
     <module>netconf-topology-singleton</module>