[Arguments] ${ns_id}
Should Not Be Empty ${ns_id}
- @{vnf_list_string}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
+ @{vnf_list_string}= Run and Return RC and Output osm vnf-list --ns ${ns_id} | grep ${ns_id} | awk '{print $2}' 2>&1
# Returns a String of vnf_id and needs to be converted into a list
@{vnf_list} = Split String ${vnf_list_string}[1]
Log List ${vnf_list}
[Arguments] ${ns_operation_id}
Should Not Be Empty ${ns_operation_id}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState
Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False
[Arguments] ${ns_operation_id}
Should Not Be Empty ${ns_operation_id}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState
Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} FAILED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
[Arguments] ${ns_operation_id}
Should Not Be Empty ${ns_operation_id}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState
Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain Any ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
[Arguments] ${ns_id}
Should Not Be Empty ${ns_id}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-list --ns ${ns_id} | grep ${ns_id} | awk '{print $2}' 2>&1
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{vdur} = Split String ${stdout}
[Return] @{vdur}
[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[].name | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq -r .vdur[].name
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{vdur} = Split String ${stdout}
[Return] @{vdur}
Should Not Be Empty ${vnf_id}
Should Not Be Empty ${kdu_name}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq .config.replicaCount | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq -r .config.replicaCount
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${return} = Set Variable If '${stdout}' == 'null' ${EMPTY} ${stdout}
[Return] ${return}
[Arguments] ${ns_name}
Should Not Be Empty ${ns_name}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq ._admin.deployed.VCA[].application | tr -d \\"
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq -r ._admin.deployed.VCA[].application
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{app_names} = Split String ${stdout}
[Return] ${app_names}
[Arguments] ${ns_name} ${vnf_id} ${vdur_id}
- ${rc} ${affinity_group_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq '."affinity-or-anti-affinity-group-id"[0]' | tr -d \\" 2>&1
+ ${rc} ${affinity_group_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq -r '."affinity-or-anti-affinity-group-id"[0]' 2>&1
Log ${affinity_group_id}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_id} values=False
- ${rc} ${affinity_group_name}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq '."affinity-or-anti-affinity-group"[] | select(.id == "'${affinity_group_id}'")' | yq '.name' | tr -d \\" 2>&1
+ ${rc} ${affinity_group_name}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq '."affinity-or-anti-affinity-group"[] | select(.id == "'${affinity_group_id}'")' | yq -r '.name' 2>&1
Log ${affinity_group_name}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_name} values=False
[Return] ${affinity_group_name}
[Arguments] ${flavor_name} ${cpu}=1 ${ram}=1024 ${disk}=10
Should Not Be Empty ${flavor_name}
- ${rc} ${flavor_id}= Run and Return RC and Output openstack flavor create ${flavor_name} --ram ${ram} --disk ${disk} --vcpus ${cpu} -f yaml | yq '.id' | tr -d \\"
+ ${rc} ${flavor_id}= Run and Return RC and Output openstack flavor create ${flavor_name} --ram ${ram} --disk ${disk} --vcpus ${cpu} -f yaml | yq -r '.id'
Log ${flavor_id}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${flavor_id}
[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}
[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}
[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}
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}
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}
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}
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 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}
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}
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}
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}
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}
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}