summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-oran/provider/src/main/java
diff options
context:
space:
mode:
authorMichael DÜrre <michael.duerre@highstreet-technologies.com>2021-04-08 06:34:22 +0200
committerMichael DÜrre <michael.duerre@highstreet-technologies.com>2021-04-08 06:34:46 +0200
commitf3969004c6ccac18e742c5fc48c844e315991023 (patch)
treef5486a62e842bb16ca7d3af47a8663df08feef55 /sdnr/wt/devicemanager-oran/provider/src/main/java
parenta252be83694ae33260d99d5371ed48c1558aa2e8 (diff)
update websocketmanager
update complete notification flow Issue-ID: CCSDK-3252 Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com> Change-Id: I87ba00f615707b942471fcace57bcda50ce37e61
Diffstat (limited to 'sdnr/wt/devicemanager-oran/provider/src/main/java')
-rw-r--r--sdnr/wt/devicemanager-oran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanNetworkElement.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/sdnr/wt/devicemanager-oran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanNetworkElement.java b/sdnr/wt/devicemanager-oran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanNetworkElement.java
index df81f60bf..7c69f832b 100644
--- a/sdnr/wt/devicemanager-oran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanNetworkElement.java
+++ b/sdnr/wt/devicemanager-oran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanNetworkElement.java
@@ -32,7 +32,6 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESCommonEventHeaderP
import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESPNFRegistrationFieldsPOJO;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.hardware.rev180313.Hardware;
@@ -94,7 +93,7 @@ public class ORanNetworkElement implements NetworkElement {
componentList = YangHelper.getCollection(hardware.nonnullComponent());
List<Inventory> inventoryList =
ORanToInternalDataModel.getInventoryList(netconfAccessor.getNodeId(), componentList);
- inventoryList.forEach(databaseService::writeInventory);
+ databaseService.writeInventory(netconfAccessor.getNodeId().getValue(), inventoryList);
}
Optional<Guicutthrough> oGuicutthrough = ORanToInternalDataModel.getGuicutthrough(getOnapSystemData());
@@ -114,21 +113,17 @@ public class ORanNetworkElement implements NetworkElement {
// Publish the mountpoint to VES if enabled
publishMountpointToVES();
// Register call back class for receiving notifications
- Optional<NetconfNotifications> oNotifications = netconfAccessor.getNotificationAccessor();
- if (oNotifications.isPresent()) {
- NetconfNotifications notifications = oNotifications.get();
this.oRanListenerRegistrationResult = netconfAccessor.doRegisterNotificationListener(oRanListener);
this.oRanFaultListenerRegistrationResult =
netconfAccessor.doRegisterNotificationListener(oRanFaultListener);
// Register notifications stream
- if (notifications.isNCNotificationsSupported()) {
- List<Stream> streamList = notifications.getNotificationStreams();
- notifications.registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream); // Always register first to default stream
- notifications.registerNotificationsStream(streamList);
+ if (netconfAccessor.isNotificationsRFC5277Supported()) {
+ List<Stream> streamList = netconfAccessor.getNotificationStreams();
+ netconfAccessor.registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream); // Always register first to default stream
+ netconfAccessor.registerNotificationsStream(streamList);
} else {
- notifications.registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream);
+ netconfAccessor.registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream);
}
- }
}
@Override