From 17614362f2550c29dcd746ee2c1bc01d0df5de65 Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Tue, 25 May 2021 18:57:29 +0530 Subject: Improve Websocket notification interface Improve websocket notification interface Issue-ID: CCSDK-3315 Signed-off-by: Ravi Pendurty Change-Id: I0ded865adddb546ade98df4760e0a32ec964295a Signed-off-by: Ravi Pendurty --- .../impl/interfaces/Onf14AirInterfaceNotificationListener.java | 8 ++++---- .../interfaces/Onf14EthernetContainerNotificationListener.java | 6 +++--- .../impl/interfaces/Onf14WireInterfaceNotificationListener.java | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sdnr/wt/devicemanager-onap/onf14/provider') diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java index e1ca58055..1f3f30927 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java @@ -83,7 +83,7 @@ public class Onf14AirInterfaceNotificationListener implements AirInterface20List .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ObjectDeletionNotification.QNAME, notification.getTimestamp()); log.debug("onObjectDeletionNotification log entry written"); @@ -99,7 +99,7 @@ public class Onf14AirInterfaceNotificationListener implements AirInterface20List .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter()) .build(); serviceProvider.getFaultService().faultNotification(faultAlarm); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ProblemNotification.QNAME, notification.getTimestamp()); } @@ -118,7 +118,7 @@ public class Onf14AirInterfaceNotificationListener implements AirInterface20List .setNewValue(notification.getNewValue()).setObjectId(notification.getObjectIdRef().getValue()) .setSourceType(SourceType.Netconf).setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), AttributeValueChangedNotification.QNAME, notification.getTimestamp()); log.debug("onAttributeValueChangedNotification log entry written"); } @@ -133,7 +133,7 @@ public class Onf14AirInterfaceNotificationListener implements AirInterface20List .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ObjectCreationNotification.QNAME, notification.getTimestamp()); log.debug("onObjectCreationNotification log entry written"); } diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java index fb67a24ab..b76572ba5 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java @@ -96,7 +96,7 @@ public class Onf14EthernetContainerNotificationListener implements EthernetConta .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter().intValue()) .build(); serviceProvider.getFaultService().faultNotification(faultAlarm); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ProblemNotification.QNAME, notification.getTimestamp()); } @@ -115,7 +115,7 @@ public class Onf14EthernetContainerNotificationListener implements EthernetConta .setNewValue(notification.getNewValue()).setObjectId(notification.getObjectIdRef().getValue()) .setSourceType(SourceType.Netconf).setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), AttributeValueChangedNotification.QNAME, notification.getTimestamp()); log.debug("onAttributeValueChangedNotification log entry written"); @@ -131,7 +131,7 @@ public class Onf14EthernetContainerNotificationListener implements EthernetConta .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ObjectCreationNotification.QNAME, notification.getTimestamp()); log.debug("onObjectCreationNotification log entry written"); diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java index 8a1d42fa4..840f2c328 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java @@ -83,7 +83,7 @@ public class Onf14WireInterfaceNotificationListener implements WireInterface20Li .setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ObjectDeletionNotification.QNAME, notification.getTimestamp()); log.debug("onObjectDeletionNotification log entry written"); @@ -98,7 +98,7 @@ public class Onf14WireInterfaceNotificationListener implements WireInterface20Li .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter().intValue()) .build(); serviceProvider.getFaultService().faultNotification(faultAlarm); - serviceProvider.getWebsocketService().sendNotification( notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification( notification, netconfAccessor.getNodeId(), ProblemNotification.QNAME, notification.getTimestamp()); } @@ -120,7 +120,7 @@ public class Onf14WireInterfaceNotificationListener implements WireInterface20Li .setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), AttributeValueChangedNotification.QNAME, notification.getTimestamp()); @@ -140,7 +140,7 @@ public class Onf14WireInterfaceNotificationListener implements WireInterface20Li .setSourceType(SourceType.Netconf) .setTimestamp(notification.getTimestamp()); serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); - serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId(), ObjectCreationNotification.QNAME, notification.getTimestamp()); log.debug("onObjectCreationNotification log entry written"); -- cgit 1.2.3-korg