X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Ftestsuite%2Fheal_04-autohealing.robot;fp=robot-systest%2Ftestsuite%2Fheal_04-autohealing.robot;h=024cd3dad0399ceb78e0860242b9a4ce41d9d368;hb=631d1616bfd6f500ab4c454967678cbb042dcd8c;hp=990b44acec9718d8c01ff3880f005412a5e00041;hpb=0a6041737c93416cbaa1ec4855d37b9c8fda5690;p=osm%2Ftests.git diff --git a/robot-systest/testsuite/heal_04-autohealing.robot b/robot-systest/testsuite/heal_04-autohealing.robot index 990b44a..024cd3d 100644 --- a/robot-systest/testsuite/heal_04-autohealing.robot +++ b/robot-systest/testsuite/heal_04-autohealing.robot @@ -31,7 +31,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot ${vnfd_pkg} autoheal_vnf ${vnfd_name} autoheal_vnfd ${vdu_name} autoheal_vnfd-VM -${vnf_index} 1 +${vnf_index} autoheal-basic-1 ${nsd_pkg} autoheal_ns ${nsd_name} autoheal_nsd # NS instance name and configuration @@ -46,25 +46,26 @@ ${password} ${EMPTY} ${success_return_code} 0 +#Healing wait time +${healing_pol_time} 15sec +${healing_max_wait_time} 10m + *** Test Cases *** Create VNF Descriptors - [Tags] prepare Create VNFD '%{PACKAGES_FOLDER}/${vnfd_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} @@ -73,7 +74,6 @@ Get NS Id Get VNF Info - [Tags] verify Variable Should Exist ${ns_id} msg=NS is not available ${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_index} log ${ip_addr} @@ -91,20 +91,25 @@ Get VNF Info Stop Autoheal VDU - [Tags] verify Variable Should Exist ${vdu_autoheal_id} msg=VDU is not available Halt Server ${vdu_autoheal_id} Sleep 20 -Check VNF After Healing - [Tags] verify +Wait For Autohealing To Be Completed FOR ${Index} IN RANGE 0 15 - ${server_status}= Get Server Property ${vdu_autoheal_id} status - ${status}= Run Keyword And Return Status Should Be Equal ${server_status} ACTIVE + ${status}= Run Keyword And Return Status Get Operations By Type ${ns_id} heal Run Keyword If ${status} Exit For Loop ... ELSE Sleep 10 END + ${stdout}= Get Operations By Type ${ns_id} heal + ${healing_max_wait_time}= Convert Time ${healing_max_wait_time} result_format=number + ${healing_max_wait_time}= Evaluate ${healing_max_wait_time} * ${vim_timeout_multiplier} + Wait Until Keyword Succeeds ${healing_max_wait_time} ${healing_pol_time} Check For NS Operation Ended ${stdout} + Check For NS Operation Completed ${stdout} + + +Check VNF After Healing Variable Should Exist ${vnf_autoheal_id} msg=VNF is not available @{ip_list}= Get Vnf Vdur IPs ${vnf_autoheal_id}