Include secure communication to DMaaP 81/107881/1
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Tue, 19 May 2020 14:37:06 +0000 (16:37 +0200)
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Tue, 19 May 2020 14:39:17 +0000 (16:39 +0200)
Include secure communication from mountpoint-registrar to DMaaP for PNF Registration and fault VES messages consumption

Issue-ID: SDNC-1190
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I4f8c74f5179b55d6f3bcedcb02727239e56a7f42

25 files changed:
sdnr/wt/mountpoint-registrar/feature/pom.xml
sdnr/wt/mountpoint-registrar/installer/pom.xml
sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang
sdnr/wt/mountpoint-registrar/provider/pom.xml
sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java
sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java
sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java
sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java
sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerMountpointMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerNetconfMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointServiceMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/NotificationPublishServiceMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcConsumerRegistryMock.java [deleted file]
sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcProviderRegistryMock.java [deleted file]

index 0dc1849..3e3db83 100644 (file)
 
     <name>ccsdk-features :: ${project.artifactId}</name>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.opendaylight.controller</groupId>
-                <artifactId>mdsal-artifacts</artifactId>
-                <version>${odl.controller.mdsal.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 78289b7..63b3443 100755 (executable)
         <include.transitive.dependencies>false</include.transitive.dependencies>
     </properties>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.opendaylight.controller</groupId>
-                <artifactId>mdsal-artifacts</artifactId>
-                <version>${odl.controller.mdsal.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
     <dependencies>
         <dependency>
             <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
index f3f97aa..bab6da7 100644 (file)
@@ -1,41 +1,64 @@
 module mountpoint-registrar {
 
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:mountpoint-registrar";
-    prefix "mountpoint-registrar";
+  yang-version 1;
+  namespace "urn:opendaylight:params:xml:ns:yang:mountpoint-registrar";
+  prefix mountpoint-registrar;
 
+  organization
+    "highstreet technologies GmbH";
+  contact
+    "Web:   <https://highstreet-technologies.com>
+     ONAP:  <https://wiki.onap.org/display/DW/Mountpoint+services<";
+
+  description
+    "mountpoint-registrar Api Module
+
+     Copyright 2019 highstreet technologies GmbH Intellectual Property.
+     All rights reserved.
+
+     Licensed under the Apache License, Version 2.0 (the 'License');
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an 'AS IS' BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.";
+
+  revision 2019-09-21 {
     description
-        "mountpoint-registrar Api Module";
+      "Initial revision";
+    reference
+      "https://jira.onap.org/browse/SDNC-1009";
+  }
 
-    revision "2019-09-21" {
+  rpc test {
+    description
+      "Test RPC that could be used by mountpoint-registrar-provider";
+    input {
+      leaf name {
+        type string;
+        mandatory true;
+        description
+          "name for test";
+      }
+      leaf test-date {
+        type string;
+        mandatory true;
         description
-            "Initial revision";
+          "date for the test";
+      }
     }
-
-     rpc test {
+    output {
+      leaf result-string {
+        type string;
+        mandatory true;
         description
-            "Test RPC that could be used by mountpoint-registrar-provider";
-        input{
-            leaf name {
-                mandatory true;
-                type string;
-                description    "name for test";
-            }
-            leaf test-date {
-                mandatory true;
-                type string;
-                description    "date for the test";
-            }
-
-        }
-        output {
-            leaf result-string {
-                mandatory true;
-                type string;
-                description    "Description for testing";
-            }
-        }
+          "Description for testing";
+      }
     }
-
+  }
 }
-
index 3751b55..8d64d67 100644 (file)
@@ -30,7 +30,7 @@
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
         <version>2.0.0-SNAPSHOT</version>
-        <relativePath/>
+        <relativePath />
     </parent>
 
     <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
index 10bffe4..6d608bf 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -62,6 +60,9 @@ public class DMaaPVESMsgConsumerMain implements Runnable {
                        consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_TIMEOUT, pnfRegistrationConfig.getTimeout());
                        consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_LIMIT, pnfRegistrationConfig.getLimit());
                        consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_FETCHPAUSE, pnfRegistrationConfig.getFetchPause());
+                       consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_PROTOCOL, pnfRegistrationConfig.getProtocol());
+                       consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_USERNAME, pnfRegistrationConfig.getUsername());
+                       consumerProperties.put(PNFRegistrationConfig.PROPERTY_KEY_CONSUMER_PASSWORD, pnfRegistrationConfig.getPassword());
                } else if (domain.equalsIgnoreCase("fault")) {
                        this.faultConfig = (FaultConfig) domainConfig;
                        consumerClass = faultConfig.getConsumerClass();
@@ -75,6 +76,9 @@ public class DMaaPVESMsgConsumerMain implements Runnable {
                        consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_TIMEOUT, faultConfig.getTimeout());
                        consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_LIMIT, faultConfig.getLimit());
                        consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_FETCHPAUSE, faultConfig.getFetchPause());
