${ns_id} ${EMPTY}
${vnf_member_index} vnf-several-volumes
${vnf_ip_addr} ${EMPTY}
+${success_return_code} 0
*** Test Cases ***
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}'
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