summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf12
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-07-30 15:14:17 +0530
committerKAPIL SINGAL <ks220y@att.com>2021-07-30 18:05:09 +0000
commitdf5869629e4ffd6cb0b1ccb81c1fe17cdd73f851 (patch)
treeb6633de7ba8efc028053e5b0a3f710b7d8fe34ab /sdnr/wt/devicemanager-onap/onf12
parent0c8d2c3d7dfd79a25107480af718d3d76cd45f39 (diff)
devicemanager-core refactoring and support for TLS mountpoints using data-provider interface
Use NodeId instead of String for mountpointname and enhance data-provider for creation of TLS mountpoints using REST or from the UI Issue-ID: CCSDK-3403 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: Iafb9fe81c2e1d1152beef2b86299edb78a870d85 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf12')
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/feature/pom.xml5
-rwxr-xr-xsdnr/wt/devicemanager-onap/onf12/installer/pom.xml4
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/pom.xml2
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java26
4 files changed, 22 insertions, 15 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml b/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml
index 41604dacb..de83dc9bf 100644
--- a/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml
+++ b/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml
@@ -41,6 +41,11 @@
<name>ccsdk-features :: ${project.artifactId}</name>
<dependencies>
+ <!-- <dependency> -->
+ <!-- <groupId>${project.groupId}</groupId> -->
+ <!-- <artifactId>sdnr-wt-devicemanager-onap-onf-model</artifactId> -->
+ <!-- <version>${project.version}</version> -->
+ <!-- </dependency> -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-devicemanager-onap-onf12-provider</artifactId>
diff --git a/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml b/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml
index 7107e184d..f347d7363 100755
--- a/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml
+++ b/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml
@@ -47,7 +47,7 @@
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>${application.name}-feature</artifactId>
<version>${project.version}</version>
<type>xml</type>
@@ -60,7 +60,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>${application.name}-provider</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml b/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml
index cce5bdbaf..94c836cfa 100644
--- a/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml
+++ b/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml
@@ -68,7 +68,7 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-devicemanager-core-model</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java
index a7a09fccb..9bd1ddb93 100644
--- a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java
+++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java
@@ -29,11 +29,11 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.MaintenanceService;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.PerformanceManager;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yangtools.yang.common.QName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -66,7 +66,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base {
private final @NonNull DataProvider dataProvider;
- private final @NonNull String mountPointNodeName;
+ private final @NonNull NodeId mountPointNodeId;
private final @NonNull NetconfBindingAccessor acessor;
private final @NonNull DeviceManagerOnfConfiguration pollAlarmConfig;
@@ -84,7 +84,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base {
@NonNull DeviceManagerServiceProvider serviceProvider, DeviceManagerOnfConfiguration configuration) {
super(acessor);
- this.mountPointNodeName = acessor.getNodeId().getValue();
+ this.mountPointNodeId = acessor.getNodeId();
this.acessor = acessor;
this.pollAlarmConfig = configuration;
@@ -200,8 +200,10 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base {
// Setup microwaveEventListener for notification service
doRegisterEventListener(acessor.getMountpoint());
- // Register netconf stream
- acessor.registerNotificationsStream(NetconfAccessor.DefaultNotificationsStream);
+ if (acessor.isNotificationsRFC5277Supported()) {
+ // Register default (NETCONF) stream
+ acessor.registerNotificationsStream();
+ }
// Set core-model revision value in "core-model-capability" field
setCoreModel(acessor.getNetconfNode());
@@ -211,17 +213,17 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base {
// create automatic empty maintenance entry into db before reading and listening
// for problems
- maintenanceService.createIfNotExists(mountPointNodeName);
+ maintenanceService.createIfNotExists(mountPointNodeId);
- aaiProviderClient.onDeviceRegistered(mountPointNodeName);
+ aaiProviderClient.onDeviceRegistered(mountPointNodeId);
// -- Register NE to performance manager
- performanceManager.registration(mountPointNodeName, this);
+ performanceManager.registration(mountPointNodeId, this);
//events will be already pushed by base devmgr (needs more clarification SDNC-1123)
//eventListenerHandler.registration(mountPointNodeName, acessor.getNetconfNode());
//LOG.debug("refresh necon entry for {} with type {} not",mountPointNodeName,this.getDeviceType());
//eventListenerHandler.connectIndication(mountPointNodeName, getDeviceType());
- LOG.info("Starting Event listener finished. Added Netconf device:{} type:{}", mountPointNodeName,
+ LOG.info("Starting Event listener finished. Added Netconf device:{} type:{}", mountPointNodeId,
getDeviceType());
}
@@ -229,9 +231,9 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base {
@Override
public void deregister() {
- maintenanceService.deleteIfNotRequired(mountPointNodeName);
- performanceManager.deRegistration(mountPointNodeName);
- aaiProviderClient.onDeviceUnregistered(mountPointNodeName);
+ maintenanceService.deleteIfNotRequired(mountPointNodeId);
+ performanceManager.deRegistration(mountPointNodeId);
+ aaiProviderClient.onDeviceUnregistered(mountPointNodeId);
faultService.removeAllCurrentProblemsOfNode(acessor.getNodeId());
}