summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf12/provider/src
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-07-30 19:44:41 +0000
committerGerrit Code Review <gerrit@onap.org>2021-07-30 19:44:41 +0000
commit0b829aa95b44134cd0b5574d32d8275fdb6b2c55 (patch)
tree01eaa02c199f285f08b062476cf5c01ca01f1b24 /sdnr/wt/devicemanager-onap/onf12/provider/src
parent2eb77b2b6ee879a099afc1a2e5bb0e68ab1b9b42 (diff)
parentdf5869629e4ffd6cb0b1ccb81c1fe17cdd73f851 (diff)
Merge "devicemanager-core refactoring and support for TLS mountpoints using data-provider interface"
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf12/provider/src')
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java26
1 files changed, 14 insertions, 12 deletions
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());
}