From c46e67188dc3e315ca6070120fbd11be51d58080 Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Tue, 14 Mar 2023 12:21:18 +0530 Subject: javax to jakarta and refactoring change log level from INFO to DEBUG and Java17 changes Issue-ID: CCSDK-3864 Signed-off-by: Ravi Pendurty Change-Id: I60247aeea3d8daa70c8e17af8cbf694b86dd6946 Signed-off-by: Ravi Pendurty --- .../devicemanager/types/VESNotificationFieldsPOJO.java | 2 +- .../devicemonitor/impl/DeviceMonitorImpl.java | 4 ++-- .../devicemonitor/impl/DeviceMonitorTask.java | 10 +++++----- .../impl/DeviceManagerApiServiceImpl.java | 18 +++++++++--------- .../sdnr/wt/devicemanager/impl/DeviceManagerImpl.java | 2 +- .../impl/DeviceManagerNetconfConnectHandler.java | 10 +++++----- .../impl/util/NotificationProxyParserImpl.java | 4 ++-- .../impl/VESCollectorServiceImpl.java | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) (limited to 'sdnr/wt/devicemanager-core') diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/VESNotificationFieldsPOJO.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/VESNotificationFieldsPOJO.java index 6beb04751..dd5d90ec3 100644 --- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/VESNotificationFieldsPOJO.java +++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/VESNotificationFieldsPOJO.java @@ -40,7 +40,7 @@ public class VESNotificationFieldsPOJO { private String changeContact = ""; private String changeIdentifier = ""; private String changeType = ""; - @JsonIgnore +// @JsonIgnore private String newState = ""; @JsonIgnore private String oldState = ""; diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java index 55e223c79..b6d9d0822 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java @@ -249,10 +249,10 @@ public class DeviceMonitorImpl implements DeviceMonitor, IConfigChangedListener LOG.debug("Register for monitoring {} {}", mountPointNodeName, mountPointNodeName.hashCode()); if (queue.containsKey(mountPointNodeName)) { - LOG.info("Monitoring task exists"); + LOG.debug("Monitoring task exists"); task = queue.get(mountPointNodeName); } else { - LOG.info("Do start of DeviceMonitor task"); + LOG.debug("Do start of DeviceMonitor task"); //Runnable task = new PerformanceManagerTask(queue, databaseService); task = new DeviceMonitorTask(mountPointNodeName, this.odlEventListener); queue.put(mountPointNodeName, task); diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorTask.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorTask.java index ea5f7da87..139e1cd47 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorTask.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorTask.java @@ -116,11 +116,11 @@ public class DeviceMonitorTask implements Runnable { * @param scheduler for all the threads. */ public void start(ScheduledExecutorService scheduler) { - LOG.info("{} {} DeviceMonitor task to create", LOGMARKER, tickCounter); + LOG.debug("{} {} DeviceMonitor task to create", LOGMARKER, tickCounter); if (taskHandle == null) { startDisconnectSupervision(); taskHandle = scheduler.scheduleAtFixedRate(this, 0, 120, TimeUnit.SECONDS); - LOG.info("DeviceMonitor task scheduled"); + LOG.debug("DeviceMonitor task scheduled"); } else { LOG.error("{} {} Task already running.", LOGMARKER, tickCounter); } @@ -133,7 +133,7 @@ public class DeviceMonitorTask implements Runnable { */ public void deviceConnectIndication(@Nullable DeviceMonitoredNe neParam) { - LOG.info("{} {} Connect {} and stop.", LOGMARKER, tickCounter, mountPointName); + LOG.debug("{} {} Connect {} and stop.", LOGMARKER, tickCounter, mountPointName); clear(DeviceMonitorProblems.connectionLossOAM); synchronized (lockNe) { this.ne = neParam; @@ -147,7 +147,7 @@ public class DeviceMonitorTask implements Runnable { */ public void deviceDisconnectIndication() { - LOG.info("{} {} Disconnect {} and start.", LOGMARKER, tickCounter, mountPointName); + LOG.debug("{} {} Disconnect {} and start.", LOGMARKER, tickCounter, mountPointName); clear(DeviceMonitorProblems.connectionLossOAM); synchronized (lockNe) { this.ne = null; @@ -168,7 +168,7 @@ public class DeviceMonitorTask implements Runnable { //Cancel the task if (this.taskHandle != null) { this.taskHandle.cancel(false); - LOG.info("{} {} DeviceMonitor task canceled for {}", LOGMARKER, tickCounter, mountPointName); + LOG.debug("{} {} DeviceMonitor task canceled for {}", LOGMARKER, tickCounter, mountPointName); } else { LOG.error("{} {} Task already stopped", LOGMARKER, tickCounter); } diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerApiServiceImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerApiServiceImpl.java index 4d5823a00..deec74828 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerApiServiceImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerApiServiceImpl.java @@ -106,7 +106,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl // For casablanca version no input was generated. public ListenableFuture> getRequiredNetworkElementKeys() { - LOG.info("RPC Request: getRequiredNetworkElementKeys"); + LOG.debug("RPC Request: getRequiredNetworkElementKeys"); RpcResultBuilder result; try { GetRequiredNetworkElementKeysOutputBuilder outputBuilder = @@ -123,7 +123,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl public ListenableFuture> showRequiredNetworkElement( ShowRequiredNetworkElementInput input) { - LOG.info("RPC Request: showRequiredNetworkElement input: {}", input.getMountpointName()); + LOG.debug("RPC Request: showRequiredNetworkElement input: {}", input.getMountpointName()); RpcResultBuilder result; try { @@ -140,7 +140,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> setMaintenanceMode(SetMaintenanceModeInput input) { - LOG.info("RPC Request: setMaintenanceMode input: {}", input.getNodeId()); + LOG.debug("RPC Request: setMaintenanceMode input: {}", input.getNodeId()); RpcResultBuilder result; try { @@ -158,7 +158,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> getMaintenanceMode(GetMaintenanceModeInput input) { - LOG.info("RPC Request: getMaintenanceMode input: {}", input.getMountpointName()); + LOG.debug("RPC Request: getMaintenanceMode input: {}", input.getMountpointName()); @NonNull RpcResultBuilder result; try { @@ -174,7 +174,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> testMaintenanceMode(TestMaintenanceModeInput input) { - LOG.info("RPC Request: getMaintenanceMode input: {}", input.getMountpointName()); + LOG.debug("RPC Request: getMaintenanceMode input: {}", input.getMountpointName()); RpcResultBuilder result; try { @@ -192,7 +192,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> clearCurrentFaultByNodename( ClearCurrentFaultByNodenameInput input) { - LOG.info("RPC Request: clearNetworkElementAlarms input: {}", input.getNodenames()); + LOG.debug("RPC Request: clearNetworkElementAlarms input: {}", input.getNodenames()); RpcResultBuilder result; try { if (this.resyncCallbackListener != null) { @@ -215,7 +215,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> pushFaultNotification( PushFaultNotificationInput input) { - LOG.info("RPC Received fault notification {}", input); + LOG.debug("RPC Received fault notification {}", input); RpcResultBuilder result; try { pushNotificationsListener.pushFaultNotification(input); @@ -229,7 +229,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> pushCmNotification(PushCmNotificationInput input) { - LOG.info("RPC Received CM notification {}", input); + LOG.debug("RPC Received CM notification {}", input); RpcResultBuilder result; try { pushNotificationsListener.pushCMNotification(input); @@ -244,7 +244,7 @@ public class DeviceManagerApiServiceImpl implements DevicemanagerService, AutoCl @Override public ListenableFuture> pushAttributeChangeNotification( PushAttributeChangeNotificationInput input) { - LOG.info("RPC Received change notification {}", input); + LOG.debug("RPC Received change notification {}", input); RpcResultBuilder result; try { pushNotificationsListener.pushAttributeChangeNotification(input); diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java index 361356217..881f6b415 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java @@ -276,7 +276,7 @@ public class DeviceManagerImpl implements NetconfNetworkElementService, DeviceMa @Override public @NonNull FactoryRegistration registerBindingNetworkElementFactory( @NonNull final L factory) { - LOG.info("Factory registration {}", factory.getClass().getName()); + LOG.debug("Factory registration {}", factory.getClass().getName()); factoryList.add(factory); factory.init(getServiceProvider()); diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerNetconfConnectHandler.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerNetconfConnectHandler.java index 4b4d1eded..8c0fe57c8 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerNetconfConnectHandler.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerNetconfConnectHandler.java @@ -72,9 +72,9 @@ public class DeviceManagerNetconfConnectHandler extends DeviceManagerNetconfNotC //@NonNull NodeId nNodeId, @NonNull NetconfNode netconfNode, //@NonNull MountPoint mountPoint, @NonNull DataBroker netconfNodeDataBroker String mountPointNodeName = acessor.getNodeId().getValue(); - LOG.info("onEnterConnected - starting Event listener on Netconf for mountpoint {}", mountPointNodeName); + LOG.debug("onEnterConnected - starting Event listener on Netconf for mountpoint {}", mountPointNodeName); - LOG.info("Master mountpoint {}", mountPointNodeName); + LOG.debug("Master mountpoint {}", mountPointNodeName); // It is master for mountpoint and all data are available. // Make sure that specific mountPointNodeName is handled only once. @@ -103,7 +103,7 @@ public class DeviceManagerNetconfConnectHandler extends DeviceManagerNetconfNotC @Override public void onLeaveConnected(@NonNull NodeId nNodeId, @NonNull Optional optionalNetconfNode) { - LOG.info("onLeaveConnected {}", nNodeId); + LOG.debug("onLeaveConnected {}", nNodeId); String mountPointNodeName = nNodeId.getValue(); if (optionalNetconfNode.isPresent()) { @@ -156,7 +156,7 @@ public class DeviceManagerNetconfConnectHandler extends DeviceManagerNetconfNotC private void handleNeStartup(NodeId nodeId, NetworkElement inNe) { - LOG.info("NE Management for {} with {}", nodeId.getValue(), inNe.getClass().getName()); + LOG.debug("NE Management for {} with {}", nodeId.getValue(), inNe.getClass().getName()); NetworkElement result; synchronized (networkelementLock) { result = connectedNetworkElementRepresentations.put(nodeId.getValue(), inNe); @@ -177,7 +177,7 @@ public class DeviceManagerNetconfConnectHandler extends DeviceManagerNetconfNotC } private void sendUpdateNotification(NodeId nodeId, ConnectionStatus csts, NetconfNode nNode) { - LOG.info("update ConnectedState for device :: Name : {} ConnectionStatus {}", nodeId.getValue(), csts); + LOG.debug("update ConnectedState for device :: Name : {} ConnectionStatus {}", nodeId.getValue(), csts); if (isOdlEventListenerHandlerEnabled()) { getOdlEventListenerHandler().updateRegistration(nodeId, ConnectionStatus.class.getSimpleName(), csts != null ? csts.getName() : "null", nNode); diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/util/NotificationProxyParserImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/util/NotificationProxyParserImpl.java index 802c05d0c..e8f12f955 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/util/NotificationProxyParserImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/util/NotificationProxyParserImpl.java @@ -333,10 +333,10 @@ public class NotificationProxyParserImpl implements NotificationProxyParser { Instant time; if (notification instanceof EventInstantAware) { // If notification class extends/implements the EventInstantAware time = ((EventInstantAware) notification).eventInstant(); - log.info("Event time {}", time); + log.debug("Event time {}", time); } else { time = Instant.now(); - log.info("Defaulting to actual time of processing the notification - {}", time); + log.debug("Defaulting to actual time of processing the notification - {}", time); } return time; } diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java index f1538fbff..945d42550 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java @@ -99,7 +99,7 @@ public class VESCollectorServiceImpl implements VESCollectorService, IConfigChan @Override public boolean publishVESMessage(VESMessage message) { - LOG.info("In VESClient - {} ", message.getMessage()); + LOG.debug("In VESClient - {} ", message.getMessage()); BaseHTTPResponse response; try { String uri = "eventListener" + "/" + getConfig().getVersion(); @@ -162,7 +162,7 @@ public class VESCollectorServiceImpl implements VESCollectorService, IConfigChan Map outerEvent = new HashMap(); outerEvent.put("event", innerEvent); - LOG.info("in generateVESEvent - {}", objMapper.writeValueAsString(outerEvent)); + LOG.debug("In generateVESEvent - {}", objMapper.writeValueAsString(outerEvent)); return new VESMessage(objMapper.writeValueAsString(outerEvent)); } -- cgit 1.2.3-korg