X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fns_lib.robot;h=0747bc15c1933cd08af86eb82aa555dea555bfa7;hb=eb5556e1fb8ce40d7fc48872d1420e57b1cffc65;hp=b926f8490d59d0228e21394c0d28b538e06bdba8;hpb=0022d243adb7675d0c1a6511c59ff867f61d7a2a;p=osm%2Ftests.git diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot index b926f84..0747bc1 100644 --- a/robot-systest/lib/ns_lib.robot +++ b/robot-systest/lib/ns_lib.robot @@ -118,6 +118,8 @@ Get Vnf Ip List Check For Ns Instance To Configured [arguments] ${ns_name} + ${rc} ${stdout}= Run and Return RC and Output openstack server list + log ${stdout} ${rc} ${stdout}= run and return rc and output osm ns-list --filter name="${ns_name}" log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} @@ -126,6 +128,8 @@ Check For Ns Instance To Configured Check For NS Instance For Failure [Arguments] ${ns_name} + ${rc} ${stdout}= Run and Return RC and Output openstack server list + log ${stdout} ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} @@ -134,6 +138,8 @@ Check For NS Instance For Failure Check For NS Instance To Be Deleted [Arguments] ${ns} + ${rc} ${stdout}= Run and Return RC and Output openstack server list + log ${stdout} ${rc} ${stdout}= Run and Return RC and Output osm ns-list | awk '{print $2}' | grep ${ns} Should Not Be Equal As Strings ${stdout} ${ns} @@ -232,7 +238,7 @@ Check For NS Operation Completed [Arguments] ${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 .operationState | tr -d \\" log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} Should Contain ${stdout} COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False @@ -254,7 +260,7 @@ Get Vnf Vdur Names [Arguments] ${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 .vdur[].name | tr -d \\" Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False @{vdur} = Split String ${stdout} [Return] @{vdur} @@ -265,7 +271,8 @@ Get Vnf Kdu Replica Count [Arguments] ${vnf_id} ${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 .config.replicaCount | tr -d \\" Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False - [Return] ${stdout} + ${return} = Set Variable If '${stdout}' == 'null' ${EMPTY} ${stdout} + [Return] ${return}