Remove unnecessary grep and tr from some tests
Change-Id: I1cd911ee35614f1726dd95abe6a5b1923a8b772c
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/robot-systest/testsuite/basic_18-ns_ip_profile.robot b/robot-systest/testsuite/basic_18-ns_ip_profile.robot
index 9028bd0..96d7a4d 100644
--- a/robot-systest/testsuite/basic_18-ns_ip_profile.robot
+++ b/robot-systest/testsuite/basic_18-ns_ip_profile.robot
@@ -92,15 +92,15 @@
Check Vnf1 IPs
Variable Should Exist ${vnf_id1} msg=VNF1 is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet1_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet1_prefix}
Set Suite Variable ${vnf1_ip1} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface2_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface2_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet2_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet2_prefix}
Set Suite Variable ${vnf1_ip2} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface3_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface3_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet3_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet3_prefix}
Set Suite Variable ${vnf1_ip3} ${stdout}
@@ -110,15 +110,15 @@
Check Vnf2 IPs
Variable Should Exist ${vnf_id1} msg=VNF2 is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet1_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet1_prefix}
Set Suite Variable ${vnf2_ip1} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface2_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface2_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet2_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet2_prefix}
Set Suite Variable ${vnf2_ip2} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface3_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface3_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet3_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet3_prefix}
Set Suite Variable ${vnf2_ip3} ${stdout}
diff --git a/robot-systest/testsuite/basic_19-vnf_ip_profile.robot b/robot-systest/testsuite/basic_19-vnf_ip_profile.robot
index 1f705cd..6701096 100644
--- a/robot-systest/testsuite/basic_19-vnf_ip_profile.robot
+++ b/robot-systest/testsuite/basic_19-vnf_ip_profile.robot
@@ -81,10 +81,10 @@
Check Vnf IPs
Variable Should Exist ${vnf_id} msg=VNF is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[] | select(."vnf-vld-id" == "internal")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[] | select(."vnf-vld-id" == "internal")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${internal_prefix} msg=${stdout} doesn't match subnet's regexp ${internal_prefix}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[] | select(."vnf-vld-id" == "internal")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[] | select(."vnf-vld-id" == "internal")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${internal_prefix} msg=${stdout} doesn't match subnet's regexp ${internal_prefix}
diff --git a/robot-systest/testsuite/basic_29-vnf_ipv6_profile.robot b/robot-systest/testsuite/basic_29-vnf_ipv6_profile.robot
index d47e12a..2d1ab31 100644
--- a/robot-systest/testsuite/basic_29-vnf_ipv6_profile.robot
+++ b/robot-systest/testsuite/basic_29-vnf_ipv6_profile.robot
@@ -84,16 +84,16 @@
Check Vnf IPs
Variable Should Exist ${vnf_id} msg=VNF is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[] | select(."vnf-vld-id" == "internal")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[] | select(."vnf-vld-id" == "internal")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${internal_prefix} msg=${stdout} doesn't match subnet's regexp ${internal_prefix}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[] | select(."vnf-vld-id" == "internal")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[] | select(."vnf-vld-id" == "internal")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${internal_prefix} msg=${stdout} doesn't match subnet's regexp ${internal_prefix}
Check that ipv6 address_mode and ra_mode are set
- ${rc} ${vim_info}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(."count-index" == 0)' | yq '.vim_info[].interfaces[].vim_info' | tr -d \\"
+ ${rc} ${vim_info}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(."count-index" == 0)' | yq -r '.vim_info[].interfaces[].vim_info'
${subnet_id}= Get Regexp Matches ${vim_info} {ip_address: '2001:db8::.*', subnet_id: ([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})} 1
${subnet_info}= Get Subnet ${subnet_id}[0]
${json_object}= Convert String to JSON ${subnet_info}
diff --git a/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot b/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot
index ee60b39..1246ed5 100644
--- a/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot
+++ b/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot
@@ -91,7 +91,7 @@
Check Vnf1 IPs
Variable Should Exist ${vnf_id1} msg=VNF1 is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet1_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet1_prefix}
Set Suite Variable ${vnf1_ip1} ${stdout}
@@ -100,7 +100,7 @@
Check Vnf2 IPs
Variable Should Exist ${vnf_id2} msg=VNF2 is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq '."ip-address"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq -r '."ip-address"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Should Match Regexp ${stdout} ${datanet1_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet1_prefix}
Set Suite Variable ${vnf2_ip1} ${stdout}
@@ -129,7 +129,7 @@
Check that ipv6 address_mode and ra_mode are set
- ${rc} ${vim_info}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[] | select(."count-index" == 0)' | yq '.vim_info[].interfaces[].vim_info' | tr -d \\"
+ ${rc} ${vim_info}= Run and Return RC and Output osm vnf-show ${vnf_id1} --literal | yq '.vdur[] | select(."count-index" == 0)' | yq -r '.vim_info[].interfaces[].vim_info'
${subnet_id}= Get Regexp Matches ${vim_info} {ip_address: '2001:db8::.*', subnet_id: ([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})} 1
${subnet_info}= Get Subnet ${subnet_id}[0]
${json_object}= Convert String to JSON ${subnet_info}
diff --git a/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot b/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot
index f8fe60f..ea7deae 100644
--- a/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot
+++ b/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot
@@ -81,8 +81,8 @@
Get Vnf Management Ip Addresses
- ${rc} ${vdu0_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[]."ip-address"' | tr -d \\"
- ${rc} ${vdu1_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[]."ip-address"' | tr -d \\"
+ ${rc} ${vdu0_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq -r '.vdur[0].interfaces[]."ip-address"'
+ ${rc} ${vdu1_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq -r '.vdur[1].interfaces[]."ip-address"'
Set Suite Variable ${mgmnt_ip_addr_0} ${vdu0_ip}
Set Suite Variable ${mgmnt_ip_addr_1} ${vdu1_ip}
diff --git a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot
index b18e34a..688eb02 100644
--- a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot
+++ b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot
@@ -74,13 +74,13 @@
Get Thresholds From VNF
- ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${scaleout_threshold}= Convert To Number ${stdout}
Set Suite Variable ${metric_threshold} ${scaleout_threshold}
Log ${metric_threshold}
- ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."threshold-time"' | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."threshold-time"'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${threshold_time_value}= Convert To Number ${stdout}
Set Suite Variable ${threshold_time} ${threshold_time_value}