aboutsummaryrefslogtreecommitdiffstats
path: root/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api
diff options
context:
space:
mode:
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api')
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/FileController.java1
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java130
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/exceptions/RansimException.java74
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java4
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimSlicingHandler.java530
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/ConfigData.java48
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUCPFunction.java58
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBCUUPFunction.java56
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GNBDUFunction.java60
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java44
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java29
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NSSAIConfig.java42
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NearRTRIC.java66
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfo.java26
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/PLMNInfoModel.java185
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RANSliceInfo.java67
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyMember.java34
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/RRMPolicyRatio.java221
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SNSSAI.java156
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/SliceProfile.java82
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/TACells.java36
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUCPRepository.java26
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBCUUPRepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/GNBDURepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellCURepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellDURepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NearRTRICRepository.java22
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RANInventoryRepository.java22
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyMemberRepository.java40
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/RRMPolicyRepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/SliceProfileRepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/TACellRepository.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java34
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java20
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/SlicingPMDataGenerator.java227
35 files changed, 1601 insertions, 879 deletions
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<GNBCUCPModel>
*/
@@ -57,7 +77,7 @@ public class RANSliceConfigController {
/**
* To fetch the CUCP details
- *
+ *
* @param gNBCUCPName
* @return ResponseEntity<GNBCUCPModel>
*/
@@ -69,7 +89,7 @@ public class RANSliceConfigController {
return new ResponseEntity<GNBCUCPModel>(ranSliceConfigService.fetchGNBCUCPData(gNBCUCPName), HttpStatus.OK);
}else {
return new ResponseEntity<GNBCUCPModel>(ranSliceConfigService.fetchGNBCUCPData(gNBCUCPName), HttpStatus.NO_CONTENT);
- }
+ }
} catch (Exception e) {
logger.error("Error while fetching GNBCUCP:" + e.getMessage());
return new ResponseEntity<GNBCUCPModel>(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<GNBCUUPModel>
*/
@@ -95,7 +115,7 @@ public class RANSliceConfigController {
/**
* To fetch the CUCP details
- *
+ *
* @param gNBCUCPName
* @return ResponseEntity<GNBCUCPModel>
*/
@@ -116,7 +136,7 @@ public class RANSliceConfigController {
/**
* This method updates the slice details, config details of gNBDU
- *
+ *
* @param GNBDUModel
* @return ResponseEntity<GNBDUModel>
*/
@@ -133,7 +153,7 @@ public class RANSliceConfigController {
/**
* To fetch the gNBDU details
- *
+ *
* @param gNBDUId
* @return ResponseEntity<GNBDUModel>
*/
@@ -154,7 +174,7 @@ public class RANSliceConfigController {
/**
* This method updates the NearRTRIC details
- *
+ *
* @param nearRTRICModel
* @return ResponseEntity<NearRTRICModel>
*/
@@ -172,7 +192,7 @@ public class RANSliceConfigController {
/**
* To fetch the nearRTRIC details
- *
+ *
* @param nearRTRICId
* @return ResponseEntity<GNBDUModel>
*/
@@ -187,7 +207,7 @@ public class RANSliceConfigController {
return new ResponseEntity<NearRTRICModel>(ranSliceConfigService.fetchNearRTRICData(nearRTRICId),
HttpStatus.NO_CONTENT);
}
-
+
} catch (Exception e) {
logger.error("Error while fetching nearRTRIC:" + e.getMessage());
return new ResponseEntity<NearRTRICModel>(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<NearRTRICModel>
*/
@@ -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<String> cellIds = this.findListOfCells(trackingArea).getBody();
- List<Integer> cellIdList =cellIds.stream().map(Integer::parseInt).collect(Collectors.toList());
+ List<Integer> cellIdList =cellIds.stream().map(Integer::parseInt).collect(Collectors.toList());
if(ranSliceConfigService.findNearRTRICofCells(cellIdList).size()>0) {
return new ResponseEntity<List<NearRTRICModel>>(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<List<String>>(ranSliceConfigService.fetchCellsofTA(trackingArea), HttpStatus.OK);
}else {
return new ResponseEntity<List<String>>(ranSliceConfigService.fetchCellsofTA(trackingArea), HttpStatus.NO_CONTENT);
- }
+ }
} catch (Exception e) {
logger.error("Error while fetching the Cells:" + e.getMessage());
return new ResponseEntity<List<String>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To find the list of CU-Cells
- *
+ *
* @param nearRTRICId
* @return
*/
@@ -306,13 +326,13 @@ public class RANSliceConfigController {
return new ResponseEntity<List<NRCellCUModel>>(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<NearRTRICModel>
*/
@@ -330,10 +350,10 @@ public class RANSliceConfigController {
return new ResponseEntity<List<NearRTRICModel>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To find the list of DU-Cells
- *
+ *
* @param nearRTRICId
* @return
*/
@@ -345,18 +365,18 @@ public class RANSliceConfigController {
return new ResponseEntity<Map<Integer, List<NRCellDUModel>>>(ranSliceConfigService.fetchDUCellsofRIC(sNSSAI), HttpStatus.OK);
}else {
return new ResponseEntity<Map<Integer, List<NRCellDUModel>>>(ranSliceConfigService.fetchDUCellsofRIC(sNSSAI), HttpStatus.NO_CONTENT);
- }
+ }
} catch (Exception e) {
e.printStackTrace();
logger.error("Error while fetching the Cells-DU:" + e.getMessage());
return new ResponseEntity<Map<Integer, List<NRCellDUModel>>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
//Inventory APIs
/**
* This method updates the RAN slice details
- *
+ *
* @param ranSliceInfoModel
* @return ResponseEntity<RANSliceInfoModel>
*/
@@ -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<RANSliceInfoModel>(ranSliceConfigService.fetchRANSlice(ranNFNSSIId), HttpStatus.OK);
}else {
return new ResponseEntity<RANSliceInfoModel>(ranSliceConfigService.fetchRANSlice(ranNFNSSIId), HttpStatus.NO_CONTENT);
- }
+ }
} catch (Exception e) {
logger.error("Error while fetching the RAN slice Details:" + e.getMessage());
return new ResponseEntity<RANSliceInfoModel>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
//Slice Analysis MS APIs
/**
* To fetch The NearRTRICs serving the sNSSAI
- *
+ *
* @param sNSSAI
* @return List<NearRTRICModel>
*/
@@ -414,10 +434,10 @@ public class RANSliceConfigController {
return new ResponseEntity<List<NearRTRICModel>>(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<Map<String,Integer>>(ranSliceConfigService.findSliceProfileconfig(sNSSAI), HttpStatus.OK);
}else {
return new ResponseEntity<Map<String,Integer>>(ranSliceConfigService.findSliceProfileconfig(sNSSAI), HttpStatus.NO_CONTENT);
- }
+ }
} catch (Exception e) {
logger.error("Error while fetching the Requested Configuration:" + e.getMessage());
return new ResponseEntity<Map<String,Integer>>(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<Map<Integer, NSSAIConfig>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To fetch the DU details
- *
- * @param
+ *
+ * @param
* @return List<GNBDUModel>
*/
@GetMapping(path="/du-list/{sNSSAI}")
@@ -479,11 +499,11 @@ public class RANSliceConfigController {
return new ResponseEntity<List<GNBDUModel>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To fetch the DU details
- *
- * @param
+ *
+ * @param
* @return List<GNBDUModel>
*/
@GetMapping(path="/cucp-list/{sNSSAI}")
@@ -500,11 +520,11 @@ public class RANSliceConfigController {
return new ResponseEntity<List<GNBCUCPModel>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
- * To fetch the Customer Details
- *
- * @param
+ * To fetch the Customer Details
+ *
+ * @param
* @return Map<String, String>
*/
@GetMapping(path="/subscriber-details/{sNSSAI}")
@@ -521,11 +541,11 @@ public class RANSliceConfigController {
return new ResponseEntity<Map<String, String>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To fetch the cu details
- *
- * @param
+ *
+ * @param
* @return List<GNBCUCPModel>
*/
@GetMapping(path="/cucp-list")
@@ -542,11 +562,11 @@ public class RANSliceConfigController {
return new ResponseEntity<List<GNBCUCPModel>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
-
+
/**
* To fetch the DU details
- *
- * @param
+ *
+ * @param
* @return List<GNBDUModel>
*/
@GetMapping(path="/du-list")
@@ -563,5 +583,5 @@ public class RANSliceConfigController {
return new ResponseEntity<List<GNBDUModel>>(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<String> generateIntelligentSlicingPmData(long startTime, HashMap<String,List<String>> taCells) {
- List<String> result = new ArrayList<String>();
- try {
- String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/cucp-list";
- List<GNBCUCPModel> 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<MeasType> measTypeList = new ArrayList<MeasType>();
- int numberOfNssaiType = 1;
- HashMap<String, Integer> nssaiInfoMap = new HashMap<String, Integer>();
- 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<String, Integer> nSSAINo = new HashMap<String, Integer>();
- for (java.util.Map.Entry<String, Integer> 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<MeasValue> measValueList = new ArrayList<MeasValue>();
-
- for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) {
- List<Result> resultList = new ArrayList<Result>();
- 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<String, Integer> nssaiMap : nSSAINo.entrySet()) {
- if(nssaiMap.getKey().equals(pLMNInfoModel.getsNSSAI().getsNSSAI())) {
- configData = pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns();
- noOfRequestedSessions = 0;
- successfulSessions = 0;
- for (java.util.Map.Entry<String, List<String>> 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<MeasInfo> measInfoList = new ArrayList<MeasInfo>();
- measInfoList.add(measInfo);
- MeasData measData = new MeasData(managedElement, measInfoList);
- List<MeasData> measDataList = new ArrayList<MeasData>();
- 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 <T> ResponseEntity<List<GNBCUCPModel>> sendGetRequestToConfigDb(String requestUrl) {
-
- HttpHeaders headers = new HttpHeaders();
- log.info("sending...");
- headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
- HttpEntity<Void> requestEntity = new HttpEntity<>(headers);
- try {
- RestTemplate restTemplate = new RestTemplate();
- return restTemplate.exchange(requestUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<GNBCUCPModel>>() {
- });
- }
- 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<String> generateIntelligentSlicingPmData(long startTime, HashMap<String,List<String>> taCells) {
+ List<String> result = new ArrayList<String>();
+ try {
+ String requestUrl = "http://" + "localhost" + ":" + "8081" + "/ransim/api/ransim-db/v4/cucp-list";
+ List<GNBCUCPModel> 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<MeasType> measTypeList = new ArrayList<MeasType>();
+ int numberOfNssaiType = 1;
+ HashMap<String, Integer> nssaiInfoMap = new HashMap<String, Integer>();
+ 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<String, Integer> nSSAINo = new HashMap<String, Integer>();
+ for (java.util.Map.Entry<String, Integer> 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<MeasValue> measValueList = new ArrayList<MeasValue>();
+
+ for (NRCellCUModel nRCellCUModel : gnbcucpModelList.get(i).getCellCUList()) {
+ List<Result> resultList = new ArrayList<Result>();
+ 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<String, Integer> nssaiMap : nSSAINo.entrySet()) {
+ if(nssaiMap.getKey().equals(pLMNInfoModel.getsNSSAI().getsNSSAI())) {
+ configData = pLMNInfoModel.getsNSSAI().getConfigData().getMaxNumberOfConns();
+ noOfRequestedSessions = 0;
+ successfulSessions = 0;
+ for (java.util.Map.Entry<String, List<String>> 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<MeasInfo> measInfoList = new ArrayList<MeasInfo>();
+ measInfoList.add(measInfo);
+ MeasData measData = new MeasData(managedElement, measInfoList);
+ List<MeasData> measDataList = new ArrayList<MeasData>();
+ 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 <T> ResponseEntity<List<GNBCUCPModel>> sendGetRequestToConfigDb(String requestUrl) {
+
+ HttpHeaders headers = new HttpHeaders();
+ log.info("sending...");
+ headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
+ HttpEntity<Void> requestEntity = new HttpEntity<>(headers);
+ try {
+ RestTemplate restTemplate = new RestTemplate();
+ return restTemplate.exchange(requestUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<GNBCUCPModel>>() {
+ });
+ }
+ 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<NRCellCU> 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<NRCellCU> getCellCUList() {
return cellCUList;
}
+
public void setCellCUList(List<NRCellCU> 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<PLMNInfo> 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<PLMNInfo> getpLMNInfoList() {
return pLMNInfoList;
}
+
public void setpLMNInfoList(List<PLMNInfo> 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<NRCellDU> 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<NRCellDU> getCellDUList() {
return cellDUList;
}
+
public void setCellDUList(List<NRCellDU> 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<PLMNInfo> pLMNInfoList;
@ManyToOne
@JoinColumn(name = "gnbcuname")
private GNBCUCPFunction gNBCUCPFunction;
-
+
public Integer getCellLocalId() {
return cellLocalId;
}
+
public void setCellLocalId(Integer cellLocalId) {
this.cellLocalId = cellLocalId;
}
+
public List<PLMNInfo> getpLMNInfoList() {
return pLMNInfoList;
}
+
public void setpLMNInfoList(List<PLMNInfo> 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<String> trackingArea;
- @Column(name="RESOURCETYPE")
+ @Column(name = "RESOURCETYPE")
private String resourceType;
- @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL)
+ @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL)
private List<GNBCUCPFunction> gNBCUCPList;
- @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL)
+ @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL)
private List<GNBCUUPFunction> gNBCUUPList;
- @OneToMany(mappedBy = "nearRTRIC", cascade=CascadeType.ALL)
+ @OneToMany(mappedBy = "nearRTRIC", cascade = CascadeType.ALL)
private List<GNBDUFunction> gNBDUList;
@ElementCollection(targetClass = String.class)
- @CollectionTable(name="RANNFNSSI",joinColumns = @JoinColumn(name="nearrtricid"))
+ @CollectionTable(name = "RANNFNSSI", joinColumns = @JoinColumn(name = "nearrtricid"))
private List<String> ranNFNSSIList;
@ElementCollection
- @CollectionTable(name="PLMNINFO",joinColumns = @JoinColumn(name="nearrtricid"))
+ @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nearrtricid"))
private List<PLMNInfo> 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<String> getTrackingArea() {
return trackingArea;
}
+
public void setTrackingArea(List<String> trackingArea) {
this.trackingArea = trackingArea;
}
+
public String getResourceType() {
return resourceType;
}
+
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
+
public List<GNBCUCPFunction> getgNBCUCPList() {
return gNBCUCPList;
}
+
public void setgNBCUCPList(List<GNBCUCPFunction> gNBCUCPList) {
this.gNBCUCPList = gNBCUCPList;
}
+
public List<GNBCUUPFunction> getgNBCUUPList() {
return gNBCUUPList;
}
+
public void setgNBCUUPList(List<GNBCUUPFunction> gNBCUUPList) {
this.gNBCUUPList = gNBCUUPList;
}
+
public List<GNBDUFunction> getgNBDUList() {
return gNBDUList;
}
+
public void setgNBDUList(List<GNBDUFunction> gNBDUList) {
this.gNBDUList = gNBDUList;
}
+
public List<PLMNInfo> getpLMNInfoList() {
return pLMNInfoList;
}
+
public void setpLMNInfoList(List<PLMNInfo> pLMNInfoList) {
this.pLMNInfoList = pLMNInfoList;
}
+
public List<String> getRanNFNSSIList() {
return ranNFNSSIList;
}
+
public void setRanNFNSSIList(List<String> 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<String> ranNSSIList;
@ElementCollection
- @CollectionTable(name="nssai", joinColumns = @JoinColumn(name="rannfnssiid"))
- private List<String> nSSAIList;
- @OneToMany(mappedBy = "rANSliceInventory", cascade=CascadeType.ALL)
+ @CollectionTable(name = "nssai", joinColumns = @JoinColumn(name = "rannfnssiid"))
+ private List<String> nSSAIList;
+ @OneToMany(mappedBy = "rANSliceInventory", cascade = CascadeType.ALL)
private List<SliceProfile> 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<String> getRanNSSIList() {
return ranNSSIList;
}
+
public void setRanNSSIList(List<String> ranNSSIList) {
this.ranNSSIList = ranNSSIList;
}
+
public List<SliceProfile> getSliceProfilesList() {
return sliceProfilesList;
}
+
public void setSliceProfilesList(List<SliceProfile> 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<String> getnSSAIList() {
return nSSAIList;
}
+
public void setnSSAIList(List<String> 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<RRMPolicyMember> 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<RRMPolicyMember> getrRMPolicyMemberList() {
- return rRMPolicyMemberList;
- }
- public void setrRMPolicyMemberList(List<RRMPolicyMember> 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<RRMPolicyMember> 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<RRMPolicyMember> getrRMPolicyMemberList() {
+ return rRMPolicyMemberList;
+ }
+
+ public void setrRMPolicyMemberList(List<RRMPolicyMember> 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<GNBCUCPFunction,String>{
- @Query(nativeQuery=true, value="select distinct(cucp.gnbcuname) from gnbcucpfunction cucp join nrcellcu cellcu where cellcu.celllocalid in (:cellIdList)")
+public interface GNBCUCPRepository extends CrudRepository<GNBCUCPFunction, String> {
+ @Query(nativeQuery = true, value = "select distinct(cucp.gnbcuname) from gnbcucpfunction cucp join nrcellcu cellcu where cellcu.celllocalid in (:cellIdList)")
public List<String> findCUCPByCellIds(List<Integer> 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<GNBCUCPFunction> 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<NearRTRIC,Integer>{
@Query(nativeQuery = true, value = "select * from nearrtric ric join plmninfo plmn where plmn.snssai=?1 and plmn.nearrtricid IS NOT NULL")
public Set<NearRTRIC> 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<RANSliceInfo,String>{
@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<GNBDUFunction> duList = (List<GNBDUFunction>) gNBDURepository.findAll();
- List<GNBDUModel> duModels = duList.stream()
- .map(duEntity -> modelMapper.map(duEntity, GNBDUModel.class)).collect(Collectors.toList());
+ List<GNBDUModel> 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<GNBDUModel> 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<PLMNInfoModel> myPLMNInfoModelList = new ArrayList<PLMNInfoModel>();
-myPLMNInfoModelList.add(pLMNInfoModel1);
-myPLMNInfoModelList.add(pLMNInfoModel2);
-
-
- for (GNBDUModel du : duList) {
- List<NRCellDUModel> 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<String, Integer > myactiveNssai = new HashMap<>();
-Map<String, NSSAIConfig> activeNssaiDetails = new HashMap<String, NSSAIConfig>();
- List<NRCellDUModel> duCellList = du.getCellDUList();
-logger.debug("duCellList.size : " + duCellList.size());
- int ricId = du.getNearRTRICId();
-logger.debug("RIC ID : " + ricId);
- List<PLMNInfoModel> plmnInfoList = new ArrayList<>();
- duCellList.forEach(cell -> plmnInfoList.addAll(cell.getpLMNInfoList()));
- List<NSSAIData> 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<GNBDUModel> duList = sendGetRequestToransimDb(requestUrl).getBody();
+ for (GNBDUModel du : duList) {
+ logger.info("Generating PM data for DU : " + du.getgNBDUName() + " Id :" + du.getgNBDUId());
+ Map<String, NSSAIConfig> activeNssaiDetails = new HashMap<String, NSSAIConfig>();
+ List<NRCellDUModel> duCellList = du.getCellDUList();
+ int ricId = du.getNearRTRICId();
+ List<PLMNInfoModel> plmnInfoList = new ArrayList<>();
+ duCellList.forEach(cell -> plmnInfoList.addAll(cell.getpLMNInfoList()));
+ List<NSSAIData> 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<String, NSSAIConfig> activeNssaiDetails,
List<NRCellDUModel> 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<MeasType> measTypeList = setMeasurementTypes(activeNssaiDetails);
- List<MeasValue> measValueList = setMeasurementValues(duCellList,getMaxVariation(ricId));
-
+ List<MeasValue> 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",
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
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<MeasValue> setMeasurementValues(List<NRCellDUModel> duCellList, double ricIdVariation) {
-logger.debug("setMeasurementValues");
+ private List<MeasValue> setMeasurementValues(List<NRCellDUModel> duCellList, double ricIdVariation,
+ List<MeasType> measTypeList) {
+ logger.debug("setting MeasurementValues");
List<MeasValue> measValueList = new ArrayList<MeasValue>();
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<Result> 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<MeasType> setMeasurementTypes(Map<String, NSSAIConfig> activeNssaiDetails) {
+ logger.debug("setting MeasurementTypes");
List<MeasType> measTypeList = new ArrayList<MeasType>();
AtomicInteger pValue = new AtomicInteger(1);
activeNssaiDetails.forEach((nssai, configData) -> {
@@ -263,7 +219,7 @@ logger.debug("setMeasurementValues");
});
return measTypeList;
}
-
+
public static <T> ResponseEntity<List<GNBDUModel>> 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 ");
+ }
+ }
}