Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot
-Force Tags heal_01 cluster_main daily regression
+Force Tags heal_01 cluster_heal daily
Suite Teardown Run Keyword And Ignore Error Suite Cleanup
*** Test Cases ***
Create VNF Descriptors
- [Tags] prepare
Create VNFD '%{PACKAGES_FOLDER}/${vnfd_charm_pkg}'
Create VNFD '%{PACKAGES_FOLDER}/${vnfd_volumes_pkg}'
Create NS Descriptor
- [Tags] prepare
Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
Network Service Instance Test
- [Tags] prepare
${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
Set Suite Variable ${ns_id} ${id}
Get NS Id
- [Tags] verify cleanup
+ [Tags] cleanup
${variables} Get Variables
IF not "\${ns_id}" in "${variables}"
${id}= Get Ns Id ${ns_name}
Get Volume VNF Info
- [Tags] verify
Variable Should Exist ${ns_id} msg=NS is not available
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_several_index}
log ${ip_addr}
Get Volumes Info
- [Tags] verify
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_volumes_name} --literal | yq '.vdu[0]."virtual-storage-desc" | length'
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${num_virtual_storage}= Convert To Integer ${stdout}
Check VDU Disks
- [Tags] verify
Variable Should Exist ${vnf_volumes_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_volumes_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -l
Run Keyword If ${num_lines} < ${vnf_num_volumes} Fail msg=Number of disks (${num_lines}) is less than specified in VDU (${vnf_num_volumes})
-Stop Persistent Volume VDU
- [Tags] verify
+Delete Persistent Volume VDU
Variable Should Exist ${vdu_volumes_id} msg=VDU is not available
- Stop Server ${vdu_volumes_id}
+ Delete Server ${vdu_volumes_id}
Sleep 20
Heal Persistent Volume VDU
- [Tags] verify
Variable Should Exist ${vnf_volumes_id} msg=VNF is not available
Heal Network Service ${ns_id} --vnf ${vnf_volumes_id} --cause "Heal VM of volumes_vnf" --vdu ${vdu_volumes_name}
Check VNF After Healing
- [Tags] verify
Variable Should Exist ${vnf_volumes_id} msg=VNF is not available
@{ip_list}= Get Vnf Vdur IPs ${vnf_volumes_id}