Remove unnecessary grep and tr from some tests
Change-Id: I1cd911ee35614f1726dd95abe6a5b1923a8b772c
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/robot-systest/lib/vnf_lib.robot b/robot-systest/lib/vnf_lib.robot
index b3d4aa7..b7d6cc3 100644
--- a/robot-systest/lib/vnf_lib.robot
+++ b/robot-systest/lib/vnf_lib.robot
@@ -26,7 +26,7 @@
[Arguments] ${vnf_id}
Should Not Be Empty ${vnf_id}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | grep vim-id | awk '{print $2}'
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq -r '.vdur[]."vim-id"'
Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
@@ -51,7 +51,7 @@
[Arguments] ${vnf_id} ${vdur_id}
Should Not Be Empty ${vnf_id}
- ${rc} ${vm_vim_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq '."vim-id"' | tr -d \\"
+ ${rc} ${vm_vim_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq -r '."vim-id"'
Log ${vm_vim_id}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${vm_vim_id} values=False
[Return] ${vm_vim_id}
@@ -63,7 +63,7 @@
[Arguments] ${vnf_id}
Should Not Be Empty ${vnf_id}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[].interfaces[]."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq -r '.vdur[].interfaces[]."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{ip} = Split String ${stdout}
[Return] @{ip}
@@ -76,6 +76,6 @@
Should Not Be Empty ${vnf_id}
Should Not Be Empty ${attribute}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(."count-index" == ${count_index})' | yq '."${attribute}"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(."count-index" == ${count_index})' | yq -r '."${attribute}"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
[Return] ${stdout}