diff options
author | malar <malarvizhi.44@wipro.com> | 2021-10-14 12:58:18 +0000 |
---|---|---|
committer | malar <malarvizhi.44@wipro.com> | 2021-10-20 11:27:39 +0000 |
commit | 9f1c4f29af6640cccaad8fec941fa58fcd833dcd (patch) | |
tree | 29ee8143f8aa02d0e0dc3a3e275facdbc0e993fa | |
parent | 29f3dc9cabe5b6a6b2cfddc8a7a24d7a3ff98b4f (diff) |
Fix bug in filtering new FM notification
Issue-ID: DCAEGEN2-2943
Signed-off-by: Malarvizhi Paramasivam <malarvizhi.44@wipro.com>
Change-Id: Ibd0a06695bd14267667f57fe57c3e36b41fb2e12
11 files changed, 35 insertions, 23 deletions
diff --git a/Changelog.md b/Changelog.md index 02649a6..5a0864b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.1.5] - 2021/10/14 + - [DCAEGEN2-2943](https://jira.onap.org/browse/DCAEGEN2-2943) - Fix bug in filtering new FM notification + ## [2.1.4] - 2021/06/21 - [DCAEGEN2-2711](https://jira.onap.org/browse/DCAEGEN2-2711) - Update sdk version to load policies from a file mounted by policy sidecar container - [DCAEGEN2-2809](https://jira.onap.org/browse/DCAEGEN2-2809) - Remove security vulnerabilities diff --git a/dpo/spec/sonhandler-componentspec.json b/dpo/spec/sonhandler-componentspec.json index 8899dfc..4133c73 100644 --- a/dpo/spec/sonhandler-componentspec.json +++ b/dpo/spec/sonhandler-componentspec.json @@ -274,7 +274,7 @@ }, { "name": "sonhandler.get.cell.data.url", - "value": "execute/cps-ran-schema/get-cell-data", + "value": "execute/cps-ran-schemaset/get-cell-list", "description": "Cps get cell data url", "sourced_at_deployment": false, "policy_editable": false, @@ -282,7 +282,7 @@ }, { "name": "sonhandler.get.nbr.list.url", - "value": "execute/cps-ran-schema/get-nbr-list", + "value": "execute/cps-ran-schemaset/get-nbr-list", "description": "Cps get nbr list url", "sourced_at_deployment": false, "policy_editable": false, @@ -290,7 +290,7 @@ }, { "name": "sonhandler.get.pci.url", - "value": "execute/cps-ran-schema/get-pci", + "value": "execute/ran-network-schemaset/get-pci", "description": "Cps get pci url", "sourced_at_deployment": false, "policy_editable": false, @@ -298,7 +298,7 @@ }, { "name": "sonhandler.get.pnf.url", - "value": "execute/cps-ran-schema/get-pnf", + "value": "execute/ran-network-schemaset/get-pnf", "description": "Cps get pnf url", "sourced_at_deployment": false, "policy_editable": false, @@ -27,7 +27,7 @@ <groupId>org.onap.dcaegen2.services.son-handler</groupId> <artifactId>son-handler</artifactId> <name>dcaegen2-services-son-handler</name> - <version>2.1.4-SNAPSHOT</version> + <version>2.1.5-SNAPSHOT</version> <!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.4.RELEASE</version> </parent --> diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java b/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java index d0a8702..2ddeaa6 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java @@ -468,6 +468,7 @@ public class Configuration { public ConfigInterface getConfigurationClient() { ConfigInterface conf = ConfigurationClient.configClient(Configuration.getInstance().getConfigClientType()); + log.info("ConfigurationClient obj is : " + conf); return conf; } diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/EventHandler.java b/src/main/java/org/onap/dcaegen2/services/sonhms/EventHandler.java index 64d8593..f551a4a 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/EventHandler.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/EventHandler.java @@ -98,8 +98,8 @@ public class EventHandler { networkId = faultEvent.getEvent().getFaultFields().getAlarmAdditionalInformation().getNetworkId(); ArrayList<Integer> counts = new ArrayList<>(); - counts.add(faultEvent.getEvent().getFaultFields().getEventCategory().contains("Collision")?1:0); - counts.add(faultEvent.getEvent().getFaultFields().getEventCategory().contains("Confusion")?1:0); + counts.add(faultEvent.getEvent().getFaultFields().getEventCategory().contains("PCICollision")?1:0); + counts.add(faultEvent.getEvent().getFaultFields().getEventCategory().contains("PCIConfusion")?1:0); collisionConfusionMap.put(cellId, counts); } FaultNotificationtoClusterMapping faultNotificationtoClusterMapping = clusterUtils diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponent.java b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponent.java index 9f889da..8b97359 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponent.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultNotificationComponent.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * son-handler * ================================================================================ - * Copyright (C) 2019-2020 Wipro Limited. + * Copyright (C) 2019-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,7 @@ public class FaultNotificationComponent { .getBean(FaultNotificationsRepository.class); String notificationString = faultNotificationsRepository.getFaultNotificationFromQueue(); log.info("get fault notifications method"); + log.info("Notification String " + notificationString); if (notificationString == null) { return Either.right(404); } diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/MainThread.java b/src/main/java/org/onap/dcaegen2/services/sonhms/MainThread.java index a434b31..ebbfb34 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/MainThread.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/MainThread.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * son-handler * ================================================================================ - * Copyright (C) 2019-2020 Wipro Limited. + * Copyright (C) 2019-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -161,12 +161,9 @@ public class MainThread implements Runnable { if (fmNotification.getEvent().getFaultFields().getSpecificProblem() .equals("Optimised PCI")) { log.info("PCI problem cleared for :" + fmNotification); - } else if ((fmNotification.getEvent().getFaultFields().getSpecificProblem() - .equals("Collision")) - || (fmNotification.getEvent().getFaultFields().getSpecificProblem() - .equals("Confusion")) - || (fmNotification.getEvent().getFaultFields().getSpecificProblem() - .equals("CollisionAndConfusion"))) { + } else if ((fmNotification.getEvent().getFaultFields().getAlarmCondition() + .equalsIgnoreCase("RanPciCollisionConfusionOccurred"))) + { faultCellId = fmNotification.getEvent().getCommonEventHeader().getSourceName(); bufferedFmNotificationCells.put(faultCellId, fmNotification); log.info("Buffered FM cell {}", faultCellId); diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/ConfigurationClient.java b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/ConfigurationClient.java index 3430469..e4ecda8 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/ConfigurationClient.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/ConfigurationClient.java @@ -21,6 +21,9 @@ package org.onap.dcaegen2.services.sonhms.restclient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Class with method to get the Client type depending on the * configuration client specified. @@ -30,6 +33,8 @@ package org.onap.dcaegen2.services.sonhms.restclient; public class ConfigurationClient { + private static Logger log = LoggerFactory.getLogger(ConfigurationClient.class); + /** * Method to get the Client type. * @@ -39,12 +44,16 @@ public class ConfigurationClient */ public static ConfigInterface configClient(String config_name) { - if (config_name == null || config_name.isEmpty()) - return null; - if ("ConfigDB".equals(config_name)) { + if (config_name == null || config_name.isEmpty()){ + log.info("Returning null from ConfigClient class"); + return null; + } + if ("ConfigDB".equalsIgnoreCase(config_name)) { + log.info("Creating SdnrClient object"); return new SdnrRestClient(); } - else if ("CPS".equals(config_name)) { + if ("CPS".equalsIgnoreCase(config_name)) { + log.info("Creating CPSClient object"); return new CpsClient(); } return null; diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/CpsClient.java b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/CpsClient.java index 20b95c7..f19c9e8 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/CpsClient.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/CpsClient.java @@ -141,9 +141,9 @@ public class CpsClient extends ConfigInterface { new ParameterizedTypeReference<String>() { }); if (response == null) { - throw new CpsNotFoundException("Cannot reach Config DB"); + throw new CpsNotFoundException("Cannot reach CPS"); } return response.getBody(); } -}
\ No newline at end of file +} diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtils.java b/src/main/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtils.java index 7ac3b9e..c358ef8 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtils.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/utils/ClusterUtils.java @@ -304,8 +304,9 @@ public class ClusterUtils { * Find cluster Map. */ public Map<CellPciPair, ArrayList<CellPciPair>> findClusterMap(String cellId) throws ConfigDbNotFoundException, CpsNotFoundException { - log.info("indide clusterMap"); + log.info("inside clusterMap"); int phyCellId = config.getConfigurationClient().getPci(cellId); + log.info("phyCellId of clustermap is" + phyCellId); CellPciPair main = new CellPciPair(); main.setCellId(cellId); main.setPhysicalCellId(phyCellId); diff --git a/version.properties b/version.properties index a1b17e4..1d2b98e 100644 --- a/version.properties +++ b/version.properties @@ -20,7 +20,7 @@ ############################################################################### major=2 minor=1 -patch=4 +patch=5 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT |