diff options
author | vvarvate <vv00489503@techmahindra.com> | 2022-09-06 18:34:41 +0530 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2022-10-13 22:01:12 +0000 |
commit | 6e2a9f94f63c57786fd9b6d4ba5f53cb66f7f5e2 (patch) | |
tree | 88ec82e291de14861ddc39e7b7f900a272b3e96f /ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java | |
parent | b5050799014b831a89d09078ce09829458da9339 (diff) |
RAN-Sim Updates for SON Use Case Kohn Release
Enhancement of RAN-Sim Controller to support A1-based action
Issue-ID: INT-2130
Signed-off-by: vvarvate <vv00489503@techmahindra.com>
Change-Id: Ibeeb93a97582ca3712af11e2204a46c6a66dcb81
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java')
-rw-r--r-- | ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java index 8a6713b..6c607ea 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java @@ -33,8 +33,14 @@ import org.onap.ransim.rest.api.models.NRCellCU; import org.onap.ransim.rest.api.models.NRCellDU; import org.onap.ransim.rest.api.models.NRCellRelation; import org.onap.ransim.rest.api.models.OperationLog; +import org.onap.ransim.rest.api.models.GNBCUCPFunction; +import org.onap.ransim.rest.api.models.GNBCUUPFunction; +import org.onap.ransim.rest.api.models.GNBDUFunction; import org.onap.ransim.rest.api.repository.CellDetailsRepo; import org.onap.ransim.rest.api.repository.CellNeighborRepo; +import org.onap.ransim.rest.api.repository.GNBCUCPRepository; +import org.onap.ransim.rest.api.repository.GNBCUUPRepository; +import org.onap.ransim.rest.api.repository.GNBDURepository; import org.onap.ransim.rest.api.repository.NRCellCURepository; import org.onap.ransim.rest.api.repository.NRCellDURepository; import org.onap.ransim.rest.api.repository.NRCellRelationRepository; @@ -72,6 +78,15 @@ public class RansimRepositoryService { @Autowired OperationLogRepo operationLogRepo; + + @Autowired + GNBCUCPRepository gnbcucpfuncRepo; + + @Autowired + GNBCUUPRepository gnbcuupfuncRepo; + + @Autowired + GNBDURepository gnbdufuncRepo; /** * Method to retrieve cell details @@ -383,4 +398,42 @@ public class RansimRepositoryService { public void mergeOperationLog(OperationLog opLog) { operationLogRepo.save(opLog); } + + public Integer getNeartricfromCUCPmodel(String serverId) { + // TODO Auto-generated method stub + Optional<GNBCUCPFunction> cucp = gnbcucpfuncRepo.findById(serverId); + GNBCUCPFunction cucpdetails = null; + if (cucp.isPresent()) { + cucpdetails = cucp.get(); + return cucpdetails.getNearRTRIC().getNearRTRICId(); + }else + return null; + + } + + public Integer getNeartricfromCUUPmodel(String serverId) { + // TODO Auto-generated method stub + Optional<GNBCUUPFunction> cuup = gnbcuupfuncRepo.findById(Integer.getInteger(serverId)); + GNBCUUPFunction cuupdetails = null; + if (cuup.isPresent()) { + cuupdetails = cuup.get(); + return cuupdetails.getNearRTRIC().getNearRTRICId(); + }else + return null; + } + + public Integer getNeartricfromDUmodel(String serverId) { + // TODO Auto-generated method stub + + + Optional<GNBDUFunction> du = gnbdufuncRepo.findById(Integer.getInteger(serverId)); + GNBDUFunction dudetails = null; + if (du.isPresent()) { + dudetails = du.get(); + return dudetails.getNearRTRIC().getNearRTRICId(); + }else + return null; + } + + } |