Implement 3GPP 28.532 Get NetworkSliceSubnet API. It always returns pre-configured... 96/15196/1
authorsunil.n <sunil.n@samsung.com>
Thu, 6 Nov 2025 12:22:54 +0000 (17:52 +0530)
committersunil.n <sunil.n@samsung.com>
Thu, 6 Nov 2025 12:22:54 +0000 (17:52 +0530)
Change-Id: I90f5d61b41fda5854edf8e380e75e76fe52e283a
Signed-off-by: sunil.n <sunil.n@samsung.com>
sample-rapp-generator/rapp-ran-nssmf-simulator/README.md
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/controller/NetworkSliceSubnetController.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetAttributesDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnIdDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnInfoListDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/RanSliceSubnetProfileDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileExtensionsDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileItemDTO.java [new file with mode: 0644]
sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SnssaiDTO.java [new file with mode: 0644]

index 2ac5cbd..0b808e1 100644 (file)
@@ -4,6 +4,88 @@
 
 ## API Documentation
 
+### Network Slice Subnet Management API
+
+#### Endpoint
+- **URL**: `http://localhost:8080/3GPPManagement/ProvMnS/v17.0.0/NetworkSliceSubnets/{subnetId}`
+- **Method**: `GET`
+- **Content-Type**: `application/json`
+
+#### Supported Subnet IDs
+The simulator supports 6 pre-configured network slice subnets with different characteristics:
+
+1. `9090d36f-6af5-4cfd-8bda-7a3c88fa82fa` - SST: 1, SD: 000001
+2. `9090d36f-6af5-4cfd-8bda-7a3c88fa82fb` - SST: 1, SD: 000002 (with RRU resource allocation)
+3. `9090d36f-6af5-4cfd-8bda-7a3c88fa82fc` - SST: 2, SD: 000003
+4. `9090d36f-6af5-4cfd-8bda-7a3c88fa82fd` - SST: 2, SD: 000004 (with RRU resource allocation)
+5. `9090d36f-6af5-4cfd-8bda-7a3c88fa82fe` - SST: 3, SD: 000005
+6. `9090d36f-6af5-4cfd-8bda-7a3c88fa82ff` - SST: 1, SD: 000006 (with RRU resource allocation)
+
+#### Response Structure
+```json
+{
+  "id": "9090d36f-6af5-4cfd-8bda-7a3c88fa82fa",
+  "attributes": {
+    "operationalState": "enabled",
+    "administrativeState": "UNLOCKED",
+    "networkSliceSubnetType": "RAN_SLICESUBNET",
+    "managedFunctionRef": [
+      "2c000978-15e3-4393-984e-a20d32c96004-AUPF_200000",
+      "2c000978-15e3-4393-984e-a20d32c96004-DU_200000",
+      "2c000978-15e3-4393-984e-a20d32c96004-ACPF_200000"
+    ],
+    "networkSliceSubnetRef": [],
+    "sliceProfileList": [
+      {
+        "sliceProfileId": "2f1ca17d-5c44-4355-bfed-e9800a2996c1",
+        "extensions": {
+          "state": "IN_SERVICE"
+        },
+        "pLMNInfoList": [
+          {
+            "PLMNId": {
+              "mcc": "330",
+              "mnc": "220"
+            },
+            "SNSSAI": {
+              "sst": 1,
+              "sd": "000001"
+            }
+          }
+        ],
+        "RANSliceSubnetProfile": {
+          "coverageAreaTAList": [1, 2],
+          "resourceSharingLevel": "shared",
+          "RRU.PrbDl": 1024,
+          "RRU.PrbUl": 3096
+        }
+      }
+    ]
+  }
+}
+```
+
+#### Example Usage
+
+**cURL Command:**
+```bash
+curl -X GET \
+  http://localhost:8080/3GPPManagement/ProvMnS/v17.0.0/NetworkSliceSubnets/9090d36f-6af5-4cfd-8bda-7a3c88fa82fa \
+  -H 'Content-Type: application/json'
+```
+
+**Response Codes:**
+- `200 OK`: Successfully retrieved network slice subnet
+- `404 Not Found`: Subnet ID not found
+
+#### Key Features
+- **3GPP Compliance**: Implements 3GPP 28.532 Network Slice Subnet Management
+- **Pre-configured Data**: 6 different slice configurations with varying characteristics
+- **SNSSAI Support**: Different Slice/Service Type (SST) and Slice Differentiator (SD) combinations
+- **RAN Resource Allocation**: Configurable RRU PRB (Physical Resource Block) allocations
+- **PLMN Support**: Public Land Mobile Network identifiers
+- **Managed Function References**: Links to network functions (AUPF, DU, ACPF)
+
 ### File Data Reporting Subscription API
 
 #### Endpoint
