diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-05-06 06:31:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-05-06 06:31:38 +0000 |
commit | 292aa06f9fc6a48652411087b4fc34b9ab728f2b (patch) | |
tree | 1c17b1a679dd40fa8f2e5e87f6932db8e44cc038 /ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models | |
parent | b395e82cedb969d392fd4a1a2b13cfa8cf64cce7 (diff) | |
parent | 944c707bcd818e3581acab1c100710b218fb3c51 (diff) |
Merge "ORAN Alignment - initial config updates and PM data updates for SON usecase"
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models')
5 files changed, 163 insertions, 3 deletions
diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java index 11e8019..ed32bf3 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java @@ -25,6 +25,8 @@ import java.util.List; public class GetNeighborList { private String nodeId; + private List<NRCellCU> CellsWithNoHo; + private List<NRCellCU> CellsWithHo; private List<CellDetails> cellsWithNoHo; private List<CellDetails> cellsWithHo; @@ -70,4 +72,19 @@ public class GetNeighborList { this.cellsWithHo = cellsWithHo; } + public List<NRCellCU> getCUCellsWithNoHo() { + return CellsWithNoHo; + } + + public void setCUCellsWithNoHo(List<NRCellCU> CellsWithNoHo) { + this.CellsWithNoHo = CellsWithNoHo; + } + + public List<NRCellCU> getCUCellsWithHo() { + return CellsWithHo; + } + + public void setCUCellsWithHo(List<NRCellCU> CellsWithHo) { + this.CellsWithHo = CellsWithHo; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java index 2d49f63..af552e3 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Ran Simulator Controller * ================================================================================ - * Copyright (C) 2020-2021 Wipro Limited. + * Copyright (C) 2020-2022 Wipro Limited. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,10 @@ package org.onap.ransim.rest.api.models; import java.io.Serializable; +import org.apache.log4j.Logger; import java.util.List; +import java.util.ArrayList; +import org.onap.ransim.rest.api.controller.RansimController; import javax.persistence.CascadeType; import javax.persistence.CollectionTable; @@ -37,7 +40,7 @@ import javax.persistence.Table; @Entity @Table(name = "NRCELLCU") -public class NRCellCU implements Serializable { +public class NRCellCU implements Serializable, Comparable<NRCellCU> { private static final long serialVersionUID = 1L; @Id @Column(name = "CELLLOCALID") @@ -47,6 +50,9 @@ public class NRCellCU implements Serializable { @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nrcellcu_celllocalid")) private List<PLMNInfo> pLMNInfoList; + @Column(name = "NRCELLRELATIONLIST") + @OneToMany(mappedBy = "cellLocalId", cascade = CascadeType.ALL) + private List<NRCellRelation> nrCellRelationsList; @ManyToOne @JoinColumn(name = "gnbcuname") private GNBCUCPFunction gNBCUCPFunction; @@ -58,6 +64,11 @@ public class NRCellCU implements Serializable { public void setCellLocalId(Integer cellLocalId) { this.cellLocalId = cellLocalId; } + public List<NRCellRelation> getNrCellRelationsList() { return nrCellRelationsList; } + + public void setNrCellRelationsList(List<NRCellRelation> nrCellRelationsList) { + this.nrCellRelationsList = nrCellRelationsList; + } public List<PLMNInfo> getpLMNInfoList() { return pLMNInfoList; @@ -83,4 +94,20 @@ public class NRCellCU implements Serializable { this.resourceType = resourceType; } + static Logger log = Logger.getLogger(RansimController.class.getName()); + + public void display() { + + List<NRCellRelation> iterator = new ArrayList<>(nrCellRelationsList); + for (int ii = 0; ii < iterator.size(); ii++) { + log.info("neighbors NeighborList: " + iterator.get(ii).getCellLocalId()+ " " + + iterator.get(ii).getIdNRCellRelation() + " " + iterator.get(ii).getisHOAllowed()); + } + } + + @Override + public int compareTo(NRCellCU cd) { + return this.getCellLocalId().compareTo(cd.getCellLocalId()); + } + } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java index 4bd9f1c..0172049 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java @@ -48,6 +48,12 @@ public class NRCellDU implements Serializable { private String administrativeState; @Column(name = "CELLSTATE") private String cellState; + @Column(name = "LATITUDE") + private Double latitude; + @Column(name = "LONGITUDE") + private Double longitude; + @Column(name = "NETWORKID") + private String networkId; @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nrcelldu_celllocalid")) private List<PLMNInfo> pLMNInfoList; @@ -63,6 +69,30 @@ public class NRCellDU implements Serializable { @Column(name = "prb") private Integer prbs; + public Double getLatitude() { + return latitude; + } + + public void setLatitude(Double latitude) { + this.latitude = latitude; + } + + public Double getLongitude() { + return longitude; + } + + public void setLongitude(Double longitude) { + this.longitude = longitude; + } + + public String getNetworkId() { + return networkId; + } + + public void setNetworkId(String networkId) { + this.networkId = networkId; + } + public Integer getCellLocalId() { return cellLocalId; } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java new file mode 100644 index 0000000..e825b04 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java @@ -0,0 +1,74 @@ +/* + ** ============LICENSE_START======================================================= + ** Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + +package org.onap.ransim.rest.api.models; + +import java.io.Serializable; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.CollectionTable; +import javax.persistence.Column; +import javax.persistence.ElementCollection; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; + +@Entity +@Table(name = "NRCELLRELATION") +public class NRCellRelation implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer sno; + + @Column(name = "IDNRCELLRELATION") + private Integer idNRCellRelation; + @Column(name = "nRTCI") + private Integer nRTCI; + @Column(name = "ISHOALLOWED") + private boolean isHOAllowed; + @ManyToOne + @JoinColumn(name = "celllocalid", referencedColumnName="celllocalid") + private NRCellCU cellLocalId; + + public NRCellCU getCellLocalId() { return cellLocalId; } + + public void setCellLocalId(NRCellCU cellLocalId) { this.cellLocalId = cellLocalId; } + + public Integer getIdNRCellRelation() { return idNRCellRelation; } + + public void setIdNRCellRelation(Integer idNRCellRelation) { this.idNRCellRelation = idNRCellRelation; } + + public Integer getnRTCI() { return nRTCI; } + + public void setnRTCI(Integer nRTCI) { this.nRTCI = nRTCI; } + + public boolean getisHOAllowed() { return isHOAllowed; } + + public void setisHOAllowed(boolean isHOAllowed) { this.isHOAllowed = isHOAllowed; } +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java index a33f616..3c56e26 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java @@ -21,7 +21,8 @@ package org.onap.ransim.rest.api.models; import java.util.Set; - +import java.util.Collection; +import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; @@ -44,6 +45,10 @@ public class NetconfServers { @OneToMany(targetEntity = CellDetails.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL) private Set<CellDetails> cells; + @OneToMany(targetEntity = NRCellCU.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL) + private Set<NRCellCU> cellCUList; + + public NetconfServers() { } @@ -96,4 +101,11 @@ public class NetconfServers { this.cells = cells; } + public Set<NRCellCU> getCellList() { + return cellCUList; + } + + public void setCellList(Set<NRCellCU> cellCUList) { + this.cellCUList = cellCUList; + } } |