Fix more vendor specific assumptions 15/14215/1
authorAllain Legacy <alegacy@redhat.com>
Wed, 5 Mar 2025 19:45:13 +0000 (14:45 -0500)
committerAllain Legacy <alegacy@redhat.com>
Wed, 5 Mar 2025 19:45:13 +0000 (14:45 -0500)
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 <alegacy@redhat.com>
test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.5_Verify_general_aspects_of_O2ims_API.robot
test_scripts/O2IMS_Compliance_Test/test_configs.yaml

index c9a53cb..bc7dd3a 100644 (file)
@@ -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
index 41237b7..133b365 100644 (file)
@@ -13,6 +13,8 @@ ocloud:
     smo_token_data: put_smo_token_data_here\r
     deploymentmanager_name: put_deploymentmanager_name_here\r
     resourcetype_name: put_resourcetype_name_here\r
+    resource_description_substring: put_resource_description_substring_here\r
+\r
     api:\r
       host: 192.168.112.15\r
       node_port: 30205\r