From: aguilard Date: Fri, 5 Nov 2021 13:26:42 +0000 (+0100) Subject: Updated basic_21 test X-Git-Tag: release-v11.0-start^0 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=commitdiff_plain;h=d45d50af851b72151e0233440c4baea6f33727f3 Updated basic_21 test Added checking on the number of disks in the VDU. Change-Id: I915d1fcbe616c8880a616fb1289daa6fd2c14c42 Signed-off-by: aguilard --- diff --git a/robot-systest/testsuite/basic_21-persistent_volumes.robot b/robot-systest/testsuite/basic_21-persistent_volumes.robot index 8073b36..bc957d3 100644 --- a/robot-systest/testsuite/basic_21-persistent_volumes.robot +++ b/robot-systest/testsuite/basic_21-persistent_volumes.robot @@ -50,6 +50,7 @@ ${password} ${EMPTY} ${ns_id} ${EMPTY} ${vnf_member_index} vnf-several-volumes ${vnf_ip_addr} ${EMPTY} +${success_return_code} 0 *** Test Cases *** @@ -58,6 +59,15 @@ Create VNF Descriptor Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}' +Get Volumes From VNF + + ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '."virtual-storage-desc" | length' + Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False + ${num_virtual_storage}= Convert To Integer ${stdout} + Set Suite Variable ${vnf_num_volumes} ${num_virtual_storage} + log ${vnf_num_volumes} + + Create NS Descriptor Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' @@ -80,8 +90,11 @@ Check Vdu disks Variable Should Exist ${vnf_ip_addr} msg=VNF is not available Sleep 30 seconds Wait for SSH daemon to be up - ${stdout}= Execute Remote Command Check Rc Return Output ${vnf_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -fm + ${stdout}= Execute Remote Command Check Rc Return Output ${vnf_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -l log ${stdout} + ${lines}= Get Lines Containing String ${stdout} disk + ${num_lines}= Get Line Count ${lines} + Run Keyword If ${num_lines} < ${vnf_num_volumes} Fail msg=Number of disks (${num_lines}) is less than specified in VDU (${vnf_num_volumes}) Delete NS Instance Test