@@ -132,7 +214,7 @@ The simulator automatically sends file ready notifications to all subscribed end
 
 ## Data Transfer Objects (DTOs)
 
-### Core DTOs
+### File Data Reporting DTOs
 - **SubscriptionRequestDTO**: Handles subscription requests with callback URI validation
 - **SubscriptionDTO**: Response object for subscription confirmation
 - **NotifyFileReadyDTO**: Complete notification payload sent to subscribers
@@ -140,11 +222,23 @@ The simulator automatically sends file ready notifications to all subscribed end
 - **FileInfoDTO**: Detailed file information including location, size, and timestamps
 - **DateTimeDTO**: Standardized date/time format using ISO 8601
 
+### Network Slice Subnet DTOs
+- **NetworkSliceSubnetDTO**: Main network slice subnet representation with ID and attributes
+- **NetworkSliceSubnetAttributesDTO**: Slice subnet attributes including operational state, administrative state, and slice profiles
+- **SliceProfileItemDTO**: Individual slice profile configuration with PLMN info and RAN profile
+- **SliceProfileExtensionsDTO**: Slice profile extensions including service state
+- **PlmnInfoListDTO**: PLMN information list containing network identifiers
+- **PlmnIdDTO**: Public Land Mobile Network identifier (MCC/MNC)
+- **SnssaiDTO**: Single-Network Slice Selection Assistance Information (SST/SD)
+- **RanSliceSubnetProfileDTO**: RAN-specific slice profile including coverage area and resource allocation
+
 ### DTO Features
 - **Lombok Integration**: Automatic getter/setter generation and builder patterns
 - **Validation**: Jakarta validation annotations for request validation
 - **Builder Pattern**: Fluent API for object creation
 - **Sample Data**: Static factory methods for creating test data
+- **JSON Property Mapping**: Custom JSON property annotations for 3GPP compliance
+- **3GPP Compliance**: All DTOs follow 3GPP 28.532 standards
 
 ## Technical Architecture
 
@@ -158,9 +252,11 @@ The simulator automatically sends file ready notifications to all subscribed end
 
 ### Key Components
 - **FileDataReportingMnSController**: REST controller handling subscriptions and notifications
+- **NetworkSliceSubnetController**: REST controller handling network slice subnet management operations
 - **Scheduled Notifications**: Automated file ready notifications every 5 minutes
 - **RestTemplate**: HTTP client for sending callback notifications
 - **In-memory Storage**: HashMap-based subscription management
+- **Pre-configured Slice Data**: Mock network slice subnet configurations for testing
 
 ## Directory Structure
 
@@ -169,12 +265,21 @@ src/
 ├── main/
 │   ├── java/org/oransc/ran/nssmf/simulator/
 │   │   ├── controller/
-│   │   │   └── FileDataReportingMnSController.java
+│   │   │   ├── FileDataReportingMnSController.java
+│   │   │   └── NetworkSliceSubnetController.java
 │   │   ├── dto/
 │   │   │   ├── DateTimeDTO.java
 │   │   │   ├── FileInfoDTO.java
+│   │   │   ├── NetworkSliceSubnetAttributesDTO.java
+│   │   │   ├── NetworkSliceSubnetDTO.java
 │   │   │   ├── NotificationHeaderDTO.java
 │   │   │   ├── NotifyFileReadyDTO.java
+│   │   │   ├── PlmnIdDTO.java
+│   │   │   ├── PlmnInfoListDTO.java
+│   │   │   ├── RanSliceSubnetProfileDTO.java
+│   │   │   ├── SliceProfileExtensionsDTO.java
+│   │   │   ├── SliceProfileItemDTO.java
+│   │   │   ├── SnssaiDTO.java
 │   │   │   ├── SubscriptionDTO.java
 │   │   │   └── SubscriptionRequestDTO.java
 │   │   └── RanNssmfSimulatorApplication.java
