From: aguilard Date: Tue, 20 Jun 2023 07:40:33 +0000 (+0000) Subject: Fix Heal02 error when flavor already exists X-Git-Tag: release-v14.0-start~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=83eed18f45e0a1e8ce58535324b5d19ff9183dfd;p=osm%2Ftests.git Fix Heal02 error when flavor already exists Change-Id: I9fd2d4cf332de4e0f367a2518b6f61db10749885 Signed-off-by: aguilard --- diff --git a/robot-systest/lib/openstack_lib.robot b/robot-systest/lib/openstack_lib.robot index 19dddc9..b654cfd 100644 --- a/robot-systest/lib/openstack_lib.robot +++ b/robot-systest/lib/openstack_lib.robot @@ -196,7 +196,7 @@ Create Flavor [Arguments] ${flavor_name} ${cpu}=1 ${ram}=1024 ${disk}=10 Should Not Be Empty ${flavor_name} - ${rc} ${flavor_id}= Run and Return RC and Output openstack flavor create ${flavor_name} --ram ${ram} --disk ${disk} --vcpus ${cpu} -f yaml | yq -r '.id' + ${rc} ${flavor_id}= Run and Return RC and Output openstack flavor create ${flavor_name} --ram ${ram} --disk ${disk} --vcpus ${cpu} -c id -f value Log ${flavor_id} Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${flavor_id} diff --git a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot index fc79217..bf88510 100644 --- a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot +++ b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot @@ -77,7 +77,8 @@ Create NS Descriptor Create Test Flavor - ${id}= Create Flavor ${flavor_name} + Delete Flavor ${flavor_name} + ${id}= Create Flavor ${flavor_name} 1 1024 10 Set Suite Variable ${flavor_id} ${id} @@ -222,6 +223,7 @@ Delete VNF Descriptors Delete Objects in VIM [Tags] cleanup + Delete Flavor ${flavor_id} ${error}= Set Variable 0 FOR ${vol_id} IN @{vim_volumes} Log Checking if volume ${vol_id} is still in VIM @@ -247,10 +249,6 @@ Delete Objects in VIM END -Delete flavor - Delete Flavor ${flavor_id} - - *** Keywords *** Suite Cleanup [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim @@ -260,4 +258,3 @@ Suite Cleanup Run Keyword If Any Tests Failed Delete VNFD ${vnfd_volumes_name} Run Keyword If Any Tests Failed Delete VNFD ${vnfd_charm_name} Run Keyword If Any Tests Failed Delete Objects in VIM - Run Keyword If Any Tests Failed Delete Flavor ${flavor_id} \ No newline at end of file