Feature 10975: Modify heal_02 to test instantiation, scaling and healing using an existing flavor-id
Change-Id: Ic9c02b13dda5c2e8eac3b8bfe027bd858d49a367
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
diff --git a/robot-systest/lib/openstack_lib.robot b/robot-systest/lib/openstack_lib.robot
index b95b0c3..bdf49aa 100644
--- a/robot-systest/lib/openstack_lib.robot
+++ b/robot-systest/lib/openstack_lib.robot
@@ -191,3 +191,23 @@
[Return] ${stdout}
+Create Flavor
+ [Documentation] Create a 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 '.id' | tr -d \\"
+ Log ${flavor_id}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ [Return] ${flavor_id}
+
+
+Delete Flavor
+ [Documentation] Delete a Flavor
+ [Arguments] ${flavor_id}
+
+ Should Not Be Empty ${flavor_id}
+ ${rc} ${stdout}= Run and Return RC and Output openstack flavor delete ${flavor_id}
+ Log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ [Return] ${stdout}