From 43e39ceab8e35a0a54ae72252b46491f362a0749 Mon Sep 17 00:00:00 2001 From: Niranjana Date: Tue, 16 Mar 2021 13:30:55 +0000 Subject: Add onap license Issue-ID: INT-1885 Signed-off-by: Niranjana Change-Id: I8df6fd96301e6aa6c46777bfdfcc8c1e9d16366b --- ransim/docker/config/db/ransim_schema.sql | 1 - ransim/ransimctrlr/RANSIM-CTRLR/pom.xml | 161 +++---- .../src/main/java/org/onap/ransim/Application.java | 20 + .../main/java/org/onap/ransim/RansimDbConfig.java | 20 + .../java/org/onap/ransim/ServletInitializer.java | 20 + .../org/onap/ransim/netconf/NetconfClient.java | 422 ++++++++-------- .../ransim/rest/api/controller/FileController.java | 1 + .../api/controller/RANSliceConfigController.java | 130 ++--- .../rest/api/exceptions/RansimException.java | 74 +-- .../ransim/rest/api/handler/RansimPciHandler.java | 4 +- .../rest/api/handler/RansimSlicingHandler.java | 530 ++++++++++----------- .../onap/ransim/rest/api/models/ConfigData.java | 48 +- .../ransim/rest/api/models/GNBCUCPFunction.java | 58 ++- .../ransim/rest/api/models/GNBCUUPFunction.java | 56 ++- .../onap/ransim/rest/api/models/GNBDUFunction.java | 60 ++- .../org/onap/ransim/rest/api/models/NRCellCU.java | 44 +- .../org/onap/ransim/rest/api/models/NRCellDU.java | 29 +- .../onap/ransim/rest/api/models/NSSAIConfig.java | 42 +- .../org/onap/ransim/rest/api/models/NearRTRIC.java | 66 ++- .../org/onap/ransim/rest/api/models/PLMNInfo.java | 26 +- .../onap/ransim/rest/api/models/PLMNInfoModel.java | 185 ++++--- .../onap/ransim/rest/api/models/RANSliceInfo.java | 67 ++- .../ransim/rest/api/models/RRMPolicyMember.java | 34 +- .../ransim/rest/api/models/RRMPolicyRatio.java | 221 +++++---- .../org/onap/ransim/rest/api/models/SNSSAI.java | 156 +++--- .../onap/ransim/rest/api/models/SliceProfile.java | 82 +++- .../org/onap/ransim/rest/api/models/TACells.java | 36 +- .../rest/api/repository/GNBCUCPRepository.java | 26 +- .../rest/api/repository/GNBCUUPRepository.java | 20 + .../rest/api/repository/GNBDURepository.java | 20 + .../rest/api/repository/NRCellCURepository.java | 20 + .../rest/api/repository/NRCellDURepository.java | 20 + .../rest/api/repository/NearRTRICRepository.java | 22 +- .../api/repository/RANInventoryRepository.java | 22 +- .../api/repository/RRMPolicyMemberRepository.java | 40 +- .../rest/api/repository/RRMPolicyRepository.java | 20 + .../api/repository/SliceProfileRepository.java | 20 + .../rest/api/repository/TACellRepository.java | 20 + .../rest/api/services/RANSliceConfigService.java | 34 +- .../rest/api/services/RansimRepositoryService.java | 20 + .../rest/api/services/SlicingPMDataGenerator.java | 227 ++++----- .../org/onap/ransim/rest/web/mapper/CellData.java | 27 +- .../ransim/rest/web/mapper/CellInputPayload.java | 27 +- .../rest/web/mapper/CellNbrInfoResponse.java | 20 + .../org/onap/ransim/rest/web/mapper/CellObj.java | 25 +- .../ransim/rest/web/mapper/CellPciValueObj.java | 23 +- .../org/onap/ransim/rest/web/mapper/ErrorData.java | 20 + .../onap/ransim/rest/web/mapper/GNBCUCPModel.java | 20 + .../onap/ransim/rest/web/mapper/GNBCUUPModel.java | 20 + .../onap/ransim/rest/web/mapper/GNBDUModel.java | 20 + .../onap/ransim/rest/web/mapper/NRCellCUModel.java | 20 + .../onap/ransim/rest/web/mapper/NRCellDUModel.java | 20 + .../ransim/rest/web/mapper/NSSAIConfigData.java | 22 +- .../org/onap/ransim/rest/web/mapper/NSSAIData.java | 22 +- .../ransim/rest/web/mapper/NbrCellsNetwork.java | 26 +- .../rest/web/mapper/NbrCellsNetworkResponse.java | 26 +- .../org/onap/ransim/rest/web/mapper/NbrList.java | 26 +- .../ransim/rest/web/mapper/NbrListResponse.java | 22 +- .../org/onap/ransim/rest/web/mapper/NbrObj.java | 25 +- .../ransim/rest/web/mapper/NearRTRICModel.java | 20 + .../onap/ransim/rest/web/mapper/PLMNInfoModel.java | 20 + .../ransim/rest/web/mapper/RANSliceInfoModel.java | 20 + .../rest/web/mapper/RRMPolicyMemberModel.java | 20 + .../rest/web/mapper/RRMPolicyRatioModel.java | 20 + .../org/onap/ransim/rest/web/mapper/Result.java | 22 +- .../ransim/rest/web/mapper/SliceProfileModel.java | 20 + .../onap/ransim/rest/xml/models/FileFooter.java | 51 +- .../onap/ransim/rest/xml/models/FileHeader.java | 134 +++--- .../onap/ransim/rest/xml/models/FileSender.java | 65 +-- .../ransim/rest/xml/models/GranularityPeriod.java | 76 +-- .../java/org/onap/ransim/rest/xml/models/Job.java | 49 +- .../ransim/rest/xml/models/ManagedElement.java | 86 ++-- .../onap/ransim/rest/xml/models/MeasCollec.java | 51 +- .../onap/ransim/rest/xml/models/MeasCollecEnd.java | 37 +- .../ransim/rest/xml/models/MeasCollecFile.java | 60 ++- .../org/onap/ransim/rest/xml/models/MeasData.java | 71 +-- .../org/onap/ransim/rest/xml/models/MeasInfo.java | 174 ++++--- .../onap/ransim/rest/xml/models/MeasResult.java | 33 +- .../org/onap/ransim/rest/xml/models/MeasType.java | 73 +-- .../org/onap/ransim/rest/xml/models/MeasValue.java | 92 ++-- .../ransim/rest/xml/models/ReportingPeriod.java | 50 +- .../org/onap/ransim/rest/xml/models/Result.java | 75 +-- .../onap/ransim/websocket/model/Attributes.java | 20 + .../onap/ransim/websocket/model/ConfigData.java | 20 + .../ransim/websocket/model/ConfigPLMNInfo.java | 20 + .../ransim/websocket/model/GNBCUUPFunction.java | 20 + .../onap/ransim/websocket/model/GNBDUFunction.java | 20 + .../org/onap/ransim/websocket/model/NRCellDU.java | 20 + .../org/onap/ransim/websocket/model/NearRTRIC.java | 22 +- .../org/onap/ransim/websocket/model/SNSSAI.java | 22 +- .../api/services/TestRANSliceConfigServices.java | 20 + .../src/test/resources/hibernate.properties | 29 -- 92 files changed, 3293 insertions(+), 1774 deletions(-) delete mode 100644 ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties diff --git a/ransim/docker/config/db/ransim_schema.sql b/ransim/docker/config/db/ransim_schema.sql index 2212253..c329432 100644 --- a/ransim/docker/config/db/ransim_schema.sql +++ b/ransim/docker/config/db/ransim_schema.sql @@ -366,4 +366,3 @@ INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrp INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15549,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',6); INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(14427,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',6); - diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/pom.xml b/ransim/ransimctrlr/RANSIM-CTRLR/pom.xml index 5973f1c..6f55e2c 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/pom.xml +++ b/ransim/ransimctrlr/RANSIM-CTRLR/pom.xml @@ -17,7 +17,8 @@ limitations under the License. ============LICENSE_END========================================================= --> - 4.0.0 @@ -56,56 +57,32 @@ jetty-maven-plugin ${jetty.version} - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - - true - **/org/openecomp/**/*.java - /google_checks.xml - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17,) - - check - - - - - - - - - - + + org.springframework.boot + spring-boot-maven-plugin + 2.3.1.RELEASE + + + + repackage + + + + - - org.apache.httpcomponents - httpclient - 4.5.6 - - - commons-logging - commons-logging - - - + + org.apache.httpcomponents + httpclient + 4.5.6 + + + commons-logging + commons-logging + + + org.eclipse.persistence javax.persistence @@ -198,17 +175,17 @@ org.powermock powermock-module-junit4 1.5.6 - + com.google.code.gson gson 2.6.2 - - org.onosproject - jnc - 1.0 - + + org.onosproject + jnc + 1.0 + io.springfox springfox-swagger2 @@ -233,65 +210,65 @@ - + org.springframework.boot spring-boot-starter-data-jpa ${springboot.version} - - - - org.springframework.boot - spring-boot-starter-logging - - + + + + org.springframework.boot + spring-boot-starter-logging + + org.springframework.boot spring-boot-starter-web ${springboot.version} - - - org.springframework.boot - spring-boot-starter-logging - - + + + org.springframework.boot + spring-boot-starter-logging + + org.springframework.boot spring-boot-starter-webflux ${springboot.version} - - - - org.springframework.boot - spring-boot-starter-logging - - + + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.modelmapper + modelmapper + 2.3.8 + + + com.googlecode.json-simple + json-simple + 1.1.1 - - org.modelmapper - modelmapper - 2.3.8 - - -com.googlecode.json-simple -json-simple -1.1.1 - - org.springframework.boot - spring-boot-dependencies - ${springboot.version} - pom - import - + org.springframework.boot + spring-boot-dependencies + ${springboot.version} + pom + import + - + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/Application.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/Application.java index 4cf6153..8ccb561 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/Application.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/Application.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; import org.springframework.boot.SpringApplication; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/RansimDbConfig.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/RansimDbConfig.java index 9f853cb..e47ae35 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/RansimDbConfig.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/RansimDbConfig.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; import java.util.HashMap; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/ServletInitializer.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/ServletInitializer.java index a808a3e..78f5d56 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/ServletInitializer.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/ServletInitializer.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; import org.springframework.boot.builder.SpringApplicationBuilder; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java index 2900265..7313b64 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.netconf; import java.io.IOException; @@ -17,210 +37,202 @@ import org.onap.ransim.rest.web.mapper.NRCellDUModel; public class NetconfClient { - static Logger log = Logger.getLogger(NetconfClient.class.getName()); - - private String emsUserName; - private Device device; - - public NetconfClient(Device device) { - this.device = device; - } - - public NetconfClient(String emsUserName, String username, String password, String serverName, String ip, int port) { - DeviceUser deviceUser = new DeviceUser(emsUserName, username, password); - this.emsUserName = emsUserName; - this.device = new Device(serverName, deviceUser, ip, port); - } - - public Element getInitialNodeSet(NearRTRICModel rtRicModel,String serverId) { - try { - - Element ranNetworkElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/ran-network"); - Element nearRTRICElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/NearRTRIC"); - Element idNearRTRICElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idNearRTRIC"); - idNearRTRICElement.setValue(rtRicModel.getNearRTRICId()); - Element sapElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/sAP"); - Element hostElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/host"); - hostElement.setValue("localhost"); - Element portElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/port"); - portElement.setValue("8080"); - sapElement.addChild(hostElement); - sapElement.addChild(portElement); - - for(GNBCUUPModel gNBCUUPModel:rtRicModel.getgNBCUUPList()) - { - if(gNBCUUPModel.getgNBCUUPId().toString().equals(serverId) || rtRicModel.getNearRTRICId().toString().equals(serverId)) - { - Element gNBCUUPFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/GNBCUUPFunction"); - Element idGNBCUUPFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idGNBCUUPFunction"); - idGNBCUUPFunctionElement.setValue(gNBCUUPModel.getgNBCUUPId().toString()); - Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/attributes"); - Element gnBIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBId"); - gnBIdElement.setValue(gNBCUUPModel.getgNBId()); - attributesElement.addChild(gnBIdElement); - attributesElement.addChild(sapElement); - gNBCUUPFunctionElement.addChild(idGNBCUUPFunctionElement); - gNBCUUPFunctionElement.addChild(attributesElement); - nearRTRICElement.addChild(gNBCUUPFunctionElement); - } - } - for(GNBCUCPModel gNBCUCPModel : rtRicModel.getgNBCUCPList()) - { - if(gNBCUCPModel.getgNBCUName().equals(serverId) || rtRicModel.getNearRTRICId().toString().equals(serverId)) - { - Element gNBCUCPFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/GNBCUCPFunction"); - Element idGNBCUCPFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idGNBCUCPFunction"); - idGNBCUCPFunctionElement.setValue(gNBCUCPModel.getgNBCUName()); - Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/attributes"); - Element gNBCUNameElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBCUName"); - gNBCUNameElement.setValue(gNBCUCPModel.getgNBCUName()); - Element gnBIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBId"); - gnBIdElement.setValue(gNBCUCPModel.getgNBId()); - Element gNBIdLengthElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBIdLength"); - gNBIdLengthElement.setValue(gNBCUCPModel.getgNBIdLength()); - attributesElement.addChild(gNBCUNameElement); - attributesElement.addChild(gnBIdElement); - attributesElement.addChild(gNBIdLengthElement); - attributesElement.addChild(sapElement); - for(NRCellCUModel nRCellCUModel:gNBCUCPModel.getCellCUList()) - { - Element nRCellCUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/NRCellCU"); - Element idNRCellCUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idNRCellCU"); - idNRCellCUElement.setValue(nRCellCUModel.getCellLocalId()); - Element nRCellattributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/attributes"); - Element cellLocalIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/cellLocalId"); - cellLocalIdElement.setValue(nRCellCUModel.getCellLocalId()); - nRCellattributesElement.addChild(cellLocalIdElement); - nRCellattributesElement.addChild(sapElement); - nRCellCUElement.addChild(idNRCellCUElement); - nRCellCUElement.addChild(nRCellattributesElement); - gNBCUCPFunctionElement.addChild(nRCellCUElement); - } - gNBCUCPFunctionElement.addChild(idGNBCUCPFunctionElement); - gNBCUCPFunctionElement.addChild(attributesElement); - nearRTRICElement.addChild(gNBCUCPFunctionElement); - } - } - for(GNBDUModel gNBDUModel:rtRicModel.getgNBDUList()) - { - if(gNBDUModel.getgNBDUId().toString().equals(serverId) || rtRicModel.getNearRTRICId().toString().equals(serverId)) - { - Element gNBDUFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/GNBDUFunction"); - Element idGNBDUFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idGNBDUFunction"); - idGNBDUFunctionElement.setValue(gNBDUModel.getgNBDUId()); - Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/attributes"); - Element gNBDUNameElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBDUName"); - gNBDUNameElement.setValue(gNBDUModel.getgNBDUName()); - Element gNBIdLengthElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBIdLength"); - gNBIdLengthElement.setValue(gNBDUModel.getgNBIdLength()); - Element gNBDUIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/gNBDUId"); - gNBDUIdElement.setValue(gNBDUModel.getgNBDUId()); - attributesElement.addChild(gNBIdLengthElement); - attributesElement.addChild(gNBDUNameElement); - attributesElement.addChild(gNBDUIdElement); - attributesElement.addChild(sapElement); - for(NRCellDUModel nRCellDUModel : gNBDUModel.getCellDUList()) - { - Element nRCellDUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/NRCellDU"); - Element idNRCellDUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/idNRCellDU"); - idNRCellDUElement.setValue(nRCellDUModel.getCellLocalId()); - Element nRCellattributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/attributes"); - Element cellLocalIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/cellLocalId"); - cellLocalIdElement.setValue(nRCellDUModel.getCellLocalId()); - Element nRSectorCarrierRefElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/nRSectorCarrierRef"); - nRSectorCarrierRefElement.setValue("OU=Sales"); - Element administrativeStateElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/administrativeState"); - administrativeStateElement.setValue(nRCellDUModel.getAdministrativeState()); - Element nRPCIElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/nRPCI"); - nRPCIElement.setValue(nRCellDUModel.getnRPCI()); - Element nRTACElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", - "/nRTAC"); - nRTACElement.setValue(nRCellDUModel.getnRTAC()); - nRCellattributesElement.addChild(cellLocalIdElement); - nRCellattributesElement.addChild(sapElement); - nRCellattributesElement.addChild(nRSectorCarrierRefElement); - nRCellattributesElement.addChild(administrativeStateElement); - nRCellattributesElement.addChild(nRPCIElement); - nRCellattributesElement.addChild(nRTACElement); - nRCellDUElement.addChild(idNRCellDUElement); - nRCellDUElement.addChild(nRCellattributesElement); - gNBDUFunctionElement.addChild(nRCellDUElement); - } - gNBDUFunctionElement.addChild(idGNBDUFunctionElement); - gNBDUFunctionElement.addChild(attributesElement); - nearRTRICElement.addChild(gNBDUFunctionElement); - } - } - - nearRTRICElement.addChild(idNearRTRICElement); - ranNetworkElement.addChild(nearRTRICElement); - - return ranNetworkElement; - - } catch (JNCException e) { - log.error("Exception occured during NodeSet creation {}", e); - return null; - } - - } - - public void editConfig(Element initialConfig) { - try { - Boolean connected = false; - while (!connected) { - try { - Thread.sleep(6000); - device.connect(emsUserName); - connected = true; - } catch (ConnectException e) { - log.error("Device is not up yet... retrying after 3s"); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - - } - - device.newSession("cfg"); - log.info(initialConfig.toXMLString()); - device.getSession("cfg").editConfig(NetconfSession.CANDIDATE, initialConfig); - device.getSession("cfg").commit(); - log.info("Initial configuration set"); - } catch (IOException | JNCException e) { - log.error("Exception occured during edit config {}", e); - } - } + static Logger log = Logger.getLogger(NetconfClient.class.getName()); + + private String emsUserName; + private Device device; + + public NetconfClient(Device device) { + this.device = device; + } + + public NetconfClient(String emsUserName, String username, String password, String serverName, String ip, int port) { + DeviceUser deviceUser = new DeviceUser(emsUserName, username, password); + this.emsUserName = emsUserName; + this.device = new Device(serverName, deviceUser, ip, port); + } + + public Element getInitialNodeSet(NearRTRICModel rtRicModel, String serverId) { + try { + + Element ranNetworkElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/ran-network"); + Element nearRTRICElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/NearRTRIC"); + Element idNearRTRICElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/idNearRTRIC"); + idNearRTRICElement.setValue(rtRicModel.getNearRTRICId()); + Element sapElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/sAP"); + Element hostElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/host"); + hostElement.setValue("localhost"); + Element portElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/port"); + portElement.setValue("8080"); + sapElement.addChild(hostElement); + sapElement.addChild(portElement); + + for (GNBCUUPModel gNBCUUPModel : rtRicModel.getgNBCUUPList()) { + if (gNBCUUPModel.getgNBCUUPId().toString().equals(serverId) + || rtRicModel.getNearRTRICId().toString().equals(serverId)) { + Element gNBCUUPFunctionElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/GNBCUUPFunction"); + Element idGNBCUUPFunctionElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idGNBCUUPFunction"); + idGNBCUUPFunctionElement.setValue(gNBCUUPModel.getgNBCUUPId().toString()); + Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/attributes"); + Element gnBIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBId"); + gnBIdElement.setValue(gNBCUUPModel.getgNBId()); + attributesElement.addChild(gnBIdElement); + attributesElement.addChild(sapElement); + gNBCUUPFunctionElement.addChild(idGNBCUUPFunctionElement); + gNBCUUPFunctionElement.addChild(attributesElement); + nearRTRICElement.addChild(gNBCUUPFunctionElement); + } + } + for (GNBCUCPModel gNBCUCPModel : rtRicModel.getgNBCUCPList()) { + if (gNBCUCPModel.getgNBCUName().equals(serverId) + || rtRicModel.getNearRTRICId().toString().equals(serverId)) { + Element gNBCUCPFunctionElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/GNBCUCPFunction"); + Element idGNBCUCPFunctionElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idGNBCUCPFunction"); + idGNBCUCPFunctionElement.setValue(gNBCUCPModel.getgNBCUName()); + Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/attributes"); + Element gNBCUNameElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBCUName"); + gNBCUNameElement.setValue(gNBCUCPModel.getgNBCUName()); + Element gnBIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBId"); + gnBIdElement.setValue(gNBCUCPModel.getgNBId()); + Element gNBIdLengthElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBIdLength"); + gNBIdLengthElement.setValue(gNBCUCPModel.getgNBIdLength()); + attributesElement.addChild(gNBCUNameElement); + attributesElement.addChild(gnBIdElement); + attributesElement.addChild(gNBIdLengthElement); + attributesElement.addChild(sapElement); + for (NRCellCUModel nRCellCUModel : gNBCUCPModel.getCellCUList()) { + Element nRCellCUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/NRCellCU"); + Element idNRCellCUElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idNRCellCU"); + idNRCellCUElement.setValue(nRCellCUModel.getCellLocalId()); + Element nRCellattributesElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/attributes"); + Element cellLocalIdElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/cellLocalId"); + cellLocalIdElement.setValue(nRCellCUModel.getCellLocalId()); + nRCellattributesElement.addChild(cellLocalIdElement); + nRCellattributesElement.addChild(sapElement); + nRCellCUElement.addChild(idNRCellCUElement); + nRCellCUElement.addChild(nRCellattributesElement); + gNBCUCPFunctionElement.addChild(nRCellCUElement); + } + gNBCUCPFunctionElement.addChild(idGNBCUCPFunctionElement); + gNBCUCPFunctionElement.addChild(attributesElement); + nearRTRICElement.addChild(gNBCUCPFunctionElement); + } + } + for (GNBDUModel gNBDUModel : rtRicModel.getgNBDUList()) { + if (gNBDUModel.getgNBDUId().toString().equals(serverId) + || rtRicModel.getNearRTRICId().toString().equals(serverId)) { + Element gNBDUFunctionElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/GNBDUFunction"); + Element idGNBDUFunctionElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idGNBDUFunction"); + idGNBDUFunctionElement.setValue(gNBDUModel.getgNBDUId()); + Element attributesElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/attributes"); + Element gNBDUNameElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBDUName"); + gNBDUNameElement.setValue(gNBDUModel.getgNBDUName()); + Element gNBIdLengthElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBIdLength"); + gNBIdLengthElement.setValue(gNBDUModel.getgNBIdLength()); + Element gNBDUIdElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/gNBDUId"); + gNBDUIdElement.setValue(gNBDUModel.getgNBDUId()); + attributesElement.addChild(gNBIdLengthElement); + attributesElement.addChild(gNBDUNameElement); + attributesElement.addChild(gNBDUIdElement); + attributesElement.addChild(sapElement); + for (NRCellDUModel nRCellDUModel : gNBDUModel.getCellDUList()) { + Element nRCellDUElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/NRCellDU"); + Element idNRCellDUElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idNRCellDU"); + idNRCellDUElement.setValue(nRCellDUModel.getCellLocalId()); + Element nRCellattributesElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/attributes"); + Element cellLocalIdElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/cellLocalId"); + cellLocalIdElement.setValue(nRCellDUModel.getCellLocalId()); + Element nRSectorCarrierRefElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/nRSectorCarrierRef"); + nRSectorCarrierRefElement.setValue("OU=Sales"); + Element administrativeStateElement = Element + .create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/administrativeState"); + administrativeStateElement.setValue(nRCellDUModel.getAdministrativeState()); + Element nRPCIElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/nRPCI"); + nRPCIElement.setValue(nRCellDUModel.getnRPCI()); + Element nRTACElement = Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", + "/nRTAC"); + nRTACElement.setValue(nRCellDUModel.getnRTAC()); + nRCellattributesElement.addChild(cellLocalIdElement); + nRCellattributesElement.addChild(sapElement); + nRCellattributesElement.addChild(nRSectorCarrierRefElement); + nRCellattributesElement.addChild(administrativeStateElement); + nRCellattributesElement.addChild(nRPCIElement); + nRCellattributesElement.addChild(nRTACElement); + nRCellDUElement.addChild(idNRCellDUElement); + nRCellDUElement.addChild(nRCellattributesElement); + gNBDUFunctionElement.addChild(nRCellDUElement); + } + gNBDUFunctionElement.addChild(idGNBDUFunctionElement); + gNBDUFunctionElement.addChild(attributesElement); + nearRTRICElement.addChild(gNBDUFunctionElement); + } + } + nearRTRICElement.addChild(idNearRTRICElement); + ranNetworkElement.addChild(nearRTRICElement); + + return ranNetworkElement; + + } catch (JNCException e) { + log.error("Exception occured during NodeSet creation {}", e); + return null; + } + + } + + public void editConfig(Element initialConfig) { + try { + Boolean connected = false; + while (!connected) { + try { + Thread.sleep(6000); + device.connect(emsUserName); + connected = true; + } catch (ConnectException e) { + log.error("Device is not up yet... retrying after 3s"); + } catch (InterruptedException ie) { + Thread.currentThread().interrupt(); + } + + } + + device.newSession("cfg"); + log.info(initialConfig.toXMLString()); + device.getSession("cfg").editConfig(NetconfSession.CANDIDATE, initialConfig); + device.getSession("cfg").commit(); + log.info("Initial configuration set"); + } catch (IOException | JNCException e) { + log.error("Exception occured during edit config {}", e); + } + } } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/FileController.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/FileController.java index 5da605c..c4197e8 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/FileController.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/FileController.java @@ -17,6 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.ransim.rest.api.controller; import java.io.IOException; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java index 05de928..a3eb040 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.controller; import java.util.List; @@ -40,7 +60,7 @@ public class RANSliceConfigController { //SDN-R APIs /** * This method updates the slice details, config details of CUCP - * + * * @param GNBCUCPModel * @return ResponseEntity */ @@ -57,7 +77,7 @@ public class RANSliceConfigController { /** * To fetch the CUCP details - * + * * @param gNBCUCPName * @return ResponseEntity */ @@ -69,7 +89,7 @@ public class RANSliceConfigController { return new ResponseEntity(ranSliceConfigService.fetchGNBCUCPData(gNBCUCPName), HttpStatus.OK); }else { return new ResponseEntity(ranSliceConfigService.fetchGNBCUCPData(gNBCUCPName), HttpStatus.NO_CONTENT); - } + } } catch (Exception e) { logger.error("Error while fetching GNBCUCP:" + e.getMessage()); return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR); @@ -78,7 +98,7 @@ public class RANSliceConfigController { /** * This method updates the slice details, config details of CUUP - * + * * @param GNBCUUPModel * @return ResponseEntity */ @@ -95,7 +115,7 @@ public class RANSliceConfigController { /** * To fetch the CUCP details - * + * * @param gNBCUCPName * @return ResponseEntity */ @@ -116,7 +136,7 @@ public class RANSliceConfigController { /** * This method updates the slice details, config details of gNBDU - * + * * @param GNBDUModel * @return ResponseEntity */ @@ -133,7 +153,7 @@ public class RANSliceConfigController { /** * To fetch the gNBDU details - * + * * @param gNBDUId * @return ResponseEntity */ @@ -154,7 +174,7 @@ public class RANSliceConfigController { /** * This method updates the NearRTRIC details - * + * * @param nearRTRICModel * @return ResponseEntity */ @@ -172,7 +192,7 @@ public class RANSliceConfigController { /** * To fetch the nearRTRIC details - * + * * @param nearRTRICId * @return ResponseEntity */ @@ -187,7 +207,7 @@ public class RANSliceConfigController { return new ResponseEntity(ranSliceConfigService.fetchNearRTRICData(nearRTRICId), HttpStatus.NO_CONTENT); } - + } catch (Exception e) { logger.error("Error while fetching nearRTRIC:" + e.getMessage()); return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR); @@ -196,7 +216,7 @@ public class RANSliceConfigController { /** * To fetch the RRMPolicy of CU/DU - * + * * @param resourceType * @param resourceId * @return @@ -221,7 +241,7 @@ public class RANSliceConfigController { /** * This method updates the RRM policy of a network function - * + * * @param nearRTRICModel * @return ResponseEntity */ @@ -236,12 +256,12 @@ public class RANSliceConfigController { } } - + /** * To find the list of RICs from tracking area * 1. Find Cells from TA * 2. find List of RICs of the cells - * + * * @param trackingArea * @return */ @@ -250,7 +270,7 @@ public class RANSliceConfigController { logger.info("Request Received"); try { List cellIds = this.findListOfCells(trackingArea).getBody(); - List cellIdList =cellIds.stream().map(Integer::parseInt).collect(Collectors.toList()); + List cellIdList =cellIds.stream().map(Integer::parseInt).collect(Collectors.toList()); if(ranSliceConfigService.findNearRTRICofCells(cellIdList).size()>0) { return new ResponseEntity>(ranSliceConfigService.findNearRTRICofCells(cellIdList), HttpStatus.OK); @@ -266,7 +286,7 @@ public class RANSliceConfigController { /** * To find the list of CUs in a tracking area - * + * * @param trackingArea * @return */ @@ -278,16 +298,16 @@ public class RANSliceConfigController { return new ResponseEntity>(ranSliceConfigService.fetchCellsofTA(trackingArea), HttpStatus.OK); }else { return new ResponseEntity>(ranSliceConfigService.fetchCellsofTA(trackingArea), HttpStatus.NO_CONTENT); - } + } } catch (Exception e) { logger.error("Error while fetching the Cells:" + e.getMessage()); return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To find the list of CU-Cells - * + * * @param nearRTRICId * @return */ @@ -306,13 +326,13 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - - + + /** * To find the nearRTRIC of NSSI - * + * * This API can be used in Terminate/activate/deactivate to find the RIC from ranNFNSSIId in SO request - * + * * @param ranNFNSSIId * @return List */ @@ -330,10 +350,10 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To find the list of DU-Cells - * + * * @param nearRTRICId * @return */ @@ -345,18 +365,18 @@ public class RANSliceConfigController { return new ResponseEntity>>(ranSliceConfigService.fetchDUCellsofRIC(sNSSAI), HttpStatus.OK); }else { return new ResponseEntity>>(ranSliceConfigService.fetchDUCellsofRIC(sNSSAI), HttpStatus.NO_CONTENT); - } + } } catch (Exception e) { e.printStackTrace(); logger.error("Error while fetching the Cells-DU:" + e.getMessage()); return new ResponseEntity>>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + //Inventory APIs /** * This method updates the RAN slice details - * + * * @param ranSliceInfoModel * @return ResponseEntity */ @@ -374,7 +394,7 @@ public class RANSliceConfigController { /** * To fetch the RAN slice Details - * + * * @param ranNFNSSIId * @return RANSliceInfoModel */ @@ -386,17 +406,17 @@ public class RANSliceConfigController { return new ResponseEntity(ranSliceConfigService.fetchRANSlice(ranNFNSSIId), HttpStatus.OK); }else { return new ResponseEntity(ranSliceConfigService.fetchRANSlice(ranNFNSSIId), HttpStatus.NO_CONTENT); - } + } } catch (Exception e) { logger.error("Error while fetching the RAN slice Details:" + e.getMessage()); return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR); } } - + //Slice Analysis MS APIs /** * To fetch The NearRTRICs serving the sNSSAI - * + * * @param sNSSAI * @return List */ @@ -414,10 +434,10 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the configuration requested for a slice - * + * * @param sNSSAI * @return */ @@ -429,16 +449,16 @@ public class RANSliceConfigController { return new ResponseEntity>(ranSliceConfigService.findSliceProfileconfig(sNSSAI), HttpStatus.OK); }else { return new ResponseEntity>(ranSliceConfigService.findSliceProfileconfig(sNSSAI), HttpStatus.NO_CONTENT); - } + } } catch (Exception e) { logger.error("Error while fetching the Requested Configuration:" + e.getMessage()); return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the configuration of a slice in RIC - * + * * @param sNSSAI * @return */ @@ -457,11 +477,11 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the DU details - * - * @param + * + * @param * @return List */ @GetMapping(path="/du-list/{sNSSAI}") @@ -479,11 +499,11 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the DU details - * - * @param + * + * @param * @return List */ @GetMapping(path="/cucp-list/{sNSSAI}") @@ -500,11 +520,11 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** - * To fetch the Customer Details - * - * @param + * To fetch the Customer Details + * + * @param * @return Map */ @GetMapping(path="/subscriber-details/{sNSSAI}") @@ -521,11 +541,11 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the cu details - * - * @param + * + * @param * @return List */ @GetMapping(path="/cucp-list") @@ -542,11 +562,11 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - + /** * To fetch the DU details - * - * @param + * + * @param * @return List */ @GetMapping(path="/du-list") @@ -563,5 +583,5 @@ public class RANSliceConfigController { return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR); } } - -} \ No newline at end of file + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/exceptions/RansimException.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/exceptions/RansimException.java index f2ad4eb..e72b528 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/exceptions/RansimException.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/exceptions/RansimException.java @@ -1,27 +1,47 @@ -package org.onap.ransim.rest.api.exceptions; - -public class RansimException extends Throwable { - - public RansimException() { - super(); - } - - public RansimException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - - public RansimException(String message, Throwable cause) { - super(message, cause); - } - - public RansimException(String message) { - super(message); - } - - public RansimException(Throwable cause) { - super(cause); - } - - - -} +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.exceptions; + +public class RansimException extends Throwable { + + public RansimException() { + super(); + } + + public RansimException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public RansimException(String message, Throwable cause) { + super(message, cause); + } + + public RansimException(String message) { + super(message); + } + + public RansimException(Throwable cause) { + super(cause); + } + + + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java index 2149c4e..e185108 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java @@ -1,5 +1,5 @@ -/*- - }* ============LICENSE_START======================================================= +/* + * ============LICENSE_START======================================================= * Ran Simulator Controller * ================================================================================ * Copyright (C) 2020 Wipro Limited. diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimSlicingHandler.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimSlicingHandler.java index 6cb39c1..c435541 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimSlicingHandler.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimSlicingHandler.java @@ -1,265 +1,265 @@ -/*- - }* ============LICENSE_START======================================================= - * Ran Simulator Controller - * ================================================================================ - * Copyright (C) 2020 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.handler; - -import java.io.File; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Random; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; -import javax.websocket.Session; - -import org.apache.log4j.Logger; -import org.onap.ransim.rest.api.services.RANSliceConfigService; -import org.onap.ransim.rest.api.services.RansimControllerServices; -import org.onap.ransim.rest.api.services.RansimRepositoryService; -import org.onap.ransim.rest.web.mapper.GNBCUCPModel; -import org.onap.ransim.rest.web.mapper.NRCellCUModel; -import org.onap.ransim.rest.web.mapper.PLMNInfoModel; -import org.onap.ransim.rest.xml.models.*; -import org.onap.ransim.websocket.server.RansimWebSocketServer; -import org.onap.ransim.websocket.model.SlicingPmMessage; - -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.RestTemplate; -import com.google.gson.Gson; -import org.springframework.stereotype.Service; -import org.springframework.beans.factory.annotation.Autowired; - -@Service -public class RansimSlicingHandler { - - static Logger log = Logger.getLogger(RansimSlicingHandler.class - .getName()); - - @Autowired - RansimRepositoryService ransimRepo ; - - @Autowired - RansimControllerServices rscServices; - - @Autowired - RANSliceConfigService ranSliceConfigService; - - - public List generateIntelligentSlicingPmData(long startTime, HashMap> taCells) { - List result = new ArrayList(); - try { - String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/cucp-list"; - List gnbcucpModelList = sendGetRequestToConfigDb(requestUrl).getBody(); - long peakEndTime = System.currentTimeMillis() + 360000; - for (int i = 0; i < gnbcucpModelList.size(); i++) { - String gNBName = gnbcucpModelList.get(i).getgNBCUName(); - LocalDateTime beginTime = LocalDateTime.now(); - String beginTimeString = beginTime.toString(); - SlicingPmMessage pmMessage = new SlicingPmMessage(); - pmMessage.setStartEpochMicrosec(System.currentTimeMillis() * 1000); - pmMessage.setSourceName(gNBName); - MeasCollec measCollec = new MeasCollec(beginTimeString); - FileSender fileSender = new FileSender(gNBName); - FileHeader fileHeader = new FileHeader("Prefix", "Acme Ltd", "32.435 V10.0", measCollec, fileSender); - Random r = new Random(); - int jobId = r.nextInt((9999 - 1000) + 1) + 1000; - Job job = new Job(String.valueOf(jobId)); - ReportingPeriod reportingPeriod = new ReportingPeriod("PT900S"); - List measTypeList = new ArrayList(); - int numberOfNssaiType = 1; - HashMap nssaiInfoMap = new HashMap(); - for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) { - for (PLMNInfoModel pLMNInfoModel : nRCellCUModel.getpLMNInfoList()) { - if (pLMNInfoModel.getsNSSAI().getStatus().equalsIgnoreCase("active")) { - nssaiInfoMap.put(pLMNInfoModel.getsNSSAI().getsNSSAI(), - pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns()); - } - } - } - HashMap nSSAINo = new HashMap(); - for (java.util.Map.Entry map : nssaiInfoMap.entrySet()) { - String nssai = map.getKey(); - MeasType mesType1 = new MeasType("SM.PDUSessionSetupReq." + nssai, numberOfNssaiType++); - MeasType mesType2 = new MeasType("SM.PDUSessionSetupSucc." + nssai, numberOfNssaiType++); - measTypeList.add(mesType1); - measTypeList.add(mesType2); - if (numberOfNssaiType == 3) { - MeasType mesTypeFail = new MeasType("SM.PDUSessionSetupFail." + "0", 3); - measTypeList.add(mesTypeFail); - numberOfNssaiType++; - } - nSSAINo.put(nssai,mesType1.getP()); - } - - List measValueList = new ArrayList(); - - for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) { - List resultList = new ArrayList(); - int noOfRequestedSessions = 0; - int successfulSessions = 0; - int failedSessions = 0; - int configData = 0; - double rNumForTotalReq = 0; - int numberOfNssaiValue = 1; //change - for (PLMNInfoModel pLMNInfoModel : nRCellCUModel.getpLMNInfoList()) { - for (java.util.Map.Entry nssaiMap : nSSAINo.entrySet()) { - if(nssaiMap.getKey().equals(pLMNInfoModel.getsNSSAI().getsNSSAI())) { - configData = pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns(); - noOfRequestedSessions = 0; - successfulSessions = 0; - for (java.util.Map.Entry> taCellMap : taCells.entrySet()) { - for(String cell : taCellMap.getValue()) { - if(Integer.parseInt(cell) == nRCellCUModel.getCellLocalId().intValue()) { - long end = (System.currentTimeMillis()); - if(peakEndTime>end) { - if(taCellMap.getKey().equalsIgnoreCase("TA1") || taCellMap.getKey().equalsIgnoreCase("TA3")) { - rNumForTotalReq = 1.4 + (new Random().nextDouble() * (1.0 - 1.4)); - } else { - rNumForTotalReq = 0.6 + (new Random().nextDouble() * (0.3 - 0.6)); - } - } - else { - rNumForTotalReq = 0.7 + (new Random().nextDouble() * (0.3 - 0.7)); - } - } - } - } - - double rNumForFs = 0.10 + (new Random().nextDouble() * (0.05 - 0.10)); - double rNumForSs = 0.75 + (new Random().nextDouble()* (0.75 - 0.90)); - noOfRequestedSessions = (int) (configData * rNumForTotalReq); - successfulSessions = (int) (noOfRequestedSessions * rNumForSs); - failedSessions += noOfRequestedSessions - successfulSessions; - numberOfNssaiValue = nssaiMap.getValue(); - Result result1 = new Result(numberOfNssaiValue++, noOfRequestedSessions); - Result result2 = new Result(numberOfNssaiValue++, successfulSessions); - resultList.add(result1); - resultList.add(result2); - if (numberOfNssaiValue == 3) { - numberOfNssaiValue++; - } - if(nRCellCUModel.getpLMNInfoList().indexOf(pLMNInfoModel)+1 == nRCellCUModel.getpLMNInfoList().size()) - { - failedSessions -= failedSessions * rNumForFs; - Result result3 = new Result(3, failedSessions); - resultList.add(result3); - } - } - } - - } - - MeasValue measValue = new MeasValue(nRCellCUModel.getCellLocalId(), - resultList, false); - measValueList.add(measValue); - } - - ManagedElement managedElement = new ManagedElement("r0.1", gNBName); - LocalDateTime grabularityEndTime = LocalDateTime.now(); - String grabularityEndTimeString = grabularityEndTime.toString(); - GranularityPeriod granularityPeriod = new GranularityPeriod(grabularityEndTimeString, "PT900S"); - MeasInfo measInfo = new MeasInfo("measInfoIsVal", job, granularityPeriod, reportingPeriod, measTypeList, - measValueList); - List measInfoList = new ArrayList(); - measInfoList.add(measInfo); - MeasData measData = new MeasData(managedElement, measInfoList); - List measDataList = new ArrayList(); - measDataList.add(measData); - LocalDateTime endTime = LocalDateTime.now(); - String endTimeString = endTime.toString(); - pmMessage.setLastEpochMicrosec(System.currentTimeMillis() * 1000); - MeasCollecEnd measCollecEnd = new MeasCollecEnd(endTimeString); - FileFooter fileFooter = new FileFooter(measCollecEnd); - MeasCollecFile measCollecFile = new MeasCollecFile(fileHeader, measDataList, fileFooter, - "http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec"); - String startDate = beginTimeString.replace(':', '-'); - String endDate = endTimeString.replace(':', '-'); - String fileName = "A" + startDate + "-"+ endDate + "-" + String.valueOf(jobId) + "-" + gNBName+ ".xml"; - pmMessage.setFileName(fileName); - Gson gson = new Gson(); - String pmData = gson.toJson(measCollecFile); - pmMessage.setPmData(pmData); - sendIntelligentSlicingPmData(pmMessage); - } - } - catch (Exception e) { - System.out.println("Exception: " + e); - } - return result; -} - -public static ResponseEntity> sendGetRequestToConfigDb(String requestUrl) { - - HttpHeaders headers = new HttpHeaders(); - log.info("sending..."); - headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); - HttpEntity requestEntity = new HttpEntity<>(headers); - try { - RestTemplate restTemplate = new RestTemplate(); - return restTemplate.exchange(requestUrl, HttpMethod.GET, requestEntity, - new ParameterizedTypeReference>() { - }); - } - catch (Exception e) { - return new ResponseEntity<>(HttpStatus.NOT_FOUND); - } -} - - -public void sendIntelligentSlicingPmData( SlicingPmMessage pmMessage) { - - log.info("inside sendIntelligentSlicingPmData"); - - Gson gson = new Gson(); - String jsonStr = gson.toJson(pmMessage); - - log.info("IntelligentSlicingPmData " + jsonStr); - - String ipPort = RansimControllerServices.serverIdIpPortMapping.get(pmMessage.getSourceName()); - - if (ipPort != null && !ipPort.trim().equals("")) { - - log.info("Connection estabilished with ip: " + ipPort); - if (ipPort != null && !ipPort.trim().equals("")) { - Session clSess = RansimControllerServices.webSocketSessions.get(ipPort); - if (clSess != null) { - log.info("PM Data message sent."); - RansimWebSocketServer.sendIntelligentSlicingPmData(jsonStr, clSess); - } else { - log.info("No client session for " + ipPort); - } - } else { - log.info("No client for this serverId"); - } - } else { - log.info("No client for "); - } - - } -} - +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020 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.handler; + +import java.io.File; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Random; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Marshaller; +import javax.websocket.Session; + +import org.apache.log4j.Logger; +import org.onap.ransim.rest.api.services.RANSliceConfigService; +import org.onap.ransim.rest.api.services.RansimControllerServices; +import org.onap.ransim.rest.api.services.RansimRepositoryService; +import org.onap.ransim.rest.web.mapper.GNBCUCPModel; +import org.onap.ransim.rest.web.mapper.NRCellCUModel; +import org.onap.ransim.rest.web.mapper.PLMNInfoModel; +import org.onap.ransim.rest.xml.models.*; +import org.onap.ransim.websocket.server.RansimWebSocketServer; +import org.onap.ransim.websocket.model.SlicingPmMessage; + +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.RestTemplate; +import com.google.gson.Gson; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; + +@Service +public class RansimSlicingHandler { + + static Logger log = Logger.getLogger(RansimSlicingHandler.class + .getName()); + + @Autowired + RansimRepositoryService ransimRepo ; + + @Autowired + RansimControllerServices rscServices; + + @Autowired + RANSliceConfigService ranSliceConfigService; + + + public List generateIntelligentSlicingPmData(long startTime, HashMap> taCells) { + List result = new ArrayList(); + try { + String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/cucp-list"; + List gnbcucpModelList = sendGetRequestToConfigDb(requestUrl).getBody(); + long peakEndTime = System.currentTimeMillis() + 360000; + for (int i = 0; i < gnbcucpModelList.size(); i++) { + String gNBName = gnbcucpModelList.get(i).getgNBCUName(); + LocalDateTime beginTime = LocalDateTime.now(); + String beginTimeString = beginTime.toString(); + SlicingPmMessage pmMessage = new SlicingPmMessage(); + pmMessage.setStartEpochMicrosec(System.currentTimeMillis() * 1000); + pmMessage.setSourceName(gNBName); + MeasCollec measCollec = new MeasCollec(beginTimeString); + FileSender fileSender = new FileSender(gNBName); + FileHeader fileHeader = new FileHeader("Prefix", "Acme Ltd", "32.435 V10.0", measCollec, fileSender); + Random r = new Random(); + int jobId = r.nextInt((9999 - 1000) + 1) + 1000; + Job job = new Job(String.valueOf(jobId)); + ReportingPeriod reportingPeriod = new ReportingPeriod("PT900S"); + List measTypeList = new ArrayList(); + int numberOfNssaiType = 1; + HashMap nssaiInfoMap = new HashMap(); + for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) { + for (PLMNInfoModel pLMNInfoModel : nRCellCUModel.getpLMNInfoList()) { + if (pLMNInfoModel.getsNSSAI().getStatus().equalsIgnoreCase("active")) { + nssaiInfoMap.put(pLMNInfoModel.getsNSSAI().getsNSSAI(), + pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns()); + } + } + } + HashMap nSSAINo = new HashMap(); + for (java.util.Map.Entry map : nssaiInfoMap.entrySet()) { + String nssai = map.getKey(); + MeasType mesType1 = new MeasType("SM.PDUSessionSetupReq." + nssai, numberOfNssaiType++); + MeasType mesType2 = new MeasType("SM.PDUSessionSetupSucc." + nssai, numberOfNssaiType++); + measTypeList.add(mesType1); + measTypeList.add(mesType2); + if (numberOfNssaiType == 3) { + MeasType mesTypeFail = new MeasType("SM.PDUSessionSetupFail." + "0", 3); + measTypeList.add(mesTypeFail); + numberOfNssaiType++; + } + nSSAINo.put(nssai,mesType1.getP()); + } + + List measValueList = new ArrayList(); + + for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) { + List resultList = new ArrayList(); + int noOfRequestedSessions = 0; + int successfulSessions = 0; + int failedSessions = 0; + int configData = 0; + double rNumForTotalReq = 0; + int numberOfNssaiValue = 1; //change + for (PLMNInfoModel pLMNInfoModel : nRCellCUModel.getpLMNInfoList()) { + for (java.util.Map.Entry nssaiMap : nSSAINo.entrySet()) { + if(nssaiMap.getKey().equals(pLMNInfoModel.getsNSSAI().getsNSSAI())) { + configData = pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns(); + noOfRequestedSessions = 0; + successfulSessions = 0; + for (java.util.Map.Entry> taCellMap : taCells.entrySet()) { + for(String cell : taCellMap.getValue()) { + if(Integer.parseInt(cell) == nRCellCUModel.getCellLocalId().intValue()) { + long end = (System.currentTimeMillis()); + if(peakEndTime>end) { + if(taCellMap.getKey().equalsIgnoreCase("TA1") || taCellMap.getKey().equalsIgnoreCase("TA3")) { + rNumForTotalReq = 1.4 + (new Random().nextDouble() * (1.0 - 1.4)); + } else { + rNumForTotalReq = 0.6 + (new Random().nextDouble() * (0.3 - 0.6)); + } + } + else { + rNumForTotalReq = 0.7 + (new Random().nextDouble() * (0.3 - 0.7)); + } + } + } + } + + double rNumForFs = 0.10 + (new Random().nextDouble() * (0.05 - 0.10)); + double rNumForSs = 0.75 + (new Random().nextDouble()* (0.75 - 0.90)); + noOfRequestedSessions = (int) (configData * rNumForTotalReq); + successfulSessions = (int) (noOfRequestedSessions * rNumForSs); + failedSessions += noOfRequestedSessions - successfulSessions; + numberOfNssaiValue = nssaiMap.getValue(); + Result result1 = new Result(numberOfNssaiValue++, noOfRequestedSessions); + Result result2 = new Result(numberOfNssaiValue++, successfulSessions); + resultList.add(result1); + resultList.add(result2); + if (numberOfNssaiValue == 3) { + numberOfNssaiValue++; + } + if(nRCellCUModel.getpLMNInfoList().indexOf(pLMNInfoModel)+1 == nRCellCUModel.getpLMNInfoList().size()) + { + failedSessions -= failedSessions * rNumForFs; + Result result3 = new Result(3, failedSessions); + resultList.add(result3); + } + } + } + + } + + MeasValue measValue = new MeasValue(nRCellCUModel.getCellLocalId(), + resultList, false); + measValueList.add(measValue); + } + + ManagedElement managedElement = new ManagedElement("r0.1", gNBName); + LocalDateTime grabularityEndTime = LocalDateTime.now(); + String grabularityEndTimeString = grabularityEndTime.toString(); + GranularityPeriod granularityPeriod = new GranularityPeriod(grabularityEndTimeString, "PT900S"); + MeasInfo measInfo = new MeasInfo("measInfoIsVal", job, granularityPeriod, reportingPeriod, measTypeList, + measValueList); + List measInfoList = new ArrayList(); + measInfoList.add(measInfo); + MeasData measData = new MeasData(managedElement, measInfoList); + List measDataList = new ArrayList(); + measDataList.add(measData); + LocalDateTime endTime = LocalDateTime.now(); + String endTimeString = endTime.toString(); + pmMessage.setLastEpochMicrosec(System.currentTimeMillis() * 1000); + MeasCollecEnd measCollecEnd = new MeasCollecEnd(endTimeString); + FileFooter fileFooter = new FileFooter(measCollecEnd); + MeasCollecFile measCollecFile = new MeasCollecFile(fileHeader, measDataList, fileFooter, + "http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec"); + String startDate = beginTimeString.replace(':', '-'); + String endDate = endTimeString.replace(':', '-'); + String fileName = "A" + startDate + "-"+ endDate + "-" + String.valueOf(jobId) + "-" + gNBName+ ".xml"; + pmMessage.setFileName(fileName); + Gson gson = new Gson(); + String pmData = gson.toJson(measCollecFile); + pmMessage.setPmData(pmData); + sendIntelligentSlicingPmData(pmMessage); + } + } + catch (Exception e) { + System.out.println("Exception: " + e); + } + return result; +} + +public static ResponseEntity> sendGetRequestToConfigDb(String requestUrl) { + + HttpHeaders headers = new HttpHeaders(); + log.info("sending..."); + headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); + HttpEntity requestEntity = new HttpEntity<>(headers); + try { + RestTemplate restTemplate = new RestTemplate(); + return restTemplate.exchange(requestUrl, HttpMethod.GET, requestEntity, + new ParameterizedTypeReference>() { + }); + } + catch (Exception e) { + return new ResponseEntity<>(HttpStatus.NOT_FOUND); + } +} + + +public void sendIntelligentSlicingPmData( SlicingPmMessage pmMessage) { + + log.info("inside sendIntelligentSlicingPmData"); + + Gson gson = new Gson(); + String jsonStr = gson.toJson(pmMessage); + + log.info("IntelligentSlicingPmData " + jsonStr); + + String ipPort = RansimControllerServices.serverIdIpPortMapping.get(pmMessage.getSourceName()); + + if (ipPort != null && !ipPort.trim().equals("")) { + + log.info("Connection estabilished with ip: " + ipPort); + if (ipPort != null && !ipPort.trim().equals("")) { + Session clSess = RansimControllerServices.webSocketSessions.get(ipPort); + if (clSess != null) { + log.info("PM Data message sent."); + RansimWebSocketServer.sendIntelligentSlicingPmData(jsonStr, clSess); + } else { + log.info("No client session for " + ipPort); + } + } else { + log.info("No client for this serverId"); + } + } else { + log.info("No client for "); + } + + } +} + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/ConfigData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/ConfigData.java index c75f3e9..9af5537 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/ConfigData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/ConfigData.java @@ -1,21 +1,43 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; public class ConfigData { -private int maxNumberOfConns; + private int maxNumberOfConns; -public ConfigData() { -} -public ConfigData(int maxNumberOfConns) { -super(); -this.maxNumberOfConns = maxNumberOfConns; -} + public ConfigData() { + } -public int getMaxNumberOfConns() { -return maxNumberOfConns; -} + public ConfigData(int maxNumberOfConns) { + super(); + this.maxNumberOfConns = maxNumberOfConns; + } -public void setMaxNumberOfConns(int maxNumberOfConns) { -this.maxNumberOfConns = maxNumberOfConns; -} + public int getMaxNumberOfConns() { + return maxNumberOfConns; + } + + public void setMaxNumberOfConns(int maxNumberOfConns) { + this.maxNumberOfConns = maxNumberOfConns; + } } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUCPFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUCPFunction.java index 4c5f0af..6efb34c 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUCPFunction.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUCPFunction.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -13,67 +33,81 @@ import javax.persistence.OneToMany; import javax.persistence.Table; @Entity -@Table(name="GNBCUCPFUNCTION") -public class GNBCUCPFunction implements Serializable{ +@Table(name = "GNBCUCPFUNCTION") +public class GNBCUCPFunction implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="GNBCUNAME") + @Column(name = "GNBCUNAME") private String gNBCUName; - @Column(name="GNBID") + @Column(name = "GNBID") private Integer gNBId; - @Column(name="GNBIDLENGTH") + @Column(name = "GNBIDLENGTH") private Integer gNBIdLength; - @Column(name="PLMNID") + @Column(name = "PLMNID") private String pLMNId; - @Column(name="NFTYPE") + @Column(name = "NFTYPE") private String nFType; - @Column(name="CELLCULIST") - @OneToMany(mappedBy = "gNBCUCPFunction", cascade=CascadeType.ALL) + @Column(name = "CELLCULIST") + @OneToMany(mappedBy = "gNBCUCPFunction", cascade = CascadeType.ALL) private List cellCUList; - @ManyToOne//(cascade=CascadeType.ALL) + @ManyToOne // (cascade=CascadeType.ALL) @JoinColumn(name = "nearrtricid") private NearRTRIC nearRTRIC; + public String getgNBCUName() { return gNBCUName; } + public void setgNBCUName(String gNBCUName) { this.gNBCUName = gNBCUName; } + public Integer getgNBId() { return gNBId; } + public void setgNBId(Integer gNBId) { this.gNBId = gNBId; } + public Integer getgNBIdLength() { return gNBIdLength; } + public void setgNBIdLength(Integer gNBIdLength) { this.gNBIdLength = gNBIdLength; } + public String getpLMNId() { return pLMNId; } + public void setpLMNId(String pLMNId) { this.pLMNId = pLMNId; } + public List getCellCUList() { return cellCUList; } + public void setCellCUList(List cellCUList) { this.cellCUList = cellCUList; } + public NearRTRIC getNearRTRIC() { return nearRTRIC; } + public void setNearRTRIC(NearRTRIC nearRTRIC) { this.nearRTRIC = nearRTRIC; } + public String getnFType() { return nFType; } + public void setnFType(String nFType) { this.nFType = nFType; } - -} \ No newline at end of file + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUUPFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUUPFunction.java index 2e5d62b..5a3af3e 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUUPFunction.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUUPFunction.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -13,63 +33,78 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; + @Entity -@Table(name="GNBCUUPFUNCTION") -public class GNBCUUPFunction implements Serializable{ +@Table(name = "GNBCUUPFUNCTION") +public class GNBCUUPFunction implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="GNBCUUPID") + @Column(name = "GNBCUUPID") private Integer gNBCUUPId; - @Column(name="GNBID") + @Column(name = "GNBID") private Integer gNBId; - @Column(name="GNBIDLENGTH") + @Column(name = "GNBIDLENGTH") private Integer gNBIdLength; - //@Column(name="PLMNINFOLIST") - //@OneToMany(mappedBy = "gNBCUUPFunction", cascade={CascadeType.PERSIST,CascadeType.REMOVE}) + // @Column(name="PLMNINFOLIST") + // @OneToMany(mappedBy = "gNBCUUPFunction", + // cascade={CascadeType.PERSIST,CascadeType.REMOVE}) @ElementCollection(fetch = FetchType.EAGER) - @CollectionTable(name="PLMNINFO",joinColumns = @JoinColumn(name="gnbcuupid")) + @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "gnbcuupid")) private List pLMNInfoList; - @Column(name="RESOURCETYPE") + @Column(name = "RESOURCETYPE") private String resourceType; - @ManyToOne(cascade=CascadeType.ALL) + @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "nearrtricid") private NearRTRIC nearRTRIC; + public Integer getgNBCUUPId() { return gNBCUUPId; } + public void setgNBCUUPId(Integer gNBCUUPId) { this.gNBCUUPId = gNBCUUPId; } + public Integer getgNBId() { return gNBId; } + public void setgNBId(Integer gNBId) { this.gNBId = gNBId; } + public Integer getgNBIdLength() { return gNBIdLength; } + public void setgNBIdLength(Integer gNBIdLength) { this.gNBIdLength = gNBIdLength; } + public List getpLMNInfoList() { return pLMNInfoList; } + public void setpLMNInfoList(List pLMNInfoList) { this.pLMNInfoList = pLMNInfoList; } + public NearRTRIC getNearRTRIC() { return nearRTRIC; } + public void setNearRTRIC(NearRTRIC nearRTRIC) { this.nearRTRIC = nearRTRIC; } + public String getResourceType() { return resourceType; } + public void setResourceType(String resourceType) { this.resourceType = resourceType; } + @Override public String toString() { return "GNBCUUPFunction [gNBCUUPId=" + gNBCUUPId + ", gNBId=" + gNBId + ", gNBIdLength=" + gNBIdLength @@ -77,3 +112,4 @@ public class GNBCUUPFunction implements Serializable{ + "]"; } } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBDUFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBDUFunction.java index c64472a..2df9786 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBDUFunction.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBDUFunction.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -12,75 +32,91 @@ import javax.persistence.OneToMany; import javax.persistence.Table; @Entity -@Table(name="GNBDUFUNCTION") -public class GNBDUFunction implements Serializable{ +@Table(name = "GNBDUFUNCTION") +public class GNBDUFunction implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="GNBDUID") + @Column(name = "GNBDUID") private Integer gNBDUId; - @Column(name="GNBID") + @Column(name = "GNBID") private Integer gNBId; - @Column(name="GNBIDLENGTH") + @Column(name = "GNBIDLENGTH") private Integer gNBIdLength; - @Column(name="GNBDUNAME") + @Column(name = "GNBDUNAME") private String gNBDUName; - @Column(name="PLMNID") + @Column(name = "PLMNID") private String pLMNId; - @Column(name="NFTYPE") + @Column(name = "NFTYPE") private String nFType; - @Column(name="CELLDULIST") - @OneToMany(mappedBy = "gNBDUFunction",cascade=CascadeType.ALL) + @Column(name = "CELLDULIST") + @OneToMany(mappedBy = "gNBDUFunction", cascade = CascadeType.ALL) private List cellDUList; @ManyToOne @JoinColumn(name = "nearrtricid") private NearRTRIC nearRTRIC; + public Integer getgNBDUId() { return gNBDUId; } + public void setgNBDUId(Integer gNBDUId) { this.gNBDUId = gNBDUId; } + public Integer getgNBId() { return gNBId; } + public void setgNBId(Integer gNBId) { this.gNBId = gNBId; } + public Integer getgNBIdLength() { return gNBIdLength; } + public void setgNBIdLength(Integer gNBIdLength) { this.gNBIdLength = gNBIdLength; } + public String getgNBDUName() { return gNBDUName; } + public void setgNBDUName(String gNBDUName) { this.gNBDUName = gNBDUName; } + public String getpLMNId() { return pLMNId; } + public void setpLMNId(String pLMNId) { this.pLMNId = pLMNId; } + public List getCellDUList() { return cellDUList; } + public void setCellDUList(List cellDUList) { this.cellDUList = cellDUList; } + public NearRTRIC getNearRTRIC() { return nearRTRIC; } + public void setNearRTRIC(NearRTRIC nearRTRIC) { this.nearRTRIC = nearRTRIC; } + public String getnFType() { return nFType; } + public void setnFType(String nFType) { this.nFType = nFType; } - -} \ No newline at end of file + +} 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 a00f88e..89ffdd7 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 @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -15,44 +35,52 @@ import javax.persistence.OneToMany; import javax.persistence.Table; @Entity -@Table(name="NRCELLCU") -public class NRCellCU implements Serializable{ +@Table(name = "NRCELLCU") +public class NRCellCU implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="CELLLOCALID") + @Column(name = "CELLLOCALID") private Integer cellLocalId; - @Column(name="RESOURCETYPE") + @Column(name = "RESOURCETYPE") private String resourceType; @ElementCollection(fetch = FetchType.EAGER) - @CollectionTable(name="PLMNINFO",joinColumns = @JoinColumn(name="nrcellcu_celllocalid")) + @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nrcellcu_celllocalid")) private List pLMNInfoList; @ManyToOne @JoinColumn(name = "gnbcuname") private GNBCUCPFunction gNBCUCPFunction; - + public Integer getCellLocalId() { return cellLocalId; } + public void setCellLocalId(Integer cellLocalId) { this.cellLocalId = cellLocalId; } + public List getpLMNInfoList() { return pLMNInfoList; } + public void setpLMNInfoList(List pLMNInfoList) { this.pLMNInfoList = pLMNInfoList; - } + } + public GNBCUCPFunction getgNBCUCPFunction() { return gNBCUCPFunction; } + public void setgNBCUCPFunction(GNBCUCPFunction gNBCUCPFunction) { this.gNBCUCPFunction = gNBCUCPFunction; } + public String getResourceType() { return resourceType; } + public void setResourceType(String resourceType) { this.resourceType = resourceType; } - + } + 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 89ac059..e93f5aa 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 @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -39,6 +59,8 @@ public class NRCellDU implements Serializable{ @ManyToOne @JoinColumn(name = "gnbduid") private GNBDUFunction gNBDUFunction; + @Column(name="prb") + private Integer prbs; public Integer getCellLocalId() { return cellLocalId; @@ -94,5 +116,10 @@ public class NRCellDU implements Serializable{ public void setResourceType(String resourceType) { this.resourceType = resourceType; } - + public Integer getPrbs() { + return prbs; + } + public void setPrbs(Integer prbs) { + this.prbs = prbs; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NSSAIConfig.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NSSAIConfig.java index d7d6b2b..e650ff1 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NSSAIConfig.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NSSAIConfig.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -6,40 +26,48 @@ import javax.persistence.Embeddable; import javax.persistence.Table; import java.sql.Timestamp; -@Table(name="NSSAICONFIG") +@Table(name = "NSSAICONFIG") @Embeddable -public class NSSAIConfig implements Serializable{ +public class NSSAIConfig implements Serializable { private static final long serialVersionUID = 1L; - @Column(name="DLTHPTPERSLICE") + @Column(name = "DLTHPTPERSLICE") private Integer dLThptPerSlice; - @Column(name="ULTHPTPERSLICE") + @Column(name = "ULTHPTPERSLICE") private Integer uLThptPerSlice; - @Column(name="MAXNUMBEROFCONNS") + @Column(name = "MAXNUMBEROFCONNS") private Integer maxNumberOfConns; - @Column(name="LASTUPDATEDTS") + @Column(name = "LASTUPDATEDTS") private Timestamp lastUpdatedTS; + public Integer getdLThptPerSlice() { return dLThptPerSlice; } + public void setdLThptPerSlice(Integer dLThptPerSlice) { this.dLThptPerSlice = dLThptPerSlice; } + public Integer getuLThptPerSlice() { return uLThptPerSlice; } + public void setuLThptPerSlice(Integer uLThptPerSlice) { this.uLThptPerSlice = uLThptPerSlice; } + public Integer getMaxNumberOfConns() { return maxNumberOfConns; } + public void setMaxNumberOfConns(Integer maxNumberOfConns) { this.maxNumberOfConns = maxNumberOfConns; } + public Timestamp getLastUpdatedTS() { return lastUpdatedTS; } + public void setLastUpdatedTS(Timestamp lastUpdatedTS) { this.lastUpdatedTS = lastUpdatedTS; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NearRTRIC.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NearRTRIC.java index ff0c516..c2fbd06 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NearRTRIC.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NearRTRIC.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -11,86 +31,104 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.Table; + @Entity -@Table(name="NEARRTRIC") -public class NearRTRIC implements Serializable{ +@Table(name = "NEARRTRIC") +public class NearRTRIC implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="NEARRTRICID") + @Column(name = "NEARRTRICID") private Integer nearRTRICId; - @Column(name="GNBID") + @Column(name = "GNBID") private Integer gNBId; @ElementCollection(targetClass = String.class) - @CollectionTable(name="TRACKINGAREA", joinColumns = @JoinColumn(name="nearrtricid")) + @CollectionTable(name = "TRACKINGAREA", joinColumns = @JoinColumn(name = "nearrtricid")) private List trackingArea; - @Column(name="RESOURCETYPE") + @Column(name = "RESOURCETYPE") private String resourceType; - @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL) + @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL) private List gNBCUCPList; - @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL) + @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL) private List gNBCUUPList; - @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL) + @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL) private List gNBDUList; @ElementCollection(targetClass = String.class) - @CollectionTable(name="RANNFNSSI",joinColumns = @JoinColumn(name="nearrtricid")) + @CollectionTable(name = "RANNFNSSI", joinColumns = @JoinColumn(name = "nearrtricid")) private List ranNFNSSIList; @ElementCollection - @CollectionTable(name="PLMNINFO",joinColumns = @JoinColumn(name="nearrtricid")) + @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nearrtricid")) private List pLMNInfoList; + public Integer getNearRTRICId() { return nearRTRICId; } + public void setNearRTRICId(Integer nearRTRICId) { this.nearRTRICId = nearRTRICId; } + public Integer getgNBId() { return gNBId; } + public void setgNBId(Integer gNBId) { this.gNBId = gNBId; } - + public List getTrackingArea() { return trackingArea; } + public void setTrackingArea(List trackingArea) { this.trackingArea = trackingArea; } + public String getResourceType() { return resourceType; } + public void setResourceType(String resourceType) { this.resourceType = resourceType; } + public List getgNBCUCPList() { return gNBCUCPList; } + public void setgNBCUCPList(List gNBCUCPList) { this.gNBCUCPList = gNBCUCPList; } + public List getgNBCUUPList() { return gNBCUUPList; } + public void setgNBCUUPList(List gNBCUUPList) { this.gNBCUUPList = gNBCUUPList; } + public List getgNBDUList() { return gNBDUList; } + public void setgNBDUList(List gNBDUList) { this.gNBDUList = gNBDUList; } + public List getpLMNInfoList() { return pLMNInfoList; } + public void setpLMNInfoList(List pLMNInfoList) { this.pLMNInfoList = pLMNInfoList; } + public List getRanNFNSSIList() { return ranNFNSSIList; } + public void setRanNFNSSIList(List ranNFNSSIList) { this.ranNFNSSIList = ranNFNSSIList; } - -} \ No newline at end of file + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfo.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfo.java index 699c7bd..a45ad77 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfo.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfo.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -17,12 +37,13 @@ import javax.persistence.Table; @Table(name = "PLMNINFO") public class PLMNInfo implements Serializable { private static final long serialVersionUID = 1L; - + @Column(name = "PLMNID") private String pLMNId; @Embedded private SNSSAI sNSSAI; + public String getpLMNId() { return pLMNId; } @@ -31,7 +52,6 @@ public class PLMNInfo implements Serializable { this.pLMNId = pLMNId; } - public SNSSAI getsNSSAI() { return sNSSAI; } @@ -40,4 +60,4 @@ public class PLMNInfo implements Serializable { this.sNSSAI = sNSSAI; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfoModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfoModel.java index df7b312..af16d44 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfoModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfoModel.java @@ -1,7 +1,8 @@ -/* ============LICENSE_START======================================================= +/* + * ============LICENSE_START======================================================= * Ran Simulator Controller * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-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. @@ -20,96 +21,94 @@ package org.onap.ransim.rest.api.models; public class PLMNInfoModel { -private String pLMNId; -private String snssai; -private String status; -private String gnbType; -private int gnbId; -private int nrCellId; -private String nearrtricid; -private long maxNumberOfConns; - -public PLMNInfoModel() { - -} - - -public PLMNInfoModel(String pLMNId, String snssai, String status, String gnbType, int gnbId, int nrCellId, -String nearrtricid, long maxNumberOfConns) { -super(); -this.pLMNId = pLMNId; -this.snssai = snssai; -this.status = status; -this.gnbType = gnbType; -this.gnbId = gnbId; -this.nrCellId = nrCellId; -this.nearrtricid = nearrtricid; -this.maxNumberOfConns = maxNumberOfConns; -} - - -public String getpLMNId() { -return pLMNId; -} - -public void setpLMNId(String pLMNId) { -this.pLMNId = pLMNId; -} - -public String getSnssai() { -return snssai; -} - -public void setSnssai(String snssai) { -this.snssai = snssai; -} - -public String getStatus() { -return status; -} - -public void setStatus(String status) { -this.status = status; -} - -public String getGnbType() { -return gnbType; -} - -public void setGnbType(String gnbType) { -this.gnbType = gnbType; -} - -public int getGnbId() { -return gnbId; -} - -public void setGnbId(int gnbId) { -this.gnbId = gnbId; -} - - -public int getNrCellId() { -return nrCellId; -} - -public void setNrCellId(int nrCellId) { -this.nrCellId = nrCellId; -} -public String getNearrtricid() { -return nearrtricid; -} - -public void setNearrtricid(String nearrtricid) { -this.nearrtricid = nearrtricid; -} - -public long getMaxNumberOfConns() { -return maxNumberOfConns; -} - -public void setMaxNumberOfConns(long maxNumberOfConns) { -this.maxNumberOfConns = maxNumberOfConns; -} + private String pLMNId; + private String snssai; + private String status; + private String gnbType; + private int gnbId; + private int nrCellId; + private String nearrtricid; + private long maxNumberOfConns; + + public PLMNInfoModel() { + + } + + public PLMNInfoModel(String pLMNId, String snssai, String status, String gnbType, int gnbId, int nrCellId, + String nearrtricid, long maxNumberOfConns) { + super(); + this.pLMNId = pLMNId; + this.snssai = snssai; + this.status = status; + this.gnbType = gnbType; + this.gnbId = gnbId; + this.nrCellId = nrCellId; + this.nearrtricid = nearrtricid; + this.maxNumberOfConns = maxNumberOfConns; + } + + public String getpLMNId() { + return pLMNId; + } + + public void setpLMNId(String pLMNId) { + this.pLMNId = pLMNId; + } + + public String getSnssai() { + return snssai; + } + + public void setSnssai(String snssai) { + this.snssai = snssai; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getGnbType() { + return gnbType; + } + + public void setGnbType(String gnbType) { + this.gnbType = gnbType; + } + + public int getGnbId() { + return gnbId; + } + + public void setGnbId(int gnbId) { + this.gnbId = gnbId; + } + + public int getNrCellId() { + return nrCellId; + } + + public void setNrCellId(int nrCellId) { + this.nrCellId = nrCellId; + } + + public String getNearrtricid() { + return nearrtricid; + } + + public void setNearrtricid(String nearrtricid) { + this.nearrtricid = nearrtricid; + } + + public long getMaxNumberOfConns() { + return maxNumberOfConns; + } + + public void setMaxNumberOfConns(long maxNumberOfConns) { + this.maxNumberOfConns = maxNumberOfConns; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RANSliceInfo.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RANSliceInfo.java index 47eb7a1..5ec30c8 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RANSliceInfo.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RANSliceInfo.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -12,85 +32,104 @@ import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.Table; -@Entity(name="RANINVENTORY") -@Table(name="RANINVENTORY") -public class RANSliceInfo implements Serializable{ +@Entity(name = "RANINVENTORY") +@Table(name = "RANINVENTORY") +public class RANSliceInfo implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="RANNFNSSIID") + @Column(name = "RANNFNSSIID") private String ranNFNSSIId; @ElementCollection - @CollectionTable(name="rannssi", joinColumns = @JoinColumn(name="rannfnssiid")) + @CollectionTable(name = "rannssi", joinColumns = @JoinColumn(name = "rannfnssiid")) private List ranNSSIList; @ElementCollection - @CollectionTable(name="nssai", joinColumns = @JoinColumn(name="rannfnssiid")) - private List nSSAIList; - @OneToMany(mappedBy = "rANSliceInventory", cascade=CascadeType.ALL) + @CollectionTable(name = "nssai", joinColumns = @JoinColumn(name = "rannfnssiid")) + private List nSSAIList; + @OneToMany(mappedBy = "rANSliceInventory", cascade = CascadeType.ALL) private List sliceProfilesList; - @Column(name="TALIST") + @Column(name = "TALIST") private String trackingAreaList; - @Column(name="SUBNETSTATUS") + @Column(name = "SUBNETSTATUS") private String subnetStatus; - @Column(name="NSSTID") + @Column(name = "NSSTID") private String nsstId; - @Column(name="SLICETYPE") + @Column(name = "SLICETYPE") private String sliceType; - @Column(name="ISSHAREABLE") + @Column(name = "ISSHAREABLE") private String isShareable; + public String getRanNFNSSIId() { return ranNFNSSIId; } + public void setRanNFNSSIId(String ranNFNSSIId) { this.ranNFNSSIId = ranNFNSSIId; } + public List getRanNSSIList() { return ranNSSIList; } + public void setRanNSSIList(List ranNSSIList) { this.ranNSSIList = ranNSSIList; } + public List getSliceProfilesList() { return sliceProfilesList; } + public void setSliceProfilesList(List sliceProfilesList) { this.sliceProfilesList = sliceProfilesList; } + public String getSubnetStatus() { return subnetStatus; } + public void setSubnetStatus(String subnetStatus) { this.subnetStatus = subnetStatus; } + public String getNsstId() { return nsstId; } + public void setNsstId(String nsstId) { this.nsstId = nsstId; } + public String getSliceType() { return sliceType; } + public void setSliceType(String sliceType) { this.sliceType = sliceType; } + public String getIsShareable() { return isShareable; } + public void setIsShareable(String isShareable) { this.isShareable = isShareable; } + public List getnSSAIList() { return nSSAIList; } + public void setnSSAIList(List nSSAIList) { this.nSSAIList = nSSAIList; } + public String getTrackingAreaList() { return trackingAreaList; } + public void setTrackingAreaList(String trackingAreaList) { this.trackingAreaList = trackingAreaList; } + @Override public String toString() { return "RANSliceInfo [ranNFNSSIId=" + ranNFNSSIId + ", ranNSSIList=" + ranNSSIList + ", nSSAIList=" + nSSAIList @@ -98,4 +137,4 @@ public class RANSliceInfo implements Serializable{ + ", subnetStatus=" + subnetStatus + ", nsstId=" + nsstId + ", sliceType=" + sliceType + ", isShareable=" + isShareable + "]"; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyMember.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyMember.java index 1b204b3..aced9cf 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyMember.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyMember.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -8,13 +28,13 @@ import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity -@Table(name="RRMPOLICYMEMBER") -public class RRMPolicyMember implements Serializable{ +@Table(name = "RRMPOLICYMEMBER") +public class RRMPolicyMember implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "PLMNID") private String pLMNId; - @Column(name="SNSSAI") + @Column(name = "SNSSAI") private String sNSSAI; @ManyToOne private RRMPolicyRatio rrmPolicy; @@ -22,20 +42,24 @@ public class RRMPolicyMember implements Serializable{ public String getpLMNId() { return pLMNId; } + public void setpLMNId(String pLMNId) { this.pLMNId = pLMNId; } - + public String getsNSSAI() { return sNSSAI; } + public void setsNSSAI(String sNSSAI) { this.sNSSAI = sNSSAI; } + public RRMPolicyRatio getRrmPolicy() { return rrmPolicy; } + public void setRrmPolicy(RRMPolicyRatio rrmPolicy) { this.rrmPolicy = rrmPolicy; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyRatio.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyRatio.java index a662eb2..27c5d9c 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyRatio.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyRatio.java @@ -1,91 +1,130 @@ -package org.onap.ransim.rest.api.models; - -import java.io.Serializable; -import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; - -@Entity -@Table(name="RRMPOLICYRATIO") -public class RRMPolicyRatio implements Serializable{ - private static final long serialVersionUID = 1L; - @Id - @Column(name="RRMPOLICYID") - private Integer rrmPolicyID; - @Column(name="RESOURCEID") - private String resourceID; - @Column(name="RESOURCETYPE") - private String resourceType; - @Column(name="SLICETYPE") - private String sliceType; -// @OneToMany(mappedBy = "rrmPolicy", cascade={CascadeType.PERSIST,CascadeType.REMOVE}) - @OneToMany(mappedBy = "rrmPolicy", cascade = CascadeType.ALL) - private List rRMPolicyMemberList; - @Column(name="QUOTATYPE") - private String quotaType; - @Column(name="RRMPOLICYMAXRATIO") - private Integer rRMPolicyMaxRatio; - @Column(name="RRMPOLICYMINRATIO") - private Integer rRMPolicyMinRatio; - @Column(name="RRMPOLICYDEDICATEDRATIO") - private Integer rRMPolicyDedicatedRatio; - public Integer getRrmPolicyID() { - return rrmPolicyID; - } - public void setRrmPolicyID(Integer rrmPolicyID) { - this.rrmPolicyID = rrmPolicyID; - } - public String getResourceID() { - return resourceID; - } - public void setResourceID(String resourceID) { - this.resourceID = resourceID; - } - public String getResourceType() { - return resourceType; - } - public void setResourceType(String resourceType) { - this.resourceType = resourceType; - } - public String getSliceType() { - return sliceType; - } - public void setSliceType(String sliceType) { - this.sliceType = sliceType; - } - public List getrRMPolicyMemberList() { - return rRMPolicyMemberList; - } - public void setrRMPolicyMemberList(List rRMPolicyMemberList) { - this.rRMPolicyMemberList = rRMPolicyMemberList; - } - public String getQuotaType() { - return quotaType; - } - public void setQuotaType(String quotaType) { - this.quotaType = quotaType; - } - public Integer getrRMPolicyMaxRatio() { - return rRMPolicyMaxRatio; - } - public void setrRMPolicyMaxRatio(Integer rRMPolicyMaxRatio) { - this.rRMPolicyMaxRatio = rRMPolicyMaxRatio; - } - public Integer getrRMPolicyMinRatio() { - return rRMPolicyMinRatio; - } - public void setrRMPolicyMinRatio(Integer rRMPolicyMinRatio) { - this.rRMPolicyMinRatio = rRMPolicyMinRatio; - } - public Integer getrRMPolicyDedicatedRatio() { - return rRMPolicyDedicatedRatio; - } - public void setrRMPolicyDedicatedRatio(Integer rRMPolicyDedicatedRatio) { - this.rRMPolicyDedicatedRatio = rRMPolicyDedicatedRatio; - } -} +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.Column; +import javax.persistence.ElementCollection; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +@Entity +@Table(name = "RRMPOLICYRATIO") +public class RRMPolicyRatio implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @Column(name = "RRMPOLICYID") + private Integer rrmPolicyID; + @Column(name = "RESOURCEID") + private String resourceID; + @Column(name = "RESOURCETYPE") + private String resourceType; + @Column(name = "SLICETYPE") + private String sliceType; +// @OneToMany(mappedBy = "rrmPolicy", cascade={CascadeType.PERSIST,CascadeType.REMOVE}) + @OneToMany(mappedBy = "rrmPolicy", cascade = CascadeType.ALL) + private List rRMPolicyMemberList; + @Column(name = "QUOTATYPE") + private String quotaType; + @Column(name = "RRMPOLICYMAXRATIO") + private Integer rRMPolicyMaxRatio; + @Column(name = "RRMPOLICYMINRATIO") + private Integer rRMPolicyMinRatio; + @Column(name = "RRMPOLICYDEDICATEDRATIO") + private Integer rRMPolicyDedicatedRatio; + + public Integer getRrmPolicyID() { + return rrmPolicyID; + } + + public void setRrmPolicyID(Integer rrmPolicyID) { + this.rrmPolicyID = rrmPolicyID; + } + + public String getResourceID() { + return resourceID; + } + + public void setResourceID(String resourceID) { + this.resourceID = resourceID; + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getSliceType() { + return sliceType; + } + + public void setSliceType(String sliceType) { + this.sliceType = sliceType; + } + + public List getrRMPolicyMemberList() { + return rRMPolicyMemberList; + } + + public void setrRMPolicyMemberList(List rRMPolicyMemberList) { + this.rRMPolicyMemberList = rRMPolicyMemberList; + } + + public String getQuotaType() { + return quotaType; + } + + public void setQuotaType(String quotaType) { + this.quotaType = quotaType; + } + + public Integer getrRMPolicyMaxRatio() { + return rRMPolicyMaxRatio; + } + + public void setrRMPolicyMaxRatio(Integer rRMPolicyMaxRatio) { + this.rRMPolicyMaxRatio = rRMPolicyMaxRatio; + } + + public Integer getrRMPolicyMinRatio() { + return rRMPolicyMinRatio; + } + + public void setrRMPolicyMinRatio(Integer rRMPolicyMinRatio) { + this.rRMPolicyMinRatio = rRMPolicyMinRatio; + } + + public Integer getrRMPolicyDedicatedRatio() { + return rRMPolicyDedicatedRatio; + } + + public void setrRMPolicyDedicatedRatio(Integer rRMPolicyDedicatedRatio) { + this.rRMPolicyDedicatedRatio = rRMPolicyDedicatedRatio; + } +} + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SNSSAI.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SNSSAI.java index db43ce0..1c35546 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SNSSAI.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SNSSAI.java @@ -1,68 +1,88 @@ -package org.onap.ransim.rest.api.models; - -import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Embedded; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -@Embeddable -@Table(name = "SNSSAI") -public class SNSSAI implements Serializable { - private static final long serialVersionUID = 1L; - - @Column(name = "sNSSAI") - private String sNSSAI; - @Column(name = "STATUS") - private String status; - @Column(name = "GLOBALSUBSCRIBERID") - private String globalSubscriberId; - @Column(name = "SUBSCRIPTIONSERVICETYPE") - private String subscriptionServiceType; - @Embedded - private NSSAIConfig configData; - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getGlobalSubscriberId() { - return globalSubscriberId; - } - - public void setGlobalSubscriberId(String globalSubscriberId) { - this.globalSubscriberId = globalSubscriberId; - } - - public String getSubscriptionServiceType() { - return subscriptionServiceType; - } - - public void setSubscriptionServiceType(String subscriptionServiceType) { - this.subscriptionServiceType = subscriptionServiceType; - } - - public NSSAIConfig getConfigData() { - return configData; - } - - public void setConfigData(NSSAIConfig configData) { - this.configData = configData; - } - - public String getsNSSAI() { - return sNSSAI; - } - - public void setsNSSAI(String sNSSAI) { - this.sNSSAI = sNSSAI; - } - -} \ No newline at end of file +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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 javax.persistence.Column; +import javax.persistence.Embeddable; +import javax.persistence.Embedded; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Embeddable +@Table(name = "SNSSAI") +public class SNSSAI implements Serializable { + private static final long serialVersionUID = 1L; + + @Column(name = "sNSSAI") + private String sNSSAI; + @Column(name = "STATUS") + private String status; + @Column(name = "GLOBALSUBSCRIBERID") + private String globalSubscriberId; + @Column(name = "SUBSCRIPTIONSERVICETYPE") + private String subscriptionServiceType; + @Embedded + private NSSAIConfig configData; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getGlobalSubscriberId() { + return globalSubscriberId; + } + + public void setGlobalSubscriberId(String globalSubscriberId) { + this.globalSubscriberId = globalSubscriberId; + } + + public String getSubscriptionServiceType() { + return subscriptionServiceType; + } + + public void setSubscriptionServiceType(String subscriptionServiceType) { + this.subscriptionServiceType = subscriptionServiceType; + } + + public NSSAIConfig getConfigData() { + return configData; + } + + public void setConfigData(NSSAIConfig configData) { + this.configData = configData; + } + + public String getsNSSAI() { + return sNSSAI; + } + + public void setsNSSAI(String sNSSAI) { + this.sNSSAI = sNSSAI; + } + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SliceProfile.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SliceProfile.java index 4705674..d8f280b 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SliceProfile.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SliceProfile.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -12,45 +32,52 @@ import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity -@Table(name="SLICEPROFILE") -public class SliceProfile implements Serializable{ +@Table(name = "SLICEPROFILE") +public class SliceProfile implements Serializable { private static final long serialVersionUID = 1L; - + @Id - @Column(name="SLICEPROFILEID") + @Column(name = "SLICEPROFILEID") private String sliceProfileId; - @Column(name="SNSSAI") + @Column(name = "SNSSAI") private String sNSSAI; - @Column(name="PLMNIDLIST") + @Column(name = "PLMNIDLIST") private String pLMNIdList; - @Column(name="MAXNOOFUES") + @Column(name = "MAXNOOFUES") private Integer maxNumberofUEs; - @Column(name="LATENCY") + @Column(name = "LATENCY") private Integer latency; - @Column(name="DLTHPTPERSLICE") + @Column(name = "DLTHPTPERSLICE") private Integer dLThptPerSlice; - @Column(name="ULTHPTPERSLICE") + @Column(name = "ULTHPTPERSLICE") private Integer uLThptPerSlice; - @Column(name="MAXNUMBEROFCONNS") + @Column(name = "MAXNUMBEROFCONNS") private Integer maxNumberofConns; + public Integer getdLThptPerSlice() { return dLThptPerSlice; } + public void setdLThptPerSlice(Integer dLThptPerSlice) { this.dLThptPerSlice = dLThptPerSlice; } + public Integer getuLThptPerSlice() { return uLThptPerSlice; } + public void setuLThptPerSlice(Integer uLThptPerSlice) { this.uLThptPerSlice = uLThptPerSlice; } + public Integer getMaxNumberofConns() { return maxNumberofConns; } + public void setMaxNumberofConns(Integer maxNumberofConns) { this.maxNumberofConns = maxNumberofConns; } + public String getCoverageAreaList() { return coverageAreaList; } @@ -63,68 +90,85 @@ public class SliceProfile implements Serializable{ * @Column(name="MAXNUMBEROFPDUSESSIONS") private Integer * maxNumberofPDUSessions; */ - @Column(name="UEMOBILITYLEVEL") + @Column(name = "UEMOBILITYLEVEL") private String uEMobilityLevel; - @Column(name="RESOURCESHARINGLEVEL") + @Column(name = "RESOURCESHARINGLEVEL") private String resourceSharingLevel; - //@ElementCollection - //@CollectionTable(name="coveragearealist", joinColumns = @JoinColumn(name="sliceprofileid")) - @Column(name="coveragearealist") + // @ElementCollection + // @CollectionTable(name="coveragearealist", joinColumns = + // @JoinColumn(name="sliceprofileid")) + @Column(name = "coveragearealist") private String coverageAreaList; @ManyToOne @JoinColumn(name = "rannfnssiid") private RANSliceInfo rANSliceInventory; + public String getSliceProfileId() { return sliceProfileId; } + public void setSliceProfileId(String sliceProfileId) { this.sliceProfileId = sliceProfileId; } + public String getsNSSAI() { return sNSSAI; } + public void setsNSSAI(String sNSSAI) { this.sNSSAI = sNSSAI; } + public String getpLMNIdList() { return pLMNIdList; } + public void setpLMNIdList(String pLMNIdList) { this.pLMNIdList = pLMNIdList; } + public Integer getMaxNumberofUEs() { return maxNumberofUEs; } + public void setMaxNumberofUEs(Integer maxNumberofUEs) { this.maxNumberofUEs = maxNumberofUEs; } + public Integer getLatency() { return latency; } + public void setLatency(Integer latency) { this.latency = latency; } + public String getuEMobilityLevel() { return uEMobilityLevel; } + public void setuEMobilityLevel(String uEMobilityLevel) { this.uEMobilityLevel = uEMobilityLevel; } + public String getResourceSharingLevel() { return resourceSharingLevel; } + public void setResourceSharingLevel(String resourceSharingLevel) { this.resourceSharingLevel = resourceSharingLevel; } + public RANSliceInfo getrANSliceInventory() { return rANSliceInventory; } + public void setrANSliceInventory(RANSliceInfo rANSliceInventory) { this.rANSliceInventory = rANSliceInventory; } - + public void setCoverageAreaList(String coverageAreaList) { this.coverageAreaList = coverageAreaList; } - -} \ No newline at end of file + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/TACells.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/TACells.java index b56cf2b..37ff491 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/TACells.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/TACells.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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; @@ -8,29 +28,33 @@ import javax.persistence.Id; import javax.persistence.Table; @Entity -@Table(name="TACELLS") -public class TACells implements Serializable{ +@Table(name = "TACELLS") +public class TACells implements Serializable { private static final long serialVersionUID = 1L; @Id - @Column(name="TRACKINGAREA") + @Column(name = "TRACKINGAREA") private String trackingArea; - @Column(name="CELLS") + @Column(name = "CELLS") private String cellsList; + public String getTrackingArea() { return trackingArea; } + public void setTrackingArea(String trackingArea) { this.trackingArea = trackingArea; } - + public String getCellsList() { return cellsList; } + public void setCellsList(String cellsList) { this.cellsList = cellsList; } + @Override public String toString() { return "TACells [trackingArea=" + trackingArea + ", cellsList=" + cellsList + "]"; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUCPRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUCPRepository.java index b591e09..06bf630 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUCPRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUCPRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import java.util.List; @@ -9,9 +29,11 @@ import org.springframework.stereotype.Repository; import org.onap.ransim.rest.api.models.GNBCUCPFunction; @Repository -public interface GNBCUCPRepository extends CrudRepository{ - @Query(nativeQuery=true, value="select distinct(cucp.gnbcuname) from gnbcucpfunction cucp join nrcellcu cellcu where cellcu.celllocalid in (:cellIdList)") +public interface GNBCUCPRepository extends CrudRepository { + @Query(nativeQuery = true, value = "select distinct(cucp.gnbcuname) from gnbcucpfunction cucp join nrcellcu cellcu where cellcu.celllocalid in (:cellIdList)") public List findCUCPByCellIds(List cellIdList); + @Query(nativeQuery = true, value = "select * from gnbcucpfunction cucp join plmninfo plmn where plmn.snssai=?1 and plmn.nrcellcu_celllocalid IS NOT NULL") public List findCUCPsByNSSAI(String nSSAI); } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUUPRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUUPRepository.java index 8d15deb..62d76e6 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUUPRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUUPRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.repository.CrudRepository; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBDURepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBDURepository.java index cbc2182..eec816d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBDURepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBDURepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellCURepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellCURepository.java index 4890343..7cb3629 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellCURepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellCURepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.repository.CrudRepository; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellDURepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellDURepository.java index b1c123c..7022c6f 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellDURepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellDURepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.onap.ransim.rest.api.models.NRCellDU; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NearRTRICRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NearRTRICRepository.java index 2f90fd4..dee5b17 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NearRTRICRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NearRTRICRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import java.util.List; @@ -21,4 +41,4 @@ public interface NearRTRICRepository extends CrudRepository{ @Query(nativeQuery = true, value = "select * from nearrtric ric join plmninfo plmn where plmn.snssai=?1 and plmn.nearrtricid IS NOT NULL") public Set findNearRTRICByNSSAI(String nSSAI); -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RANInventoryRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RANInventoryRepository.java index 7511a89..7b41e9e 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RANInventoryRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RANInventoryRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.jpa.repository.Query; @@ -10,4 +30,4 @@ import org.onap.ransim.rest.api.models.RANSliceInfo; public interface RANInventoryRepository extends CrudRepository{ @Query(nativeQuery = true, value = "select distinct(raninfo.rannfnssiid) from raninventory raninfo join nssai where nssai.nssailist=?1") public String findRANNFNSSIofNSSAI(String sNSSAI); -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyMemberRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyMemberRepository.java index a6f96d8..365869d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyMemberRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyMemberRepository.java @@ -1,23 +1,23 @@ -/******************************************************************************* -* ============LICENSE_START======================================================= -* Config DB -* ================================================================================ -* Copyright (C) 2020-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. -* 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========================================================= -* -*******************************************************************************/ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.repository.CrudRepository; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyRepository.java index 7a37572..1cb786a 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.jpa.repository.Query; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/SliceProfileRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/SliceProfileRepository.java index 717160a..7f706ef 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/SliceProfileRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/SliceProfileRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.onap.ransim.rest.api.models.SliceProfile; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/TACellRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/TACellRepository.java index 6ad6971..9a0a70d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/TACellRepository.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/TACellRepository.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.repository; import org.springframework.data.repository.CrudRepository; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java index 8ecd1f5..d7e4b5d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.services; import java.util.ArrayList; @@ -9,10 +29,9 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import org.apache.log4j.Logger; import org.modelmapper.ModelMapper; import org.modelmapper.convention.MatchingStrategies; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -47,7 +66,7 @@ import org.onap.ransim.rest.web.mapper.RRMPolicyRatioModel; @Service public class RANSliceConfigService { - private static final Logger logger = LoggerFactory.getLogger(RANSliceConfigService.class); + private static Logger logger = Logger.getLogger(RANSliceConfigService.class.getName()); @Autowired private NRCellCURepository nRCellCURepository; @@ -596,8 +615,11 @@ public class RANSliceConfigService { logger.debug("Request recieved to fetch all DUs"); modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); List duList = (List) gNBDURepository.findAll(); - List duModels = duList.stream() - .map(duEntity -> modelMapper.map(duEntity, GNBDUModel.class)).collect(Collectors.toList()); + List duModels = duList.stream().map(duEntity -> { + GNBDUModel gnbDuModel = modelMapper.map(duEntity, GNBDUModel.class); + gnbDuModel.setNearRTRICId(duEntity.getNearRTRIC().getNearRTRICId()); + return gnbDuModel; + }).collect(Collectors.toList()); return duModels; } @@ -611,4 +633,4 @@ public class RANSliceConfigService { return rtricmodels; } -} \ No newline at end of file +} 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 2a9a655..e51af6f 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 @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.services; import java.util.ArrayList; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/SlicingPMDataGenerator.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/SlicingPMDataGenerator.java index 3b14100..c03d439 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/SlicingPMDataGenerator.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/SlicingPMDataGenerator.java @@ -1,4 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 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. + * 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.services; +import java.util.Collection; +import java.util.Set; import java.io.File; import java.time.LocalDateTime; @@ -10,15 +32,14 @@ import java.util.Map; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; +import javax.websocket.Session; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import java.io.ByteArrayOutputStream; -import javax.xml.bind.annotation.XmlRootElement; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamWriter; - import org.onap.ransim.rest.api.exceptions.RansimException; import org.onap.ransim.rest.api.models.NSSAIConfig; import org.onap.ransim.rest.web.mapper.GNBDUModel; @@ -40,6 +61,8 @@ import org.onap.ransim.rest.xml.models.MeasType; import org.onap.ransim.rest.xml.models.MeasValue; import org.onap.ransim.rest.xml.models.ReportingPeriod; import org.onap.ransim.rest.xml.models.Result; +import org.onap.ransim.websocket.model.SlicingPmMessage; +import org.onap.ransim.websocket.server.RansimWebSocketServer; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.ParameterizedTypeReference; @@ -52,6 +75,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; +import com.google.gson.Gson; + @Service public class SlicingPMDataGenerator { @@ -69,83 +94,38 @@ public class SlicingPMDataGenerator { * * @throws RansimException */ - public void generateClosedLoopPmData(long startTime) { - try{ - String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/du-list"; - List duList = sendGetRequestToransimDb(requestUrl).getBody();; -NSSAIConfig nSSAIConfig = new NSSAIConfig(); -nSSAIConfig.setdLThptPerSlice(27); -nSSAIConfig.setuLThptPerSlice(30); -nSSAIConfig.setMaxNumberOfConns(3000); - -NSSAIData nSSAIData = new NSSAIData(); -nSSAIData.setsNSSAI("001-010000"); -nSSAIData.setStatus("ACTIVE"); -nSSAIData.setGlobalSubscriberId("Customer-001"); -nSSAIData.setSubscriptionServiceType("Premium"); -nSSAIData.setConfigData(nSSAIConfig); -NSSAIData nSSAIData2 = new NSSAIData(); -nSSAIData2.setsNSSAI("001-010001"); -nSSAIData2.setStatus("ACTIVE"); -nSSAIData2.setGlobalSubscriberId("Customer-001"); -nSSAIData2.setSubscriptionServiceType("Premium"); -nSSAIData2.setConfigData(nSSAIConfig); - -PLMNInfoModel pLMNInfoModel1 = new PLMNInfoModel(); -pLMNInfoModel1.setpLMNId("310-410 "); -pLMNInfoModel1.setsNSSAI(nSSAIData); -PLMNInfoModel pLMNInfoModel2 = new PLMNInfoModel(); -pLMNInfoModel2.setpLMNId("310-411 "); -pLMNInfoModel2.setsNSSAI(nSSAIData2); - -List myPLMNInfoModelList = new ArrayList(); -myPLMNInfoModelList.add(pLMNInfoModel1); -myPLMNInfoModelList.add(pLMNInfoModel2); - - - for (GNBDUModel du : duList) { - List duCellList = du.getCellDUList(); - for (NRCellDUModel cell : duCellList ) { - cell.setpLMNInfoList(myPLMNInfoModelList); -} -} - -duList.forEach(x->logger.debug("DU : " + x)); - for (GNBDUModel du : duList) { - logger.info("Generating PM data for DU : " + du.getgNBDUName()+ " Id :" + du.getgNBDUId()); - - Map myactiveNssai = new HashMap<>(); -Map activeNssaiDetails = new HashMap(); - List duCellList = du.getCellDUList(); -logger.debug("duCellList.size : " + duCellList.size()); - int ricId = du.getNearRTRICId(); -logger.debug("RIC ID : " + ricId); - List plmnInfoList = new ArrayList<>(); - duCellList.forEach(cell -> plmnInfoList.addAll(cell.getpLMNInfoList())); - List nssaiData = new ArrayList<>(); - plmnInfoList.forEach(plmnInfo -> nssaiData.add(plmnInfo.getsNSSAI())); - nssaiData.stream().filter(nssai -> nssai.getStatus().equalsIgnoreCase("active")) - .forEach(x -> activeNssaiDetails.put(x.getsNSSAI(), x.getConfigData())); -logger.debug("Goin to produceMeasurementCollectionFile"); - - for (NRCellDUModel cell : duCellList ) { - nssaiData.stream().filter(nssai -> nssai.getStatus().equalsIgnoreCase("active")) - .forEach(x -> myactiveNssai.put(x.getsNSSAI(), cell.getCellLocalId())); - } -logger.debug("myactiveNssai.size : " + myactiveNssai.size()); - produceMeasurementCollectionFile(du, activeNssaiDetails, duCellList, ricId); - logger.info("PM data generated for DU : "+ du.getgNBDUName() + " Id: " + du.getgNBDUId()); + public void generateClosedLoopPmData(long startTime) { + try { + String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/du-list"; + List duList = sendGetRequestToransimDb(requestUrl).getBody(); + for (GNBDUModel du : duList) { + logger.info("Generating PM data for DU : " + du.getgNBDUName() + " Id :" + du.getgNBDUId()); + Map activeNssaiDetails = new HashMap(); + List duCellList = du.getCellDUList(); + int ricId = du.getNearRTRICId(); + List plmnInfoList = new ArrayList<>(); + duCellList.forEach(cell -> plmnInfoList.addAll(cell.getpLMNInfoList())); + List nssaiData = new ArrayList<>(); + plmnInfoList.forEach(plmnInfo -> nssaiData.add(plmnInfo.getsNSSAI())); + nssaiData.stream().filter(nssai -> nssai.getStatus().equalsIgnoreCase("active")) + .forEach(x -> activeNssaiDetails.put(x.getsNSSAI(), x.getConfigData())); + produceMeasurementCollectionFile(du, activeNssaiDetails, duCellList, ricId); + logger.info("PM data generated for DU : " + du.getgNBDUName() + " Id: " + du.getgNBDUId()); + } + } catch (RansimException e) { + logger.debug("ERROR in closed lopp PM data generation : "); + logger.debug(e); + } catch (Exception exp) { + logger.debug(exp); } -}catch(RansimException e){ - logger.debug("ERROR in closed lopp PM data generation : "); -logger.debug(e); - } catch(Exception er){ -logger.debug(er); } -} + private void produceMeasurementCollectionFile(GNBDUModel du, Map activeNssaiDetails, List duCellList, int ricId) throws RansimException { -logger.debug("produceMeasurementCollectionFile"); + logger.debug("produceing MeasurementCollectionFile "); + SlicingPmMessage pmMessage = new SlicingPmMessage(); + pmMessage.setStartEpochMicrosec(System.currentTimeMillis() * 1000); + pmMessage.setSourceName(du.getgNBDUName()); LocalDateTime beginTime = LocalDateTime.now(); String beginTimeString = beginTime.toString(); MeasCollec measCollec = new MeasCollec(beginTimeString); @@ -155,10 +135,10 @@ logger.debug("produceMeasurementCollectionFile"); int jobId = r.nextInt((9999 - 1000) + 1) + 1000; Job job = new Job(String.valueOf(jobId)); ReportingPeriod reportingPeriod = new ReportingPeriod("PT900S"); - + List measTypeList = setMeasurementTypes(activeNssaiDetails); - List measValueList = setMeasurementValues(duCellList,getMaxVariation(ricId)); - + List measValueList = setMeasurementValues(duCellList, getMaxVariation(ricId), measTypeList); + ManagedElement managedElement = new ManagedElement("r0.1", du.getgNBDUName()); LocalDateTime grabularityEndTime = LocalDateTime.now(); String grabularityEndTimeString = grabularityEndTime.toString(); @@ -172,66 +152,41 @@ logger.debug("produceMeasurementCollectionFile"); measDataList.add(measData); LocalDateTime endTime = LocalDateTime.now(); String endTimeString = endTime.toString(); + pmMessage.setLastEpochMicrosec(System.currentTimeMillis() * 1000); MeasCollecEnd measCollecEnd = new MeasCollecEnd(endTimeString); FileFooter fileFooter = new FileFooter(measCollecEnd); MeasCollecFile measCollecFile = new MeasCollecFile(fileHeader, measDataList, fileFooter, "http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec"); - JAXBContext jaxbContext; try { - jaxbContext = JAXBContext.newInstance(MeasCollecFile.class); - Marshaller marshaller = jaxbContext.createMarshaller(); - - marshaller.setProperty("jaxb.encoding", "UTF-8"); - marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); -ByteArrayOutputStream baos = new ByteArrayOutputStream(); - XMLStreamWriter xmlStreamWriter = XMLOutputFactory.newFactory().createXMLStreamWriter( - baos, (String) marshaller.getProperty(Marshaller.JAXB_ENCODING)); - xmlStreamWriter.writeStartDocument( - (String) marshaller.getProperty(Marshaller.JAXB_ENCODING), "1.0"); - - - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.setProperty("com.sun.xml.bind.xmlHeaders", - ""); String startDate = beginTimeString.replace(':', '-'); String endDate = endTimeString.replace(':', '-'); - String fileName = "./" + "A" + startDate + "-" + endDate + "-" + String.valueOf(jobId) + "-" + du.getgNBDUName() - + ".xml"; -logger.debug("Craeting file"); - marshaller.marshal(measCollecFile, new File("/tmp/ransim-install/ClosedLoopData/" + fileName)); - marshaller.marshal(measCollecFile, System.out); - marshaller.marshal(measCollecFile, xmlStreamWriter); - } catch (JAXBException e) { - throw new RansimException(e); + String fileName = "A" + startDate + "-" + endDate + "-" + String.valueOf(jobId) + "-" + + du.getgNBDUName() + ".xml"; + pmMessage.setFileName(fileName); + Gson gson = new Gson(); + String pmData = gson.toJson(measCollecFile); + pmMessage.setPmData(pmData); + closedLoopPmData(pmMessage); + } catch (Exception exp) { + logger.debug(exp); } -catch(Exception er){ -logger.debug(er); - } - logger.info("measCollec: " + measCollecFile.toString()); } - private List setMeasurementValues(List duCellList, double ricIdVariation) { -logger.debug("setMeasurementValues"); + private List setMeasurementValues(List duCellList, double ricIdVariation, + List measTypeList) { + logger.debug("setting MeasurementValues"); List measValueList = new ArrayList(); duCellList.forEach(cell -> { - int pvalue = 1; - int prbs = cell.getPrbs(); - int prbsUsedDl = (int) (Math.random() * ricIdVariation * prbs); - int prbsUsedUl = (int) (Math.random() * ricIdVariation * prbs); - int prbsUsedDl1 = (int) (Math.random() * ricIdVariation * prbs); - int prbsUsedUl2 = (int) (Math.random() * ricIdVariation * prbs); + AtomicInteger pValue = new AtomicInteger(1); List resultList = new ArrayList<>(); - Result result1 = new Result(pvalue++, prbsUsedDl); - Result result2 = new Result(pvalue++, prbsUsedUl); - Result result3 = new Result(pvalue++, prbsUsedDl1); - Result result4 = new Result(pvalue++, prbsUsedUl2); - - resultList.add(result1); - resultList.add(result2); - resultList.add(result3); - resultList.add(result4); + int prbs = cell.getPrbs(); + measTypeList.forEach(meas -> { + int prbsUsed = (int) (Math.random() * ricIdVariation * prbs); + Result result = new Result(pValue.getAndIncrement(), prbsUsed); + resultList.add(result); + }); MeasValue measValue = new MeasValue(cell.getCellLocalId(), resultList, false); measValueList.add(measValue); @@ -253,6 +208,7 @@ logger.debug("setMeasurementValues"); } private List setMeasurementTypes(Map activeNssaiDetails) { + logger.debug("setting MeasurementTypes"); List measTypeList = new ArrayList(); AtomicInteger pValue = new AtomicInteger(1); activeNssaiDetails.forEach((nssai, configData) -> { @@ -263,7 +219,7 @@ logger.debug("setMeasurementValues"); }); return measTypeList; } - + public static ResponseEntity> sendGetRequestToransimDb(String requestUrl) { HttpHeaders headers = new HttpHeaders(); logger.info("sending request to ransimdb : " + requestUrl); @@ -278,5 +234,28 @@ logger.debug("setMeasurementValues"); return new ResponseEntity<>(HttpStatus.NOT_FOUND); } } + + public void closedLoopPmData(SlicingPmMessage pmMessage) { + Gson gson = new Gson(); + String jsonStr = gson.toJson(pmMessage); + logger.info("ClosedPmData " + jsonStr); + String ipPort = RansimControllerServices.serverIdIpPortMapping.get(pmMessage.getSourceName()); + if (ipPort != null && !ipPort.trim().equals("")) { + logger.info("Connection estabilished with ip: " + ipPort); + if (ipPort != null && !ipPort.trim().equals("")) { + Session clSess = RansimControllerServices.webSocketSessions.get(ipPort); + if (clSess != null) { + logger.info("PM Data message sent."); + RansimWebSocketServer.sendIntelligentSlicingPmData(jsonStr, clSess); + } else { + logger.info("No client session for " + ipPort); + } + } else { + logger.info("No client for this serverId"); + } + } else { + logger.info("No client for "); + } + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellData.java index 5f42cb6..5e8ca87 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellData.java @@ -1,12 +1,25 @@ -package org.onap.ransim.rest.web.mapper; - -/** - * - * Request mapper class - * - * @author Devendra Chauhan +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; + public class CellData { private String networkId; private String nodeId; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellInputPayload.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellInputPayload.java index 26c489f..3b8370b 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellInputPayload.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellInputPayload.java @@ -1,14 +1,27 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; -/** - * Request Mapper Class for BulkUpoad - * - * @author Devendra Chauhan - * - */ - public class CellInputPayload { List cellList; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellNbrInfoResponse.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellNbrInfoResponse.java index 0f6ef20..cfd5554 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellNbrInfoResponse.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellNbrInfoResponse.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import javax.persistence.Column; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellObj.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellObj.java index f12ec6d..7214456 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellObj.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellObj.java @@ -1,13 +1,28 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * Request mapper class - * @author Devendra - * - */ public class CellObj { diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellPciValueObj.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellPciValueObj.java index 32c2710..03cebc5 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellPciValueObj.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/CellPciValueObj.java @@ -1,10 +1,25 @@ -package org.onap.ransim.rest.web.mapper; -/** - * Request mapper Class - * @author Devendra Chauhan +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; + public class CellPciValueObj { private String cellId; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/ErrorData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/ErrorData.java index 49b5979..09ca96e 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/ErrorData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/ErrorData.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; public enum ErrorData { diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUCPModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUCPModel.java index b7d8bde..6e1d143 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUCPModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUCPModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUUPModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUUPModel.java index 46a3e7c..979e9d1 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUUPModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBCUUPModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBDUModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBDUModel.java index 095d109..9b0b48d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBDUModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/GNBDUModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java index 25ebeb9..5fe59d9 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellDUModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellDUModel.java index bc79608..5340eeb 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellDUModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellDUModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIConfigData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIConfigData.java index f8e11d9..0b3681f 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIConfigData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIConfigData.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; public class NSSAIConfigData{ @@ -34,4 +54,4 @@ public class NSSAIConfigData{ return "NSSAIConfigData [dLThptPerSlice=" + dLThptPerSlice + ", uLThptPerSlice=" + uLThptPerSlice + ", maxNumberOfConns=" + maxNumberOfConns + ", lastUpdatedTS=" + lastUpdatedTS + "]"; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIData.java index a88beeb..364795e 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NSSAIData.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; @@ -40,4 +60,4 @@ public class NSSAIData{ public void setConfigData(NSSAIConfig configData) { this.configData = configData; } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetwork.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetwork.java index 87b8cd3..8b207b3 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetwork.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetwork.java @@ -1,11 +1,27 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; -/** - * Request mapper Class for NbrCellNetwork - * @author Devendra Chauhan - * - */ + public class NbrCellsNetwork { //param diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetworkResponse.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetworkResponse.java index 20697c9..24c0296 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetworkResponse.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrCellsNetworkResponse.java @@ -1,13 +1,29 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * Response Mapper for NbrCellsNetwork - * @author Devendra Chauhan - * - */ + public class NbrCellsNetworkResponse { private String networkId; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrList.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrList.java index 828c4c8..b13f7fd 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrList.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrList.java @@ -1,11 +1,27 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; -/** - * Mapper Class for NbrList - * @author Devendra Chauhan - * - */ + public class NbrList { //param diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrListResponse.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrListResponse.java index 7fa6b0e..8cce96d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrListResponse.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrListResponse.java @@ -1,10 +1,30 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; /** * * Response Mapper class for NbrList - * @author Devendra Chauhan * */ public class NbrListResponse { diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrObj.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrObj.java index 06e1edf..9fd8f38 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrObj.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NbrObj.java @@ -1,10 +1,25 @@ -package org.onap.ransim.rest.web.mapper; - -/** - * Mapper class for nbrObj - * @author Devendra Chauhan +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; + public class NbrObj { private String targetCellId; private boolean ho; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NearRTRICModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NearRTRICModel.java index 4ed839e..57ec2d8 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NearRTRICModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NearRTRICModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/PLMNInfoModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/PLMNInfoModel.java index 19c9fcd..6bbc0ca 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/PLMNInfoModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/PLMNInfoModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; public class PLMNInfoModel{ diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RANSliceInfoModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RANSliceInfoModel.java index d37912b..d04caad 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RANSliceInfoModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RANSliceInfoModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.io.Serializable; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyMemberModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyMemberModel.java index 268576b..7d613f5 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyMemberModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyMemberModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; public class RRMPolicyMemberModel{ diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyRatioModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyRatioModel.java index 4ef2597..2a78238 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyRatioModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/RRMPolicyRatioModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/Result.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/Result.java index 8a6b789..20b08fc 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/Result.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/Result.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import com.fasterxml.jackson.annotation.JsonProperty; @@ -5,8 +25,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** * Mapper Class for Result * - * @author Devendra Chauhan - * */ public class Result { // param diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/SliceProfileModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/SliceProfileModel.java index f08ce64..c1f45dd 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/SliceProfileModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/SliceProfileModel.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.web.mapper; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileFooter.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileFooter.java index 20171bc..75c0ea0 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileFooter.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileFooter.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -20,23 +24,28 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class FileFooter { -private MeasCollecEnd measCollec; -public FileFooter() { + private MeasCollecEnd measCollec; -} -public FileFooter(MeasCollecEnd measCollec) { -super(); -this.measCollec = measCollec; -} -public MeasCollecEnd getMeasCollec() { -return measCollec; -} -public void setMeasCollec(MeasCollecEnd measCollec) { -this.measCollec = measCollec; -} -@Override -public String toString() { -return "FileFooter [measCollec=" + measCollec + "]"; -} + public FileFooter() { + + } + + public FileFooter(MeasCollecEnd measCollec) { + super(); + this.measCollec = measCollec; + } + + public MeasCollecEnd getMeasCollec() { + return measCollec; + } + + public void setMeasCollec(MeasCollecEnd measCollec) { + this.measCollec = measCollec; + } + + @Override + public String toString() { + return "FileFooter [measCollec=" + measCollec + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileHeader.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileHeader.java index 61cc6bf..dd1adac 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileHeader.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileHeader.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,59 +25,73 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class FileHeader { -private String dnPrefix; -private String vendorName; -private String fileFormatVersion; -private MeasCollec measCollec; -private FileSender fileSender; -public FileHeader() { + private String dnPrefix; + private String vendorName; + private String fileFormatVersion; + private MeasCollec measCollec; + private FileSender fileSender; + public FileHeader() { + + } + + public FileHeader(String dnPrefix, String vendorName, String fileFormatVersion, MeasCollec measCollec, + FileSender fileSender) { + super(); + this.dnPrefix = dnPrefix; + this.vendorName = vendorName; + this.fileFormatVersion = fileFormatVersion; + this.measCollec = measCollec; + this.fileSender = fileSender; + } + + public MeasCollec getMeasCollec() { + return measCollec; + } + + public void setMeasCollec(MeasCollec measCollec) { + this.measCollec = measCollec; + } + + @XmlAttribute + public String getDnPrefix() { + return dnPrefix; + } + + public void setDnPrefix(String dnPrefix) { + this.dnPrefix = dnPrefix; + } + + @XmlAttribute + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + @XmlAttribute + public String getFileFormatVersion() { + return fileFormatVersion; + } + + public void setFileFormatVersion(String fileFormatVersion) { + this.fileFormatVersion = fileFormatVersion; + } + + public FileSender getFileSender() { + return fileSender; + } + + public void setFileSender(FileSender fileSender) { + this.fileSender = fileSender; + } + + @Override + public String toString() { + return "FileHeader [dnPrefix=" + dnPrefix + ", vendorName=" + vendorName + ", fileFormatVersion=" + + fileFormatVersion + ", measCollec=" + measCollec + ", fileSender=" + fileSender + "]"; + } } -public FileHeader(String dnPrefix, String vendorName, String fileFormatVersion, MeasCollec measCollec, -FileSender fileSender) { -super(); -this.dnPrefix = dnPrefix; -this.vendorName = vendorName; -this.fileFormatVersion = fileFormatVersion; -this.measCollec = measCollec; -this.fileSender = fileSender; -} -public MeasCollec getMeasCollec() { -return measCollec; -} -public void setMeasCollec(MeasCollec measCollec) { -this.measCollec = measCollec; -} -@XmlAttribute -public String getDnPrefix() { -return dnPrefix; -} -public void setDnPrefix(String dnPrefix) { -this.dnPrefix = dnPrefix; -} -@XmlAttribute -public String getVendorName() { -return vendorName; -} -public void setVendorName(String vendorName) { -this.vendorName = vendorName; -} -@XmlAttribute -public String getFileFormatVersion() { -return fileFormatVersion; -} -public void setFileFormatVersion(String fileFormatVersion) { -this.fileFormatVersion = fileFormatVersion; -} -public FileSender getFileSender() { -return fileSender; -} -public void setFileSender(FileSender fileSender) { -this.fileSender = fileSender; -} -@Override -public String toString() { -return "FileHeader [dnPrefix=" + dnPrefix + ", vendorName=" + vendorName + ", fileFormatVersion=" -+ fileFormatVersion + ", measCollec=" + measCollec + ", fileSender=" + fileSender + "]"; -} -} + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileSender.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileSender.java index ddf0b1f..55c091d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileSender.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/FileSender.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,33 +25,34 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class FileSender { -private String localDn; + private String localDn; + //private String elementType; -public FileSender() { + public FileSender() { -} -public FileSender(String localDn) { -super(); -this.localDn = localDn; -} -@XmlAttribute -public String getLocalDn() { -return localDn; -} -public void setLocalDn(String localDn) { -this.localDn = localDn; -} -/*@XmlAttribute -public String getElementType() { -return elementType; -} -public void setElementType(String elementType) { -this.elementType = elementType; -}*/ -@Override -public String toString() { -return "FileSender [localDn=" + localDn + "]"; -} -} + } + + public FileSender(String localDn) { + super(); + this.localDn = localDn; + } + @XmlAttribute + public String getLocalDn() { + return localDn; + } + + public void setLocalDn(String localDn) { + this.localDn = localDn; + } + + /* + * @XmlAttribute public String getElementType() { return elementType; } public + * void setElementType(String elementType) { this.elementType = elementType; } + */ + @Override + public String toString() { + return "FileSender [localDn=" + localDn + "]"; + } +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/GranularityPeriod.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/GranularityPeriod.java index ef9be95..7defc65 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/GranularityPeriod.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/GranularityPeriod.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,36 +25,40 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class GranularityPeriod { - private String endTime; - private String duration; - - public GranularityPeriod() { + private String endTime; + private String duration; -} - - public GranularityPeriod(String endTime, String duration) { -super(); -this.endTime = endTime; -this.duration = duration; -} -@XmlAttribute -public String getEndTime() { -return endTime; -} -public void setEndTime(String endTime) { -this.endTime = endTime; -} -@XmlAttribute -public String getDuration() { -return duration; -} -public void setDuration(String duration) { -this.duration = duration; -} -@Override -public String toString() { -return "GranularityPeriod [endTime=" + endTime + ", duration=" + duration + "]"; -} -} + public GranularityPeriod() { + + } + + public GranularityPeriod(String endTime, String duration) { + super(); + this.endTime = endTime; + this.duration = duration; + } + + @XmlAttribute + public String getEndTime() { + return endTime; + } + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + @XmlAttribute + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + + @Override + public String toString() { + return "GranularityPeriod [endTime=" + endTime + ", duration=" + duration + "]"; + } +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Job.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Job.java index ec38194..9999933 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Job.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Job.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,29 +25,30 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Job { -private String jobId; -public Job() { + private String jobId; -} + public Job() { -public Job(String jobId) { -super(); -this.jobId = jobId; -} + } -@XmlAttribute -public String getJobId() { -return jobId; -} + public Job(String jobId) { + super(); + this.jobId = jobId; + } -public void setJobId(String jobId) { -this.jobId = jobId; -} + @XmlAttribute + public String getJobId() { + return jobId; + } -@Override -public String toString() { -return "Job [jobId=" + jobId + "]"; -} + public void setJobId(String jobId) { + this.jobId = jobId; + } + + @Override + public String toString() { + return "Job [jobId=" + jobId + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ManagedElement.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ManagedElement.java index 67da4da..f8b43c7 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ManagedElement.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ManagedElement.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,45 +25,47 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class ManagedElement { - private String swVersion; - private String localDn; + private String swVersion; + private String localDn; // private String userLabel; - - public ManagedElement() { -} - public ManagedElement(String swVersion, String localDn) { -super(); -this.swVersion = swVersion; -this.localDn = localDn; + public ManagedElement() { + + } + + public ManagedElement(String swVersion, String localDn) { + super(); + this.swVersion = swVersion; + this.localDn = localDn; //this.userLabel = userLabel; -} -@XmlAttribute -public String getSwVersion() { -return swVersion; -} -public void setSwVersion(String swVersion) { -this.swVersion = swVersion; -} -@XmlAttribute -public String getLocalDn() { -return localDn; -} -public void setLocalDn(String localDn) { -this.localDn = localDn; -} -/* -@XmlAttribute -public String getUserLabel() { -return userLabel; -} -public void setUserLabel(String userLabel) { -this.userLabel = userLabel; -}*/ -@Override -public String toString() { -return "ManagedElement [swVersion=" + swVersion + ", localDn=" + localDn + "]"; -} + } + + @XmlAttribute + public String getSwVersion() { + return swVersion; + } + + public void setSwVersion(String swVersion) { + this.swVersion = swVersion; + } + + @XmlAttribute + public String getLocalDn() { + return localDn; + } + + public void setLocalDn(String localDn) { + this.localDn = localDn; + } + + /* + * @XmlAttribute public String getUserLabel() { return userLabel; } public void + * setUserLabel(String userLabel) { this.userLabel = userLabel; } + */ + @Override + public String toString() { + return "ManagedElement [swVersion=" + swVersion + ", localDn=" + localDn + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollec.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollec.java index d9256b6..c8bb913 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollec.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollec.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,26 +25,29 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class MeasCollec { -private String beginTime; + private String beginTime; -public MeasCollec() { + public MeasCollec() { -} -public MeasCollec(String beginTime) { -super(); -this.beginTime = beginTime; -} -@XmlAttribute -public String getBeginTime() { -return beginTime; -} -public void setBeginTime(String beginTime) { -this.beginTime = beginTime; -} + } -@Override -public String toString() { -return "MeasCollec [beginTime=" + beginTime + "]"; -} + public MeasCollec(String beginTime) { + super(); + this.beginTime = beginTime; + } + + @XmlAttribute + public String getBeginTime() { + return beginTime; + } + + public void setBeginTime(String beginTime) { + this.beginTime = beginTime; + } + + @Override + public String toString() { + return "MeasCollec [beginTime=" + beginTime + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecEnd.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecEnd.java index 57e84de..f78f9c5 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecEnd.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecEnd.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.xml.models; import javax.xml.bind.annotation.XmlAttribute; @@ -5,15 +25,16 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class MeasCollecEnd { -@XmlAttribute -private String endTime; -public MeasCollecEnd() { + @XmlAttribute + private String endTime; -} + public MeasCollecEnd() { -public MeasCollecEnd(String endTime) { -super(); -this.endTime = endTime; -} + } + + public MeasCollecEnd(String endTime) { + super(); + this.endTime = endTime; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecFile.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecFile.java index 8150144..5fdc2b2 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecFile.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasCollecFile.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -24,24 +28,27 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class MeasCollecFile { -@XmlAttribute -private String xmlns; - @XmlElement -private FileHeader fileHeader; - @XmlElement -private List measData; - @XmlElement -private FileFooter fileFooter; -public MeasCollecFile() { + @XmlAttribute + private String xmlns; + @XmlElement + private FileHeader fileHeader; + @XmlElement + private List measData; + @XmlElement + private FileFooter fileFooter; + + public MeasCollecFile() { + + } + + public MeasCollecFile(FileHeader fileHeader, List measData, FileFooter fileFooter, String xmlns) { + super(); + this.fileHeader = fileHeader; + this.measData = measData; + this.fileFooter = fileFooter; + this.xmlns = xmlns; + } -} -public MeasCollecFile(FileHeader fileHeader, List measData, FileFooter fileFooter,String xmlns) { -super(); -this.fileHeader = fileHeader; -this.measData = measData; -this.fileFooter = fileFooter; -this.xmlns = xmlns; -} // public FileHeader getFileHeader() { // return fileHeader; // } @@ -60,9 +67,10 @@ this.xmlns = xmlns; // public void setFileFooter(FileFooter fileFooter) { // this.fileFooter = fileFooter; // } -@Override -public String toString() { -return "MeasCollecFile [fileHeader=" + fileHeader + ", measData=" + measData + ", fileFooter=" + fileFooter -+ "]"; -} + @Override + public String toString() { + return "MeasCollecFile [fileHeader=" + fileHeader + ", measData=" + measData + ", fileFooter=" + fileFooter + + "]"; + } } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasData.java index 70ccd95..6eace2d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasData.java @@ -1,51 +1,64 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; import java.util.List; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; + @XmlRootElement public class MeasData { -private ManagedElement managedElement; -private List measInfo; -public MeasData() { -} -public MeasData(ManagedElement managedElement, List measInfo) { -super(); -this.managedElement = managedElement; -this.measInfo = measInfo; -} -public ManagedElement getManagedElement() { -return managedElement; -} -public void setManagedElement(ManagedElement managedElement) { -this.managedElement = managedElement; -} -public List getMeasInfo() { -return measInfo; -} -public void setMeasInfo(List measInfo) { -this.measInfo = measInfo; -} -@Override -public String toString() { -return "MeasData [managedElement=" + managedElement + ", measInfo=" + measInfo + "]"; -} + private ManagedElement managedElement; + private List measInfo; + + public MeasData() { + } + + public MeasData(ManagedElement managedElement, List measInfo) { + super(); + this.managedElement = managedElement; + this.measInfo = measInfo; + } + + public ManagedElement getManagedElement() { + return managedElement; + } + + public void setManagedElement(ManagedElement managedElement) { + this.managedElement = managedElement; + } + + public List getMeasInfo() { + return measInfo; + } + + public void setMeasInfo(List measInfo) { + this.measInfo = measInfo; + } + + @Override + public String toString() { + return "MeasData [managedElement=" + managedElement + ", measInfo=" + measInfo + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasInfo.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasInfo.java index 3e50945..9921bdf 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasInfo.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasInfo.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -21,92 +25,84 @@ import java.util.List; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + @XmlRootElement -@XmlType(propOrder={"measInfoId","job","granPeriod","repPeriod","measType","measValue"}) +@XmlType(propOrder = { "measInfoId", "job", "granPeriod", "repPeriod", "measType", "measValue" }) public class MeasInfo { - private String measInfoId; - private Job job; - private GranularityPeriod granPeriod; - private ReportingPeriod repPeriod; - private List measType; - private List measValue; - - - public MeasInfo(String measInfoId, Job job, GranularityPeriod granPeriod, ReportingPeriod repPeriod, -List measType, List measValue) { -super(); -this.measInfoId = measInfoId; -this.job = job; -this.granPeriod = granPeriod; -this.repPeriod = repPeriod; -this.measType = measType; -this.measValue = measValue; -} - - -public MeasInfo() { -} - - -@XmlAttribute -public String getMeasInfoId() { -return measInfoId; -} - -public void setMeasInfoId(String measInfoId) { -this.measInfoId = measInfoId; -} - - -public Job getJob() { -return job; -} - - -public void setJob(Job job) { -this.job = job; -} - - -public GranularityPeriod getGranPeriod() { -return granPeriod; -} - - -public void setGranPeriod(GranularityPeriod granPeriod) { -this.granPeriod = granPeriod; -} - - -public ReportingPeriod getRepPeriod() { -return repPeriod; -} - - -public void setRepPeriod(ReportingPeriod repPeriod) { -this.repPeriod = repPeriod; -} - -public List getMeasType() { -return measType; -} - -public void setMeasType(List measType) { -this.measType = measType; -} - -public List getMeasValue() { -return measValue; -} - -public void setMeasValue(List measValue) { -this.measValue = measValue; -} - -@Override -public String toString() { -return "MeasInfo [measInfoId=" + measInfoId + ", job=" + job + ", granPeriod=" + granPeriod + ", repPeriod=" -+ repPeriod + ", measType=" + measType + ", measValue=" + measValue + "]"; -} + private String measInfoId; + private Job job; + private GranularityPeriod granPeriod; + private ReportingPeriod repPeriod; + private List measType; + private List measValue; + + public MeasInfo(String measInfoId, Job job, GranularityPeriod granPeriod, ReportingPeriod repPeriod, + List measType, List measValue) { + super(); + this.measInfoId = measInfoId; + this.job = job; + this.granPeriod = granPeriod; + this.repPeriod = repPeriod; + this.measType = measType; + this.measValue = measValue; + } + + public MeasInfo() { + } + + @XmlAttribute + public String getMeasInfoId() { + return measInfoId; + } + + public void setMeasInfoId(String measInfoId) { + this.measInfoId = measInfoId; + } + + public Job getJob() { + return job; + } + + public void setJob(Job job) { + this.job = job; + } + + public GranularityPeriod getGranPeriod() { + return granPeriod; + } + + public void setGranPeriod(GranularityPeriod granPeriod) { + this.granPeriod = granPeriod; + } + + public ReportingPeriod getRepPeriod() { + return repPeriod; + } + + public void setRepPeriod(ReportingPeriod repPeriod) { + this.repPeriod = repPeriod; + } + + public List getMeasType() { + return measType; + } + + public void setMeasType(List measType) { + this.measType = measType; + } + + public List getMeasValue() { + return measValue; + } + + public void setMeasValue(List measValue) { + this.measValue = measValue; + } + + @Override + public String toString() { + return "MeasInfo [measInfoId=" + measInfoId + ", job=" + job + ", granPeriod=" + granPeriod + ", repPeriod=" + + repPeriod + ", measType=" + measType + ", measValue=" + measValue + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasResult.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasResult.java index b86e620..addd082 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasResult.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasResult.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -19,16 +23,17 @@ package org.onap.ransim.rest.xml.models; import java.util.List; public class MeasResult { -private String position; -private String result; -public MeasResult(String position, String result) { -super(); -this.position = position; -this.result = result; -} -public MeasResult() { -} - + private String position; + private String result; + + public MeasResult(String position, String result) { + super(); + this.position = position; + this.result = result; + } + + public MeasResult() { + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasType.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasType.java index 411e218..aac1b76 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasType.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasType.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -19,37 +23,44 @@ package org.onap.ransim.rest.xml.models; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlValue; + @XmlRootElement public class MeasType { -private String measType; -private int p; -public MeasType(String measType, int p) { -super(); -this.measType = measType; -this.p = p; -} -public MeasType() { -} + private String measType; + private int p; -@XmlValue -public String getMeasType() { -return measType; -} -public void setMeasType(String measType) { -this.measType = measType; -} -@XmlAttribute -public int getP() { -return p; -} -public void setP(int p) { -this.p = p; -} -@Override -public String toString() { -return "MeasType [measType=" + measType + ", p=" + p + "]"; -} + public MeasType(String measType, int p) { + super(); + this.measType = measType; + this.p = p; + } + + public MeasType() { + } + + @XmlValue + public String getMeasType() { + return measType; + } + + public void setMeasType(String measType) { + this.measType = measType; + } + + @XmlAttribute + public int getP() { + return p; + } + + public void setP(int p) { + this.p = p; + } + + @Override + public String toString() { + return "MeasType [measType=" + measType + ", p=" + p + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasValue.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasValue.java index 3eea932..76ddae4 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasValue.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/MeasValue.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -20,44 +24,54 @@ import java.util.List; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; + @XmlRootElement public class MeasValue { -private Integer measObjLdn; -private List r; -public MeasValue() { + private Integer measObjLdn; + private List r; -} -public MeasValue(Integer measObjLdn, List r, boolean suspect) { -super(); -this.measObjLdn = measObjLdn; -this.r = r; -this.suspect = suspect; -} -private boolean suspect; -@XmlAttribute -public Integer getMeasObjLdn() { -return measObjLdn; -} -public void setMeasObjLdn(Integer measObjLdn) { -this.measObjLdn = measObjLdn; -} -public List getR() { -return r; -} -public void setR(List r) { -this.r = r; -} -public boolean isSuspect() { -return suspect; -} -public void setSuspect(boolean suspect) { -this.suspect = suspect; -} -@Override -public String toString() { -return "MeasValue [measObjLdn=" + measObjLdn + ", r=" + r + ", suspect=" + suspect + "]"; -} + public MeasValue() { -} + } + + public MeasValue(Integer measObjLdn, List r, boolean suspect) { + super(); + this.measObjLdn = measObjLdn; + this.r = r; + this.suspect = suspect; + } + + private boolean suspect; + + @XmlAttribute + public Integer getMeasObjLdn() { + return measObjLdn; + } + + public void setMeasObjLdn(Integer measObjLdn) { + this.measObjLdn = measObjLdn; + } + + public List getR() { + return r; + } + public void setR(List r) { + this.r = r; + } + + public boolean isSuspect() { + return suspect; + } + + public void setSuspect(boolean suspect) { + this.suspect = suspect; + } + + @Override + public String toString() { + return "MeasValue [measObjLdn=" + measObjLdn + ", r=" + r + ", suspect=" + suspect + "]"; + } + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ReportingPeriod.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ReportingPeriod.java index 493f5b9..9e86e6d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ReportingPeriod.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/ReportingPeriod.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -19,29 +23,29 @@ package org.onap.ransim.rest.xml.models; import javax.xml.bind.annotation.XmlAttribute; public class ReportingPeriod { -@XmlAttribute - public String getDuration() { -return duration; -} + @XmlAttribute + public String getDuration() { + return duration; + } -public void setDuration(String duration) { -this.duration = duration; -} + public void setDuration(String duration) { + this.duration = duration; + } -private String duration; -public ReportingPeriod() { -} + private String duration; -public ReportingPeriod(String duration) { -super(); -this.duration = duration; -} + public ReportingPeriod() { + } -@Override -public String toString() { -return "ReportingPeriod [duration=" + duration + "]"; -} - + public ReportingPeriod(String duration) { + super(); + this.duration = duration; + } + + @Override + public String toString() { + return "ReportingPeriod [duration=" + duration + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Result.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Result.java index f7ff0a0..2e71f5a 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Result.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/xml/models/Result.java @@ -1,17 +1,21 @@ /* - * Copyright (C) 2018 Wipro Limited. - * + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. - * You may obtain a copy of the License at: + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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.xml.models; @@ -19,36 +23,43 @@ package org.onap.ransim.rest.xml.models; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlValue; + @XmlRootElement public class Result { -private int p; -private int measValue; -public Result() { -} -public Result(int p, int measValue) { -super(); -this.p = p; -this.measValue = measValue; -} -@XmlAttribute -public int getP() { -return p; -} -public void setP(int p) { -this.p = p; -} -@XmlValue -public double getMeasValue() { -return measValue; -} -public void setMeasValue(int measValue) { -this.measValue = measValue; -} -@Override -public String toString() { -return "Result [p=" + p + ", measValue=" + measValue + "]"; -} + private int p; + private int measValue; -} + public Result() { + } + + public Result(int p, int measValue) { + super(); + this.p = p; + this.measValue = measValue; + } + + @XmlAttribute + public int getP() { + return p; + } + + public void setP(int p) { + this.p = p; + } + @XmlValue + public double getMeasValue() { + return measValue; + } + + public void setMeasValue(int measValue) { + this.measValue = measValue; + } + + @Override + public String toString() { + return "Result [p=" + p + ", measValue=" + measValue + "]"; + } + +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/Attributes.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/Attributes.java index 38d896f..f875f10 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/Attributes.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/Attributes.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigData.java index ed6cfab..859b51d 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigData.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigData.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; public class ConfigData { diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigPLMNInfo.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigPLMNInfo.java index 227fd8a..b857829 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigPLMNInfo.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/ConfigPLMNInfo.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import java.util.*; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUUPFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUUPFunction.java index 6c48c4f..40518de 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUUPFunction.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUUPFunction.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBDUFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBDUFunction.java index 985a399..96860c1 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBDUFunction.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBDUFunction.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import java.util.List; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellDU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellDU.java index 01d51e9..c631c5a 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellDU.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellDU.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java index 47e1ef8..f684781 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import java.util.List; @@ -45,4 +65,4 @@ public class NearRTRIC { { } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/SNSSAI.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/SNSSAI.java index 5deddc0..2558b91 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/SNSSAI.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/SNSSAI.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.websocket.model; import java.util.*; @@ -28,4 +48,4 @@ public class SNSSAI { } -} \ No newline at end of file +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java index 91c348c..dbea6d0 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020-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. + * 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.services; import static org.junit.Assert.assertEquals; diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties deleted file mode 100644 index 9b7d955..0000000 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties +++ /dev/null @@ -1,29 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# - -hibernate.dialect org.hibernate.dialect.H2Dialect -hibernate.connection.driver_class org.h2.Driver -#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE -hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1 -hibernate.connection.username sa - -hibernate.connection.pool_size 5 - -hibernate.show_sql false -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - -# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle -hibernate.jdbc.batch_versioned_data true - -javax.persistence.validation.mode=NONE -hibernate.service.allow_crawling=false -hibernate.session.events.log=true \ No newline at end of file -- cgit 1.2.3-korg