@@ -244,3 +349,7 @@ This simulator is designed to:
 4. **Callback Testing**: Enable testing of asynchronous notification mechanisms
 5. **Performance Testing**: Support load testing with multiple subscribers
 6. **API Validation**: Validate client implementations against 3GPP standards
+7. **Network Slice Testing**: Test network slice subnet retrieval and management operations
+8. **SNSSAI Validation**: Validate Slice/Service Type and Slice Differentiator handling
+9. **RAN Resource Management**: Test RAN resource allocation and configuration scenarios
+10. **PLMN Configuration**: Test Public Land Mobile Network identifier handling
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/controller/NetworkSliceSubnetController.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/controller/NetworkSliceSubnetController.java
new file mode 100644 (file)
index 0000000..1fb9cc7
--- /dev/null
@@ -0,0 +1,121 @@
+package org.oransc.ran.nssmf.simulator.controller;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import org.oransc.ran.nssmf.simulator.dto.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/3GPPManagement/ProvMnS/${mns.fileDataReporting.version}") // Example version
+public class NetworkSliceSubnetController {
+
+    private static final Logger logger = LoggerFactory.getLogger(NetworkSliceSubnetController.class);
+
+    private static final ObjectMapper objectMapper;
+
+    static {
+        objectMapper = new ObjectMapper();
+        objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
+    }
+
+    /**
+     * Retrieves an existing Network Slice Subnet by its ID.
+     *
+     * @param subnetId The unique identifier of the Network Slice Subnet to be retrieved.
+     * @return A ResponseEntity with HTTP status 200 (OK) and the NetworkSliceSubnetDTO,
+     *         or 404 (Not Found) if no such subnet exists.
+     */
+    @GetMapping("/NetworkSliceSubnets/{subnetId}")
+    public ResponseEntity<NetworkSliceSubnetDTO> getNetworkSliceSubnet(@PathVariable String subnetId) {
+        logger.info("Get request received for subnetId: {}", subnetId);
+        NetworkSliceSubnetDTO responseDto = new NetworkSliceSubnetDTO();
+        responseDto.setId(subnetId);
+
+        NetworkSliceSubnetAttributesDTO attributes = new NetworkSliceSubnetAttributesDTO();
+        attributes.setOperationalState("enabled");
+        attributes.setAdministrativeState("UNLOCKED");
+        attributes.setNetworkSliceSubnetType("RAN_SLICESUBNET");
+        attributes.setManagedFunctionRef(Arrays.asList(
+                "2c000978-15e3-4393-984e-a20d32c96004-AUPF_200000",
+                "2c000978-15e3-4393-984e-a20d32c96004-DU_200000",
+                "2c000978-15e3-4393-984e-a20d32c96004-ACPF_200000"
+        ));
+        attributes.setNetworkSliceSubnetRef(List.of());
+
+        SliceProfileItemDTO sliceProfileItem = new SliceProfileItemDTO();
+        SliceProfileExtensionsDTO extensions = new SliceProfileExtensionsDTO();
+        extensions.setState("IN_SERVICE");
+        sliceProfileItem.setExtensions(extensions);
+
+        PlmnInfoListDTO plmnInfo = new PlmnInfoListDTO();
+        PlmnIdDTO plmnId = new PlmnIdDTO();
+        plmnId.setMcc("330");
+        plmnId.setMnc("220");
+        plmnInfo.setPLMNId(plmnId);
+
+        SnssaiDTO snssai = new SnssaiDTO();
+        plmnInfo.setSNSSAI(snssai);
+        sliceProfileItem.setPLMNInfoList(List.of(plmnInfo));
+
+        RanSliceSubnetProfileDTO ranProfile = new RanSliceSubnetProfileDTO();
+        ranProfile.setCoverageAreaTAList(Arrays.asList(1, 2));
+        ranProfile.setResourceSharingLevel("shared");
+
+        switch (subnetId) {
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82fa":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c1");
+                snssai.setSst(1);
+                snssai.setSd("000001");
+                break;
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82fb":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c2");
+                snssai.setSst(1);
+                snssai.setSd("000002");
+                ranProfile.setRRU_PrbDl(1024);
+                ranProfile.setRRU_PrbUl(3096);
+                break;
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82fc":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c3");
+                snssai.setSst(2);
+                snssai.setSd("000003");
+                break;
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82fd":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c4");
+                snssai.setSst(2);
+                snssai.setSd("000004");
+                ranProfile.setRRU_PrbDl(256);
+                ranProfile.setRRU_PrbUl(512);
+                break;
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82fe":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c5");
+                snssai.setSst(3);
+                snssai.setSd("000005");
+                break;
+            case "9090d36f-6af5-4cfd-8bda-7a3c88fa82ff":
+                sliceProfileItem.setSliceProfileId("2f1ca17d-5c44-4355-bfed-e9800a2996c6");
+                snssai.setSst(1);
+                snssai.setSd("000006");
+                ranProfile.setRRU_PrbDl(2048);
+                ranProfile.setRRU_PrbUl(4096);
+                break;
+            default:
+                return ResponseEntity.notFound().build();
+        }
+
+        sliceProfileItem.setRANSliceSubnetProfile(ranProfile);
+        attributes.setSliceProfileList(List.of(sliceProfileItem));
+        responseDto.setAttributes(attributes);
+
+        return ResponseEntity.ok(responseDto);
+    }
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetAttributesDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetAttributesDTO.java
new file mode 100644 (file)
index 0000000..bc6851c
--- /dev/null
@@ -0,0 +1,15 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class NetworkSliceSubnetAttributesDTO {
+    private String operationalState;
+    private String administrativeState;
+    private String networkSliceSubnetType;
+    private List<String> managedFunctionRef;
+    private List<String> networkSliceSubnetRef;
+    private List<SliceProfileItemDTO> sliceProfileList;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/NetworkSliceSubnetDTO.java
new file mode 100644 (file)
index 0000000..dd33832
--- /dev/null
@@ -0,0 +1,9 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import lombok.Data;
+
+@Data
+public class NetworkSliceSubnetDTO {
+    private String id;
+    private NetworkSliceSubnetAttributesDTO attributes;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnIdDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnIdDTO.java
new file mode 100644 (file)
index 0000000..49480c3
--- /dev/null
@@ -0,0 +1,9 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import lombok.Data;
+
+@Data
+public class PlmnIdDTO {
+    private String mcc;
+    private String mnc;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnInfoListDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/PlmnInfoListDTO.java
new file mode 100644 (file)
index 0000000..f0ac650
--- /dev/null
@@ -0,0 +1,12 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+public class PlmnInfoListDTO {
+    @JsonProperty("pLMNId")
+    private PlmnIdDTO pLMNId;
+    @JsonProperty("sNSSAI")
+    private SnssaiDTO sNSSAI;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/RanSliceSubnetProfileDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/RanSliceSubnetProfileDTO.java
new file mode 100644 (file)
index 0000000..98eda35
--- /dev/null
@@ -0,0 +1,16 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class RanSliceSubnetProfileDTO {
+    private List<Integer> coverageAreaTAList;
+    private String resourceSharingLevel;
+    @JsonProperty("RRU.PrbDl")
+    private Integer RRU_PrbDl;
+    @JsonProperty("RRU.PrbUl")
+    private Integer RRU_PrbUl;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileExtensionsDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileExtensionsDTO.java
new file mode 100644 (file)
index 0000000..bd1247b
--- /dev/null
@@ -0,0 +1,8 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import lombok.Data;
+
+@Data
+public class SliceProfileExtensionsDTO {
+    private String state;
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileItemDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SliceProfileItemDTO.java
new file mode 100644 (file)
index 0000000..3b43e6a
--- /dev/null
@@ -0,0 +1,13 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class SliceProfileItemDTO {
+    private String sliceProfileId;
+    private SliceProfileExtensionsDTO extensions;
+    private List<PlmnInfoListDTO> pLMNInfoList; // Note: JSON uses pLMNInfoList, Java can't start field with lowercase p after uppercase, so Lombok will map it.
+    private RanSliceSubnetProfileDTO RANSliceSubnetProfile; // Note: JSON uses RANSliceSubnetProfile
+}
diff --git a/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SnssaiDTO.java b/sample-rapp-generator/rapp-ran-nssmf-simulator/ran-nssmf-simulator/src/main/java/org/oransc/ran/nssmf/simulator/dto/SnssaiDTO.java
new file mode 100644 (file)
index 0000000..92ae054
--- /dev/null
@@ -0,0 +1,12 @@
+package org.oransc.ran.nssmf.simulator.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+public class SnssaiDTO {
+    @JsonProperty("sst")
+    private Integer sst; // Slice/Service Type
+    @JsonProperty("sd")
+    private String sd;  // Slice Differentiator
+}