+                       consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_PROTOCOL, faultConfig.getProtocol());
+                       consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_USERNAME, faultConfig.getUsername());
+                       consumerProperties.put(FaultConfig.PROPERTY_KEY_CONSUMER_PASSWORD, faultConfig.getPassword());
                }
 
                if (consumerClass != null) {
index b04ba31..90757e6 100644 (file)
@@ -28,9 +28,18 @@ public class FaultConfig implements Configuration {
 
        public static final String PROPERTY_KEY_CONSUMER_TRANSPORTTYPE = "TransportType";
        private static final String DEFAULT_VALUE_CONSUMER_TRANSPORTTYPE = "HTTPNOAUTH";
+       
+    public static final String PROPERTY_KEY_CONSUMER_PROTOCOL = "Protocol";
+    private static final String DEFAULT_VALUE_CONSUMER_PROTOCOL = "http";
+    
+    public static final String PROPERTY_KEY_CONSUMER_USERNAME = "username";
+    private static final String DEFAULT_VALUE_CONSUMER_USERNAME = "username";
+    
+    public static final String PROPERTY_KEY_CONSUMER_PASSWORD = "password";
+    private static final String DEFAULT_VALUE_CONSUMER_PASSWORD = "password";
 
        public static final String PROPERTY_KEY_CONSUMER_HOST_PORT = "host";
-       private static final String DEFAULT_VALUE_CONSUMER_HOST_PORT = "onap-dmap:3904";
+       private static final String DEFAULT_VALUE_CONSUMER_HOST_PORT = "onap-dmaap:3904";
 
        public static final String PROPERTY_KEY_CONSUMER_TOPIC = "topic";
        private static final String DEFAULT_VALUE_CONSUMER_TOPIC = "unauthenticated.SEC_FAULT_OUTPUT";
@@ -71,6 +80,9 @@ public class FaultConfig implements Configuration {
 
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_CLASS, DEFAULT_VALUE_CONSUMER_CLASS);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TRANSPORTTYPE, DEFAULT_VALUE_CONSUMER_TRANSPORTTYPE);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PROTOCOL, DEFAULT_VALUE_CONSUMER_PROTOCOL);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_USERNAME, DEFAULT_VALUE_CONSUMER_USERNAME);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PASSWORD, DEFAULT_VALUE_CONSUMER_PASSWORD);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_HOST_PORT, DEFAULT_VALUE_CONSUMER_HOST_PORT);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TOPIC, DEFAULT_VALUE_CONSUMER_TOPIC);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_CONTENTTYPE, DEFAULT_VALUE_CONSUMER_CONTENTTYPE);
@@ -94,6 +106,18 @@ public class FaultConfig implements Configuration {
                return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TRANSPORTTYPE);
        }
 
+       public String getProtocol() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PROTOCOL);
+       }
+
+       public String getUsername() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_USERNAME);
+       }
+
+       public String getPassword() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PASSWORD);
+       }
+       
        public String getTopic() {
                return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TOPIC);
        }
index f10cb1a..1155462 100644 (file)
@@ -25,15 +25,10 @@ import java.util.Map;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.Configuration;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.filechange.IConfigChangedListener;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.MountPointService;
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@SuppressWarnings("deprecation")
 public class MountpointRegistrarImpl implements AutoCloseable, IConfigChangedListener {
 
        private static final Logger LOG = LoggerFactory.getLogger(MountpointRegistrarImpl.class);
@@ -41,16 +36,6 @@ public class MountpointRegistrarImpl implements AutoCloseable, IConfigChangedLis
        private static final String CONFIGURATIONFILE = "etc/mountpoint-registrar.properties";
 
        private Thread dmaapVESMsgConsumerMain = null;
-       @SuppressWarnings("unused")
-       private DataBroker dataBroker = null;
-       @SuppressWarnings("unused")
-       private MountPointService mountPointService = null;
-       @SuppressWarnings("unused")
-       private RpcProviderRegistry rpcProviderRegistry = null;
-       @SuppressWarnings("unused")
-       private NotificationPublishService notificationPublishService = null;
-       @SuppressWarnings("unused")
-       private ClusterSingletonServiceProvider clusterSingletonServiceProvider;
 
        private GeneralConfig generalConfig;
        private boolean dmaapEnabled = false;
@@ -61,26 +46,6 @@ public class MountpointRegistrarImpl implements AutoCloseable, IConfigChangedLis
                LOG.info("Creating provider class for {}", APPLICATION_NAME);
        }
 
-       public void setDataBroker(DataBroker dataBroker) {
-               this.dataBroker = dataBroker;
-       }
-
-       public void setRpcProviderRegistry(RpcProviderRegistry rpcProviderRegistry) {
-               this.rpcProviderRegistry = rpcProviderRegistry;
-       }
-
-       public void setNotificationPublishService(NotificationPublishService notificationPublishService) {
-               this.notificationPublishService = notificationPublishService;
-       }
-
-       public void setMountPointService(MountPointService mountPointService) {
-               this.mountPointService = mountPointService;
-       }
-
-       public void setClusterSingletonService(ClusterSingletonServiceProvider clusterSingletonService) {
-               this.clusterSingletonServiceProvider = clusterSingletonService;
-       }
-
        public void init() {
                LOG.info("Init call for {}", APPLICATION_NAME);
 
index 8a3ded5..26ece6b 100644 (file)
@@ -29,9 +29,18 @@ public class PNFRegistrationConfig implements Configuration {
 
     public static final String PROPERTY_KEY_CONSUMER_TRANSPORTTYPE = "TransportType";
     private static final String DEFAULT_VALUE_CONSUMER_TRANSPORTTYPE = "HTTPNOAUTH";
+    
+    public static final String PROPERTY_KEY_CONSUMER_PROTOCOL = "Protocol";
+    private static final String DEFAULT_VALUE_CONSUMER_PROTOCOL = "http";
+    
+    public static final String PROPERTY_KEY_CONSUMER_USERNAME = "username";
+    private static final String DEFAULT_VALUE_CONSUMER_USERNAME = "username";
+    
+    public static final String PROPERTY_KEY_CONSUMER_PASSWORD = "password";
+    private static final String DEFAULT_VALUE_CONSUMER_PASSWORD = "password";
 
     public static final String PROPERTY_KEY_CONSUMER_HOST_PORT = "host";
-    private static final String DEFAULT_VALUE_CONSUMER_HOST_PORT = "onap-dmap:3904";
+    private static final String DEFAULT_VALUE_CONSUMER_HOST_PORT = "onap-dmaap:3904";
 
     public static final String PROPERTY_KEY_CONSUMER_TOPIC = "topic";
     private static final String DEFAULT_VALUE_CONSUMER_TOPIC = "unauthenticated.VES_PNFREG_OUTPUT";
@@ -71,6 +80,9 @@ public class PNFRegistrationConfig implements Configuration {
 
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_CLASS, DEFAULT_VALUE_CONSUMER_CLASS);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TRANSPORTTYPE, DEFAULT_VALUE_CONSUMER_TRANSPORTTYPE);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PROTOCOL, DEFAULT_VALUE_CONSUMER_PROTOCOL);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_USERNAME, DEFAULT_VALUE_CONSUMER_USERNAME);
+               configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PASSWORD, DEFAULT_VALUE_CONSUMER_PASSWORD);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_HOST_PORT, DEFAULT_VALUE_CONSUMER_HOST_PORT);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TOPIC, DEFAULT_VALUE_CONSUMER_TOPIC);
                configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_CONSUMER_CONTENTTYPE, DEFAULT_VALUE_CONSUMER_CONTENTTYPE);
