From 860cb53939eab2c31f587b77c8e062b88f4dd354 Mon Sep 17 00:00:00 2001 From: Allain Legacy Date: Wed, 5 Mar 2025 14:45:13 -0500 Subject: [PATCH] Fix more vendor specific assumptions This addresses tests that have hardcoded values that are specific to a vendor's implementation. Issue-ID: INT-168 Change-Id: I65a379e3557dfbbaf42fc9b7ebf48131a4151c91 Signed-off-by: Allain Legacy --- .../7.3.5_Verify_general_aspects_of_O2ims_API.robot | 19 +++++++++---------- test_scripts/O2IMS_Compliance_Test/test_configs.yaml | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.5_Verify_general_aspects_of_O2ims_API.robot b/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.5_Verify_general_aspects_of_O2ims_API.robot index c9a53cb..bc7dd3a 100644 --- a/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.5_Verify_general_aspects_of_O2ims_API.robot +++ b/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.5_Verify_general_aspects_of_O2ims_API.robot @@ -12,6 +12,8 @@ ${ORAN_SERVICE_NODE_PORT} ${ocloud.oran_o2_app.api.node_port} ${GLOBAL_OCLOUD_ID1} ${ocloud.oran_o2_app.g_ocloud_id} ${SMO_TOKEN_DATA} ${ocloud.oran_o2_app.smo_token_data} ${globalLocationId} ${ocloud.oran_o2_app.g_location_id} +${RESOURCETYPE_NAME} ${ocloud.oran_o2_app.resourcetype_name} +${DESCRIPTION_SUBSTRING} ${ocloud.oran_o2_app.resource_description_substring} ${ORAN_O2IMS_ENDPOINT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT} @@ -78,7 +80,7 @@ s4, query Resources with filters Clear Expectations - GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver) + GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,${RESOURCETYPE_NAME}) ${resourceTypeId} output $[0].resourceTypeId GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools @@ -96,9 +98,8 @@ s4, query Resources with filters Should Be Equal ${resource}[resourceTypeId] ${resourceTypeId} END - # filter accelerator - ${substring1} input "Intel Corporation" - ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(cont,description,${substring1}) + # filter for description + ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(cont,description,${DESCRIPTION_SUBSTRING}) # Clear Expectations log ${res} level=INFO Integer response status 200 @@ -106,20 +107,18 @@ s4, query Resources with filters Array $ minItems=1 uniqueItems=true @{resources} output $ FOR ${resource} IN @{resources} - should contain ${resource}[description] ${substring1} + should contain ${resource}[description] ${DESCRIPTION_SUBSTRING} END # filters combination - - GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_ethernet) + GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,${RESOURCETYPE_NAME}) ${resourceTypeId} output $[0].resourceTypeId GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools ${resourcePoolId} output $[0].resourcePoolId # Clear Expectations - ${substring1} input "Intel Corporation" # Expect Response Body ${CURDIR}/schemas/resources_properties.json - ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources {"filter": "(eq,resourceTypeId,${resourceTypeId});(cont,description,${substring1})"} + ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources {"filter": "(eq,resourceTypeId,${resourceTypeId});(cont,description,${DESCRIPTION_SUBSTRING})"} # Clear Expectations log ${res} level=INFO Integer response status 200 @@ -128,7 +127,7 @@ s4, query Resources with filters @{resources} output $ FOR ${resource} IN @{resources} Should Be Equal ${resource}[resourceTypeId] ${resourceTypeId} - Should Contain ${resource}[description] ${substring1} + Should Contain ${resource}[description] ${DESCRIPTION_SUBSTRING} END s5, query Resources with attribute selector diff --git a/test_scripts/O2IMS_Compliance_Test/test_configs.yaml b/test_scripts/O2IMS_Compliance_Test/test_configs.yaml index 41237b7..133b365 100644 --- a/test_scripts/O2IMS_Compliance_Test/test_configs.yaml +++ b/test_scripts/O2IMS_Compliance_Test/test_configs.yaml @@ -13,6 +13,8 @@ ocloud: smo_token_data: put_smo_token_data_here deploymentmanager_name: put_deploymentmanager_name_here resourcetype_name: put_resourcetype_name_here + resource_description_substring: put_resource_description_substring_here + api: host: 192.168.112.15 node_port: 30205 -- 2.16.6