diff options
author | malar <malarvizhi.44@wipro.com> | 2021-09-01 15:09:10 +0000 |
---|---|---|
committer | malar <malarvizhi.44@wipro.com> | 2021-09-03 04:35:44 +0000 |
commit | ee82f3dc04665e8b86ce5c728a34f9701143e518 (patch) | |
tree | b595a59cdf081320ce19b738b2fde37e92d759a0 /src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java | |
parent | afb7bc0c146474e2492d29a70fa1c82689e8e3ed (diff) |
Refactored code for standardizing configuration retrieval through common method2.1.4
Issue-ID: DCAEGEN2-2905
Signed-off-by: Malarvizhi Paramasivam <malarvizhi.44@wipro.com>
Change-Id: Id268e066093d63f93ba3679831f2875e4afbaada
Diffstat (limited to 'src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java')
-rw-r--r-- | src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java b/src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java index 1787b3f..5a2eaa5 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/child/PnfUtils.java @@ -45,6 +45,7 @@ import org.slf4j.Logger; public class PnfUtils { private static final Logger log = org.slf4j.LoggerFactory.getLogger(ChildThreadUtils.class); + Configuration config = Configuration.getInstance(); /** * get pnfs. @@ -64,7 +65,7 @@ public class PnfUtils { if (cellInfo.isPresent()) { pnfName = cellInfo.get().getPnfName(); } else { - pnfName = ConfigurationClient.configClient(Configuration.getInstance().getConfigClientType()).getPnfName(cellId); + pnfName = config.getConfigurationClient().getPnfName(cellId); cellInfoRepository.save(new CellInfo(cellId, pnfName)); } if (pnfs.containsKey(pnfName)) { @@ -91,7 +92,7 @@ public class PnfUtils { List<String> removeableNeighbors; for (AnrSolutions anrSolution : anrSolutions) { String cellId = anrSolution.getCellId(); - String pnfName = ConfigurationClient.configClient(Configuration.getInstance().getConfigClientType()).getPnfName(cellId); + String pnfName = config.getConfigurationClient().getPnfName(cellId); removeableNeighbors = anrSolution.getRemoveableNeighbors(); Map<String, List<String>> cellRemNeighborsPair = new HashMap<>(); cellRemNeighborsPair.put(cellId, removeableNeighbors); |