@@ -94,6 +106,18 @@ public class PNFRegistrationConfig implements Configuration {
                return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TRANSPORTTYPE);
        }
 
+       public String getProtocol() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PROTOCOL);
+       }
+
+       public String getUsername() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_USERNAME);
+       }
+
+       public String getPassword() {
+               return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_PASSWORD);
+       }
+
        public String getTopic() {
                return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_CONSUMER_TOPIC);
        }
index a286d43..ba4b254 100644 (file)
 <blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
            xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true">
 
-    <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
-               odl:type="default"/>
-
-    <reference id="notificationPublishService"
-               interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
-               odl:type="default"/>
-
-    <reference id="mountPointService"
-               interface="org.opendaylight.controller.md.sal.binding.api.MountPointService"
-               odl:type="default"/>
-
-    <reference id="rpcProviderRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
-               odl:type="default"/>
-
-    <reference id="clusterSingletonService"
-               interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
-
     <bean id="provider" class="org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.MountpointRegistrarImpl" init-method="init" destroy-method="close">
-        <property name="dataBroker" ref="dataBroker"/>
-        <property name="rpcProviderRegistry" ref="rpcProviderRegistry"/>
-        <property name="notificationPublishService" ref="notificationPublishService"/>
-        <property name="mountPointService" ref="mountPointService"/>
-        <property name="clusterSingletonService" ref="clusterSingletonService"/>
     </bean>
 
 </blueprint>
