Realistic Examples: K6 Test-ware 34/139934/3
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Thu, 16 Jan 2025 10:53:59 +0000 (10:53 +0000)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Fri, 17 Jan 2025 11:11:41 +0000 (11:11 +0000)
- Updated resourceIdentifier query parameter to align with GNBDUFunctionConfig structure.
- Introduced hierarchical notation (parent=..., child=...) for precise resource identification.
- Added examples for querying all GNBDUFunctions, specific gNB IDs, and sub-resources like RIM-RS reporting configurations.

Issue-ID: CPS-2482
Change-Id: I9e10db9bed7a3503f617a9f8dbd9fed8787402dc
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
k6-tests/ncmp/common/cmhandle-crud.js
k6-tests/ncmp/common/passthrough-crud.js

index 0fea1a4..285028f 100644 (file)
@@ -53,9 +53,11 @@ function createCmHandlePayload(cmHandleIds) {
         "dmiPlugin": DMI_PLUGIN_URL,
         "createdCmHandles": cmHandleIds.map((cmHandleId, index) => ({
             "cmHandle": cmHandleId,
-            "alternateId": cmHandleId.replace('ch-', 'alt-'),
+            "alternateId": cmHandleId.replace('ch-', 'Subnetwork=Europe,ManagedElement='),
             "moduleSetTag": MODULE_SET_TAGS[index % MODULE_SET_TAGS.length],
-            "cmHandleProperties": {"neType": "RadioNode"},
+            "cmHandleProperties": {
+                "id": "123"
+            },
             "publicCmHandleProperties": {
                 "Color": "yellow",
                 "Size": "small",
index 86fcef6..251ddf8 100644 (file)
@@ -29,7 +29,7 @@ import {
 
 export function passthroughRead(useAlternateId) {
     const cmHandleReference = getRandomCmHandleReference(useAlternateId);
-    const resourceIdentifier = 'my-resource-identifier';
+    const resourceIdentifier = 'NRCellDU/attributes/cellLocalId';
     const datastoreName = 'ncmp-datastore:passthrough-operational';
     const includeDescendants = true;
     const url = generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants);
@@ -38,11 +38,14 @@ export function passthroughRead(useAlternateId) {
 
 export function passthroughWrite(useAlternateId) {
     const cmHandleReference = getRandomCmHandleReference(useAlternateId);
-    const resourceIdentifier = 'my-resource-identifier';
+    const resourceIdentifier = 'NRCellDU/attributes/cellLocalId';
     const datastoreName = 'ncmp-datastore:passthrough-running';
     const includeDescendants = false;
     const url = generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants);
-    const payload = JSON.stringify({"neType": "BaseStation"});
+    const payload = JSON.stringify({
+        "id": "123",
+        "attributes": {"userLabel": "test"}
+    });
     return performPostRequest(url, payload, 'passthroughWrite');
 }
 
@@ -51,10 +54,10 @@ export function legacyBatchRead(cmHandleIds) {
     const payload = JSON.stringify({
         "operations": [
             {
-                "resourceIdentifier": "parent/child",
+                "resourceIdentifier": "NRCellDU/attributes/cellLocalId",
                 "targetIds": cmHandleIds,
                 "datastore": "ncmp-datastore:passthrough-operational",
-                "options": "(fields=schemas/schema)",
+                "options": "(fields=NRCellDU/attributes/cellLocalId)",
                 "operationId": "12",
                 "operation": "read"
             }
@@ -64,8 +67,8 @@ export function legacyBatchRead(cmHandleIds) {
 }
 
 function getRandomCmHandleReference(useAlternateId) {
-    const prefix = useAlternateId ? 'alt' : 'ch';
-    return `${prefix}-${randomIntBetween(1, TOTAL_CM_HANDLES)}`;
+    const prefix = useAlternateId ? 'Subnetwork=Europe,ManagedElement=' : 'ch-';
+    return `${prefix}${randomIntBetween(1, TOTAL_CM_HANDLES)}`;
 }
 
 function generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants) {