summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/mountpoint-registrar
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-05-19 16:37:06 +0200
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-05-19 16:39:17 +0200
commit93fa0f8e4d58f4dd9043db8798765e4c15e38434 (patch)
tree571a168c6144e3ed21f46ab2be0a150dadd03c4c /sdnr/wt/mountpoint-registrar
parent02c2ad26a25bcc58eb45b70d8d4cf7d2ef035e4e (diff)
Include secure communication to DMaaP
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
Diffstat (limited to 'sdnr/wt/mountpoint-registrar')
-rw-r--r--sdnr/wt/mountpoint-registrar/feature/pom.xml11
-rwxr-xr-xsdnr/wt/mountpoint-registrar/installer/pom.xml11
-rw-r--r--sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang85
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/pom.xml2
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java8
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java26
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java35
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java26
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml22
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java9
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java4
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java317
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java3
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java9
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java2
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java6
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java24
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java2
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerMountpointMock.java76
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerNetconfMock.java75
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointMock.java90
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointServiceMock.java55
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/NotificationPublishServiceMock.java50
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcConsumerRegistryMock.java39
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcProviderRegistryMock.java60
25 files changed, 290 insertions, 757 deletions
diff --git a/sdnr/wt/mountpoint-registrar/feature/pom.xml b/sdnr/wt/mountpoint-registrar/feature/pom.xml
index 0dc1849af..3e3db8307 100644
--- a/sdnr/wt/mountpoint-registrar/feature/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/feature/pom.xml
@@ -40,17 +40,6 @@
<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>
diff --git a/sdnr/wt/mountpoint-registrar/installer/pom.xml b/sdnr/wt/mountpoint-registrar/installer/pom.xml
index 78289b75d..63b344339 100755
--- a/sdnr/wt/mountpoint-registrar/installer/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/installer/pom.xml
@@ -45,17 +45,6 @@
<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>
diff --git a/sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang b/sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang
index f3f97aab1..bab6da7bc 100644
--- a/sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang
+++ b/sdnr/wt/mountpoint-registrar/model/src/main/yang/mountpoint-registrar.yang
@@ -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";
+ }
}
-
+ }
}
-
diff --git a/sdnr/wt/mountpoint-registrar/provider/pom.xml b/sdnr/wt/mountpoint-registrar/provider/pom.xml
index 3751b5575..8d64d67b7 100644
--- a/sdnr/wt/mountpoint-registrar/provider/pom.xml
+++ b/sdnr/wt/mountpoint-registrar/provider/pom.xml
@@ -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>
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java
index 10bffe44c..6d608bf05 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPVESMsgConsumerMain.java
@@ -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) {
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java
index b04ba315b..90757e6d5 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultConfig.java
@@ -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);
}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java
index f10cb1af7..1155462c4 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/MountpointRegistrarImpl.java
@@ -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);
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java
index 8a3ded50d..26ece6b6d 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFRegistrationConfig.java
@@ -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);
}
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
index a286d43d8..ba4b2542a 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
@@ -26,29 +26,7 @@
<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>
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
index 29da7ad85..1049bf902 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
@@ -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
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
index cdc641f10..b5544dfa4 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
@@ -18,13 +18,9 @@
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 {
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java
index 54439150c..eda372d77 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPPNFRegVESMsgConsumer.java
@@ -18,10 +18,7 @@
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;
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
index aefeddb0d..774ca2085 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPVESMsgConsumerMain.java
@@ -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;
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
index e8573e4e7..73cd5aaba 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
@@ -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
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
index 68bcb5ee4..b09b54f7e 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
@@ -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.IOException;
import java.util.Map;
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
index 9790a9ccc..3259f2e4c 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMapping.java
@@ -17,14 +17,16 @@
******************************************************************************/
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();
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
index b048c201c..af47f3d33 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestMountpointRegistrarImpl.java
@@ -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/TestPNFMountPointClient.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
index ca61d9c1c..5a68e15bc 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
@@ -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.IOException;
import java.util.Map;
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
index a2e115d59..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerMountpointMock.java
+++ /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
index e504ef166..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/DataBrokerNetconfMock.java
+++ /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
index 1a7cc50a5..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointMock.java
+++ /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
index 433324737..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/MountPointServiceMock.java
+++ /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
index cf4ab0e9b..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/NotificationPublishServiceMock.java
+++ /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
index a33012b8b..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcConsumerRegistryMock.java
+++ /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
index 7d556df98..000000000
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/mock/odlapi/RpcProviderRegistryMock.java
+++ /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;
- }
-
-}