From 71ae92c51c775275ee799d7b7e4862767e2c4f95 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Fri, 25 Apr 2025 13:18:58 +0200 Subject: [PATCH] Fix advanced_cluster_mgmt library while filter option is not working for ksu, oka and cluster osmclient commands Change-Id: I28c3199b518170238be13339233d065a196c5f10 Signed-off-by: garciadeblas --- .../lib/advanced_cluster_mgmt_lib.resource | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/robot-systest/lib/advanced_cluster_mgmt_lib.resource b/robot-systest/lib/advanced_cluster_mgmt_lib.resource index 23b3c02..5976aff 100644 --- a/robot-systest/lib/advanced_cluster_mgmt_lib.resource +++ b/robot-systest/lib/advanced_cluster_mgmt_lib.resource @@ -161,10 +161,12 @@ Check For Cluster To Be Deleted Log ${matches} IF ${matches} != @{EMPTY} Log ${cluster_name} is a valid UUID - ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter _id="${cluster_name}" | grep ${cluster_name} + # ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter _id="${cluster_name}" | grep ${cluster_name} + ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter _id="${cluster_name}" -o jsonpath='[*]._id'| grep -E "\^${cluster_name}\$"" ELSE Log ${cluster_name} is not a valid UUID, so it will be treated as a name - ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter name="${cluster_name}" | grep ${cluster_name} + # ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter name="${cluster_name}" | grep ${cluster_name} + ${rc} ${stdout}= Run And Return Rc And Output osm cluster-list --filter name="${cluster_name}" -o jsonpath='[*].name'| grep -E "\^${cluster_name}\$"" END Log ${rc},${stdout} Should Be Empty ${stdout} @@ -215,10 +217,12 @@ Check For OKA To Be Deleted Log ${matches} IF ${matches} != @{EMPTY} Log ${oka_name} is a valid UUID - ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter _id="${oka_name}" | grep ${oka_name} + # ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter _id="${oka_name}" | grep ${oka_name} + ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter _id="${oka_name}" -o jsonpath='[*]._id'| grep -E "\^${oka_name}\$"" ELSE Log ${oka_name} is not a valid UUID, so it will be treated as a name - ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter name="${oka_name}" | grep ${oka_name} + # ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter name="${oka_name}" | grep ${oka_name} + ${rc} ${stdout}= Run And Return Rc And Output osm oka-list --filter name="${oka_name}" -o jsonpath='[*].name'| grep -E "\^${oka_name}\$"" END Log ${rc},${stdout} Should Be Empty ${stdout} @@ -275,7 +279,7 @@ Check For KSU To Be Deleted IF ${matches} != @{EMPTY} Log ${ksu_name} is a valid UUID # ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" | grep ${ksu_name} - ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" -o jsonpath='[*].name'| grep -E "\^${ksu_name}\$"" + ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" -o jsonpath='[*]._id'| grep -E "\^${ksu_name}\$"" ELSE Log ${ksu_name} is not a valid UUID, so it will be treated as a name # ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter name="${ksu_name}" | grep ${ksu_name} -- 2.25.1