index 29da7ad..1049bf9 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.io.IOException;
@@ -36,6 +36,9 @@ public class PNFRegistrationConfigTest {
        private static final String TESTCONFIG_CONTENT="[pnfRegistration]\n" +
                        "pnfRegConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer\n" +
                        "TransportType=HTTPNOAUTH\n" +
+                       "Protocol=http\n" +
+                       "username=username\n" +
+                       "password=password\n" +
                        "host=onap-dmap:3904\n" +
                        "topic=unauthenticated.VES_PNFREG_OUTPUT\n" +
                        "contenttype=application/json\n" +
@@ -65,6 +68,10 @@ public class PNFRegistrationConfigTest {
                        assertEquals("20000", pnfCfg.getTimeout());
                        assertEquals("10000", pnfCfg.getLimit());
                        assertEquals("5000", pnfCfg.getFetchPause());
+                       assertEquals("http", pnfCfg.getProtocol());
+                       assertEquals("username", pnfCfg.getUsername());
+                       assertEquals("password", pnfCfg.getPassword());
+
 
                } catch (IOException e) {
                        // TODO Auto-generated catch block
index cdc641f..b5544df 100644 (file)
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import static org.junit.Assert.*;
-
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPFaultVESMsgConsumer;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.FaultNotificationClient;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFMountPointClient;
 
 public class TestDMaaPFaultVESMsgConsumer extends DMaaPFaultVESMsgConsumer {
 
index 5443915..eda372d 100644 (file)
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
-
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFMountPointClient;
 
@@ -30,30 +27,30 @@ public class TestDMaaPPNFRegVESMsgConsumer extends DMaaPPNFRegVESMsgConsumer {
        private static final String DEFAULT_SDNRUSER = "admin";
        private static final String DEFAULT_SDNRPASSWD = "admin";
        private static final String DEFAULT_SDNRBASEURL = "http://localhost:8181";
-       
-       private static final String pnfRegMsg_TLS = "{\n" + 
-                       "  \"event\": {\n" + 
-                       "    \"commonEventHeader\": {\n" + 
-                       "      \"domain\": \"pnfRegistration\",\n" + 
-                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" + 
-                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" + 
-                       "      \"eventType\": \"EventType5G\",\n" + 
-                       "      \"sequence\": 0,\n" + 
-                       "      \"priority\": \"Low\",\n" + 
-                       "      \"reportingEntityId\": \"\",\n" + 
-                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" + 
-                       "      \"sourceId\": \"\",\n" + 
-                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" + 
-                       "      \"startEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"lastEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"nfNamingCode\": \"1234\",\n" + 
-                       "      \"nfVendorName\": \"VENDORA\",\n" + 
-                       "      \"timeZoneOffset\": \"+00:00\",\n" + 
-                       "      \"version\": \"4.0.1\",\n" + 
-                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" + 
-                       "    },\n" + 
-                       "    \"pnfRegistrationFields\": {\n" + 
-                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" + 
+
+       private static final String pnfRegMsg_TLS = "{\n" +
+                       "  \"event\": {\n" +
+                       "    \"commonEventHeader\": {\n" +
+                       "      \"domain\": \"pnfRegistration\",\n" +
+                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" +
+                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" +
+                       "      \"eventType\": \"EventType5G\",\n" +
+                       "      \"sequence\": 0,\n" +
+                       "      \"priority\": \"Low\",\n" +
+                       "      \"reportingEntityId\": \"\",\n" +
+                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" +
+                       "      \"sourceId\": \"\",\n" +
+                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" +
+                       "      \"startEpochMicrosec\": 1571300004203,\n" +
+                       "      \"lastEpochMicrosec\": 1571300004203,\n" +
+                       "      \"nfNamingCode\": \"1234\",\n" +
+                       "      \"nfVendorName\": \"VENDORA\",\n" +
+                       "      \"timeZoneOffset\": \"+00:00\",\n" +
+                       "      \"version\": \"4.0.1\",\n" +
+                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" +
+                       "    },\n" +
+                       "    \"pnfRegistrationFields\": {\n" +
+                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" +
                        "               \"additionalFields\": \n" +
                        "               { \n" +
                        "                       \"protocol\":\"TLS\",\n"+
@@ -68,46 +65,46 @@ public class TestDMaaPPNFRegVESMsgConsumer extends DMaaPPNFRegVESMsgConsumer {
                        "                       \"username\":\"netconf\",\n" +
                        "                       \"tcpOnly\":\"false\"\n" +
                        "               },\n" +
-                       "      \"lastServiceDate\":\"2019-08-16\",\n" + 
-                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" + 
-                       "      \"manufactureDate\":\"2019-08-16\",\n" + 
-                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" + 
-                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" + 
+                       "      \"lastServiceDate\":\"2019-08-16\",\n" +
+                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" +
+                       "      \"manufactureDate\":\"2019-08-16\",\n" +
+                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" +
+                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" +
                        "          \"oamPort\":\"17380\",\n" +
-                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" + 
-                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" + 
-                       "      \"softwareVersion\": \"2.3.5\",\n" + 
-                       "      \"unitFamily\": \"VENDORA-1234\",\n" + 
-                       "      \"unitType\": \"1234\",\n" + 
-                       "      \"vendorName\": \"VENDORA\"\n" + 
-                       "    }\n" + 
-                       "  }\n" + 
-                       "}\n" + 
+                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" +
+                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" +
+                       "      \"softwareVersion\": \"2.3.5\",\n" +
+                       "      \"unitFamily\": \"VENDORA-1234\",\n" +
+                       "      \"unitType\": \"1234\",\n" +
+                       "      \"vendorName\": \"VENDORA\"\n" +
+                       "    }\n" +
+                       "  }\n" +
+                       "}\n" +
                        "";
-       
-       private static final String pnfRegMsg_SSH = "{\n" + 
-                       "  \"event\": {\n" + 
-                       "    \"commonEventHeader\": {\n" + 
-                       "      \"domain\": \"pnfRegistration\",\n" + 
-                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" + 
-                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" + 
-                       "      \"eventType\": \"EventType5G\",\n" + 
-                       "      \"sequence\": 0,\n" + 
-                       "      \"priority\": \"Low\",\n" + 
-                       "      \"reportingEntityId\": \"\",\n" + 
-                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" + 
-                       "      \"sourceId\": \"\",\n" + 
-                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" + 
-                       "      \"startEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"lastEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"nfNamingCode\": \"1234\",\n" + 
-                       "      \"nfVendorName\": \"VENDORA\",\n" + 
-                       "      \"timeZoneOffset\": \"+00:00\",\n" + 
-                       "      \"version\": \"4.0.1\",\n" + 
-                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" + 
-                       "    },\n" + 
-                       "    \"pnfRegistrationFields\": {\n" + 
-                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" + 
+
+       private static final String pnfRegMsg_SSH = "{\n" +
+                       "  \"event\": {\n" +
+                       "    \"commonEventHeader\": {\n" +
+                       "      \"domain\": \"pnfRegistration\",\n" +
+                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" +
+                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" +
+                       "      \"eventType\": \"EventType5G\",\n" +
+                       "      \"sequence\": 0,\n" +
+                       "      \"priority\": \"Low\",\n" +
+                       "      \"reportingEntityId\": \"\",\n" +
+                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" +
+                       "      \"sourceId\": \"\",\n" +
+                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" +
+                       "      \"startEpochMicrosec\": 1571300004203,\n" +
+                       "      \"lastEpochMicrosec\": 1571300004203,\n" +
+                       "      \"nfNamingCode\": \"1234\",\n" +
+                       "      \"nfVendorName\": \"VENDORA\",\n" +
+                       "      \"timeZoneOffset\": \"+00:00\",\n" +
+                       "      \"version\": \"4.0.1\",\n" +
+                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" +
+                       "    },\n" +
+                       "    \"pnfRegistrationFields\": {\n" +
+                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" +
                        "               \"additionalFields\": \n" +
                        "               { \n" +
                        "                       \"protocol\":\"SSH\",\n"+
@@ -122,46 +119,46 @@ public class TestDMaaPPNFRegVESMsgConsumer extends DMaaPPNFRegVESMsgConsumer {
                        "                       \"username\":\"netconf\",\n" +
                        "                       \"tcpOnly\":\"false\"\n" +
                        "               },\n" +
-                       "      \"lastServiceDate\":\"2019-08-16\",\n" + 
-                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" + 
-                       "      \"manufactureDate\":\"2019-08-16\",\n" + 
-                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" + 
-                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" + 
+                       "      \"lastServiceDate\":\"2019-08-16\",\n" +
+                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" +
+                       "      \"manufactureDate\":\"2019-08-16\",\n" +
+                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" +
+                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" +
                        "          \"oamPort\":\"17380\",\n" +
-                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" + 
-                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" + 
-                       "      \"softwareVersion\": \"2.3.5\",\n" + 
-                       "      \"unitFamily\": \"VENDORA-1234\",\n" + 
-                       "      \"unitType\": \"1234\",\n" + 
-                       "      \"vendorName\": \"VENDORA\"\n" + 
-                       "    }\n" + 
-                       "  }\n" + 
-                       "}\n" + 
+                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" +
+                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" +
+                       "      \"softwareVersion\": \"2.3.5\",\n" +
+                       "      \"unitFamily\": \"VENDORA-1234\",\n" +
+                       "      \"unitType\": \"1234\",\n" +
+                       "      \"vendorName\": \"VENDORA\"\n" +
+                       "    }\n" +
+                       "  }\n" +
+                       "}\n" +
                        "";
 
-       private static final String pnfRegMsg_OTHER = "{\n" + 
-                       "  \"event\": {\n" + 
-                       "    \"commonEventHeader\": {\n" + 
-                       "      \"domain\": \"pnfRegistration\",\n" + 
-                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" + 
-                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" + 
-                       "      \"eventType\": \"EventType5G\",\n" + 
-                       "      \"sequence\": 0,\n" + 
-                       "      \"priority\": \"Low\",\n" + 
-                       "      \"reportingEntityId\": \"\",\n" + 
-                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" + 
-                       "      \"sourceId\": \"\",\n" + 
-                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" + 
-                       "      \"startEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"lastEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"nfNamingCode\": \"1234\",\n" + 
-                       "      \"nfVendorName\": \"VENDORA\",\n" + 
-                       "      \"timeZoneOffset\": \"+00:00\",\n" + 
-                       "      \"version\": \"4.0.1\",\n" + 
-                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" + 
-                       "    },\n" + 
-                       "    \"pnfRegistrationFields\": {\n" + 
-                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" + 
+       private static final String pnfRegMsg_OTHER = "{\n" +
+                       "  \"event\": {\n" +
+                       "    \"commonEventHeader\": {\n" +
+                       "      \"domain\": \"pnfRegistration\",\n" +
+                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" +
+                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" +
+                       "      \"eventType\": \"EventType5G\",\n" +
+                       "      \"sequence\": 0,\n" +
+                       "      \"priority\": \"Low\",\n" +
+                       "      \"reportingEntityId\": \"\",\n" +
+                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" +
+                       "      \"sourceId\": \"\",\n" +
+                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" +
+                       "      \"startEpochMicrosec\": 1571300004203,\n" +
+                       "      \"lastEpochMicrosec\": 1571300004203,\n" +
+                       "      \"nfNamingCode\": \"1234\",\n" +
+                       "      \"nfVendorName\": \"VENDORA\",\n" +
+                       "      \"timeZoneOffset\": \"+00:00\",\n" +
+                       "      \"version\": \"4.0.1\",\n" +
+                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" +
+                       "    },\n" +
+                       "    \"pnfRegistrationFields\": {\n" +
+                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" +
                        "               \"additionalFields\": \n" +
                        "               { \n" +
                        "                       \"protocol\":\"OTHER\",\n"+
@@ -176,92 +173,92 @@ public class TestDMaaPPNFRegVESMsgConsumer extends DMaaPPNFRegVESMsgConsumer {
                        "                       \"username\":\"netconf\",\n" +
                        "                       \"tcpOnly\":\"false\"\n" +
                        "               },\n" +
-                       "      \"lastServiceDate\":\"2019-08-16\",\n" + 
-                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" + 
-                       "      \"manufactureDate\":\"2019-08-16\",\n" + 
-                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" + 
-                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" + 
+                       "      \"lastServiceDate\":\"2019-08-16\",\n" +
+                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" +
+                       "      \"manufactureDate\":\"2019-08-16\",\n" +
+                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" +
+                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" +
                        "          \"oamPort\":\"17380\",\n" +
-                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" + 
-                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" + 
-                       "      \"softwareVersion\": \"2.3.5\",\n" + 
-                       "      \"unitFamily\": \"VENDORA-1234\",\n" + 
-                       "      \"unitType\": \"1234\",\n" + 
-                       "      \"vendorName\": \"VENDORA\"\n" + 
-                       "    }\n" + 
-                       "  }\n" + 
-                       "}\n" + 
+                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" +
+                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" +
+                       "      \"softwareVersion\": \"2.3.5\",\n" +
+                       "      \"unitFamily\": \"VENDORA-1234\",\n" +
+                       "      \"unitType\": \"1234\",\n" +
+                       "      \"vendorName\": \"VENDORA\"\n" +
+                       "    }\n" +
+                       "  }\n" +
+                       "}\n" +
                        "";
-       private static final String pnfRegMsg = "{\n" + 
-                       "  \"event\": {\n" + 
-                       "    \"commonEventHeader\": {\n" + 
-                       "      \"domain\": \"pnfRegistration\",\n" + 
-                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" + 
-                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" + 
-                       "      \"eventType\": \"EventType5G\",\n" + 
-                       "      \"sequence\": 0,\n" + 
-                       "      \"priority\": \"Low\",\n" + 
-                       "      \"reportingEntityId\": \"\",\n" + 
-                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" + 
-                       "      \"sourceId\": \"\",\n" + 
-                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" + 
-                       "      \"startEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"lastEpochMicrosec\": 1571300004203,\n" + 
-                       "      \"nfNamingCode\": \"1234\",\n" + 
-                       "      \"nfVendorName\": \"VENDORA\",\n" + 
-                       "      \"timeZoneOffset\": \"+00:00\",\n" + 
-                       "      \"version\": \"4.0.1\",\n" + 
-                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" + 
-                       "    },\n" + 
-                       "    \"pnfRegistrationFields\": {\n" + 
-                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" + 
-                       "      \"lastServiceDate\":\"2019-08-16\",\n" + 
-                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" + 
-                       "      \"manufactureDate\":\"2019-08-16\",\n" + 
-                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" + 
-                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" + 
+       private static final String pnfRegMsg = "{\n" +
+                       "  \"event\": {\n" +
+                       "    \"commonEventHeader\": {\n" +
+                       "      \"domain\": \"pnfRegistration\",\n" +
+                       "      \"eventId\": \"NSHMRIACQ01M01123401_1234 BestInClass\",\n" +
+                       "      \"eventName\": \"pnfRegistration_EventType5G\",\n" +
+                       "      \"eventType\": \"EventType5G\",\n" +
+                       "      \"sequence\": 0,\n" +
+                       "      \"priority\": \"Low\",\n" +
+                       "      \"reportingEntityId\": \"\",\n" +
+                       "      \"reportingEntityName\": \"pendurty-virtual-machine\",\n" +
+                       "      \"sourceId\": \"\",\n" +
+                       "      \"sourceName\": \"NSHMRIACQ01M01123401\",\n" +
+                       "      \"startEpochMicrosec\": 1571300004203,\n" +
+                       "      \"lastEpochMicrosec\": 1571300004203,\n" +
+                       "      \"nfNamingCode\": \"1234\",\n" +
+                       "      \"nfVendorName\": \"VENDORA\",\n" +
+                       "      \"timeZoneOffset\": \"+00:00\",\n" +
+                       "      \"version\": \"4.0.1\",\n" +
+                       "      \"vesEventListenerVersion\":\"7.0.1\"\n" +
+                       "    },\n" +
+                       "    \"pnfRegistrationFields\": {\n" +
+                       "      \"pnfRegistrationFieldsVersion\": \"2.0\",\n" +
+                       "      \"lastServiceDate\":\"2019-08-16\",\n" +
+                       "      \"macAddress\":\"02:42:f7:d4:62:ce\",\n" +
+                       "      \"manufactureDate\":\"2019-08-16\",\n" +
+                       "      \"modelNumbsdnrer\": \"1234 BestInClass\",\n" +
+                       "      \"oamV4IpAddress\": \"10.10.10.11\",\n" +
                        "          \"oamPort\":\"17380\",\n" +
-                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" + 
-                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" + 
-                       "      \"softwareVersion\": \"2.3.5\",\n" + 
-                       "      \"unitFamily\": \"VENDORA-1234\",\n" + 
-                       "      \"unitType\": \"1234\",\n" + 
-                       "      \"vendorName\": \"VENDORA\"\n" + 
-                       "    }\n" + 
-                       "  }\n" + 
-                       "}\n" + 
+                       "      \"oamV6IpAddress\": \"0:0:0:0:0:ffff:a0a:011\",\n" +
+                       "      \"serialNumber\": \"VENDORA-1234-10.10.10.11-1234 BestInClass\",\n" +
+                       "      \"softwareVersion\": \"2.3.5\",\n" +
+                       "      \"unitFamily\": \"VENDORA-1234\",\n" +
+                       "      \"unitType\": \"1234\",\n" +
+                       "      \"vendorName\": \"VENDORA\"\n" +
+                       "    }\n" +
+                       "  }\n" +
+                       "}\n" +
                        "";
-       
+
        @Test
        public void processMsgTest() {
-               
+
                DMaaPPNFRegVESMsgConsumer pnfRegMsgConsumer = new TestDMaaPPNFRegVESMsgConsumer();
                try {
                        pnfRegMsgConsumer.processMsg(pnfRegMsg);
                        pnfRegMsgConsumer.processMsg(pnfRegMsg_SSH);
                        pnfRegMsgConsumer.processMsg(pnfRegMsg_TLS);
-                       pnfRegMsgConsumer.processMsg(pnfRegMsg_OTHER);          
+                       pnfRegMsgConsumer.processMsg(pnfRegMsg_OTHER);
                } catch (Exception e) {
                        e.printStackTrace();
                        System.out.println("Exception while processing PNF Registration Message - "+e.getMessage());
                }
        }
-       
+
        @Override
        public PNFMountPointClient getPNFMountPointClient(String baseUrl) {
                return new TestPNFMountPointClient();
        }
-       
+
        @Override
        public String getSDNRUser() {
                return DEFAULT_SDNRUSER;
        }
-       
+
        @Override
        public String getSDNRPasswd() {
                return DEFAULT_SDNRPASSWD;
        }
-       
+
        @Override
        public String getBaseUrl() {
                return DEFAULT_SDNRBASEURL;
index aefeddb..774ca20 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.File;
 import java.nio.charset.StandardCharsets;
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.Configuration;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
index e8573e4..73cd5aa 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.io.IOException;
@@ -28,7 +28,6 @@ import org.junit.After;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.FaultConfig;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFRegistrationConfig;
 
 import com.google.common.io.Files;
 
@@ -37,6 +36,9 @@ public class TestFaultConfig {
        private static final String TESTCONFIG_CONTENT="[fault]\n" +
                        "faultConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPFaultVESMsgConsumer\n" +
                        "TransportType=HTTPNOAUTH\n" +
+                       "Protocol=http\n" +
+                       "username=username\n" +
+                       "password=password\n" +
                        "host=onap-dmap:3904\n" +
                        "topic=unauthenticated.SEC_FAULT_OUTPUT\n" +
                        "contenttype=application/json\n" +
@@ -67,6 +69,9 @@ public class TestFaultConfig {
                        assertEquals("20000", faultCfg.getTimeout());
                        assertEquals("10000", faultCfg.getLimit());
                        assertEquals("5000", faultCfg.getFetchPause());
+                       assertEquals("http", faultCfg.getProtocol());
+                       assertEquals("username", faultCfg.getUsername());
+                       assertEquals("password", faultCfg.getPassword());
 
                } catch (IOException e) {
                        // TODO Auto-generated catch block
index 9790a9c..3259f2e 100644 (file)
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import java.util.Optional;
+
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.PushFaultNotificationInputBuilder;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 public class TestMapping {
 
     private final ObjectMapper mapper = new ObjectMapper();
index b048c20..af47f3d 100644 (file)
@@ -28,29 +28,16 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.MountpointRegistrarImpl;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi.ClusterSingletonServiceProviderMock;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi.DataBrokerNetconfMock;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi.MountPointServiceMock;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi.NotificationPublishServiceMock;
-import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi.RpcProviderRegistryMock;
-import org.opendaylight.controller.md.sal.binding.api.MountPointService;
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@SuppressWarnings("deprecation")
 public class TestMountpointRegistrarImpl {
 
     private static Path KARAF_ETC = Paths.get("etc");
     private static MountpointRegistrarImpl mountpointRegistrar;
-    private static DataBrokerNetconfMock dataBrokerNetconf;
 
     private static final Logger LOG = LoggerFactory.getLogger(TestMountpointRegistrarImpl.class);
 
@@ -68,21 +55,10 @@ public class TestMountpointRegistrarImpl {
         Files.createDirectories(etc);
 
         // Create mocks
-        dataBrokerNetconf = new DataBrokerNetconfMock();
-        ClusterSingletonServiceProvider clusterSingletonService = new ClusterSingletonServiceProviderMock();
-               MountPointService mountPointService = new MountPointServiceMock(null);
-        NotificationPublishService notificationPublishService = new NotificationPublishServiceMock();
-        RpcProviderRegistry rpcProviderRegistry = new RpcProviderRegistryMock();
 
         // start using blueprint interface
         try {
                mountpointRegistrar = new MountpointRegistrarImpl();
-
-               mountpointRegistrar.setDataBroker(dataBrokerNetconf);
-               mountpointRegistrar.setMountPointService(mountPointService);
-               mountpointRegistrar.setNotificationPublishService(notificationPublishService);
-               mountpointRegistrar.setRpcProviderRegistry(rpcProviderRegistry);
-               mountpointRegistrar.setClusterSingletonService(clusterSingletonService);
                mountpointRegistrar.init();
         } catch (Exception e) {
             StringWriter sw = new StringWriter();
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerMountpointMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerMountpointMock.java
deleted file mode 100644 (file)
index a2e115d..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import org.opendaylight.controller.md.sal.binding.api.BindingService;
-import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class DataBrokerMountpointMock implements DataBroker, BindingService {
-
-    ReadOnlyTransaction readOnlyTransaction;
-
-    public void setReadOnlyTransaction(ReadOnlyTransaction readOnlyTransaction) {
-        this.readOnlyTransaction = readOnlyTransaction;
-    }
-
-    @Override
-    public <T extends DataObject, L extends DataTreeChangeListener<T>> ListenerRegistration<L> registerDataTreeChangeListener(
-            DataTreeIdentifier<T> arg0, L arg1) {
-        return null;
-    }
-
-    @Override
-    public BindingTransactionChain createTransactionChain(TransactionChainListener listener) {
-        return null;
-    }
-
-    @Override
-    public ReadOnlyTransaction newReadOnlyTransaction() {
-        return readOnlyTransaction;
-    }
-
-    @Override
-    public ReadWriteTransaction newReadWriteTransaction() {
-         return null;
-    }
-
-    @Override
-    public WriteTransaction newWriteOnlyTransaction() {
-        return null;
-    }
-
-
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerNetconfMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerNetconfMock.java
deleted file mode 100644 (file)
index e504ef1..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class DataBrokerNetconfMock implements DataBroker {
-
-
-    ReadOnlyTransaction readOnlyTransaction;
-
-    public void setReadOnlyTransaction(ReadOnlyTransaction readOnlyTransaction) {
-        this.readOnlyTransaction = readOnlyTransaction;
-    }
-
-    @Override
-    public <T extends DataObject, L extends DataTreeChangeListener<T>> ListenerRegistration<L> registerDataTreeChangeListener(
-            DataTreeIdentifier<T> arg0, L arg1) {
-        return null;
-    }
-
-    @Override
-    public BindingTransactionChain createTransactionChain(TransactionChainListener listener) {
-        return null;
-    }
-
-    @Override
-    public ReadOnlyTransaction newReadOnlyTransaction() {
-        return readOnlyTransaction;
-    }
-
-    @Override
-    public ReadWriteTransaction newReadWriteTransaction() {
-        return null;
-    }
-
-    @Override
-    public WriteTransaction newWriteOnlyTransaction() {
-        return null;
-    }
-
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointMock.java
deleted file mode 100644 (file)
index 1a7cc50..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import com.google.common.base.Optional;
-import org.opendaylight.controller.md.sal.binding.api.BindingService;
-import org.opendaylight.controller.md.sal.binding.api.MountPoint;
-import org.opendaylight.controller.md.sal.binding.api.NotificationService;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class MountPointMock implements MountPoint {
-
-    private boolean databrokerAbsent = true;
-    private final DataBrokerMountpointMock dataBroker = new DataBrokerMountpointMock();
-    private final RpcConsumerRegistryMock rpcConsumerRegistry = new RpcConsumerRegistryMock();
-    private NotificationService setReadOnlyTransaction;
-
-    private static final InstanceIdentifier<Topology> NETCONF_TOPO_IID =
-            InstanceIdentifier.create(NetworkTopology.class).child(Topology.class,
-                    new TopologyKey(new TopologyId(TopologyNetconf.QNAME.getLocalName())));
-
-    @Override
-    public InstanceIdentifier<?> getIdentifier() {
-        return NETCONF_TOPO_IID;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public <T extends BindingService> Optional<T> getService(Class<T> service) {
-
-        System.out.println("Requested mountpoint service: "+service.getSimpleName()+" databrokerAbsent state: "+databrokerAbsent);
-
-        Optional<?> res;
-        if (service.isInstance(dataBroker)) {
-            System.out.println("Delivering databroker");
-            res =  databrokerAbsent ? Optional.absent() : Optional.of(dataBroker);
-        } else if (service.isInstance(rpcConsumerRegistry)) {
-            System.out.println("Delivering RpcConsumerRegistryMock");
-            res = Optional.of(rpcConsumerRegistry);
-        } else if (service.isInstance(setReadOnlyTransaction)) {
-            System.out.println("Delivering notificationService");
-            res = Optional.of(setReadOnlyTransaction);
-        } else {
-            System.out.println("Delivering no service");
-            res = Optional.absent();
-        }
-        return (Optional<T>)res;
-    }
-
-    public void setDatabrokerAbsent( boolean state) {
-        this.databrokerAbsent = state;
-    }
-
-    public <T extends NotificationService&ReadOnlyTransaction>void setReadOnlyTransaction(T readOnlyTransaction) {
-        this.setReadOnlyTransaction = readOnlyTransaction;
-        dataBroker.setReadOnlyTransaction(readOnlyTransaction);
-    }
-
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointServiceMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointServiceMock.java
deleted file mode 100644 (file)
index 4333247..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import com.google.common.base.Optional;
-import org.opendaylight.controller.md.sal.binding.api.MountPoint;
-import org.opendaylight.controller.md.sal.binding.api.MountPointService;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class MountPointServiceMock implements MountPointService {
-
-    private final MountPointMock mountpoint;
-
-    public MountPointServiceMock(MountPointMock mountpoint) {
-        this.mountpoint = mountpoint;
-    }
-
-    @Override
-    public Optional<MountPoint> getMountPoint(InstanceIdentifier<?> mountPoint) {
-
-        Optional<MountPoint> optional = Optional.of(mountpoint);
-        return optional;
-    }
-
-    @Override
-    public <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path,
-            T listener) {
-        return null;
-    }
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/NotificationPublishServiceMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/NotificationPublishServiceMock.java
deleted file mode 100644 (file)
index cf4ab0e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import com.google.common.util.concurrent.ListenableFuture;
-import java.util.concurrent.TimeUnit;
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.yangtools.yang.binding.Notification;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class NotificationPublishServiceMock implements NotificationPublishService {
-
-    @Override
-    public ListenableFuture<?> offerNotification(Notification notification) {
-        return null;
-    }
-
-   @Override
-    public ListenableFuture<?> offerNotification(Notification notification, int timeout, TimeUnit unit)
-            throws InterruptedException {
-        return null;
-    }
-
-    @Override
-    public void putNotification(Notification notification) throws InterruptedException {
-   }
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcConsumerRegistryMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcConsumerRegistryMock.java
deleted file mode 100644 (file)
index a33012b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-
-/**
- * @author herbert
- *
- */
-@SuppressWarnings("deprecation")
-public class RpcConsumerRegistryMock implements RpcConsumerRegistry {
-
-    @Override
-    public <T extends RpcService> T getRpcService(Class<T> serviceInterface) {
-        return null;
-    }
-
-}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcProviderRegistryMock.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcProviderRegistryMock.java
deleted file mode 100644 (file)
index 7d556df..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.mock.odlapi;
-
-import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-
-@SuppressWarnings("deprecation")
-public class RpcProviderRegistryMock implements RpcProviderRegistry {
-
-    @Override
-    public <T extends RpcService> T getRpcService(Class<T> serviceInterface) {
-        return null;
-    }
-
-   @Override
-    public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
-            L listener) {
-        return null;
-    }
-
-
-    @Override
-    public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> serviceInterface,
-            T implementation) throws IllegalStateException {
-        return null;
-    }
-
-    @Override
-    public <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> serviceInterface, T implementation)
-            throws IllegalStateException {
-        System.out.println("Register class "+serviceInterface);
-        return null;
-    }
-
-}