X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fopenstack_lib.robot;h=b654cfd504d0ff163c1d1baa54e5b81acfca291d;hb=23ff8f980f66ef57fb4d254336a018e3a697a187;hp=80bc22ba3038d2305cdb5a3d1f2cb969499c2383;hpb=541f9cf287bf6c7dca45fe911f8e844988711fa3;p=osm%2Ftests.git diff --git a/robot-systest/lib/openstack_lib.robot b/robot-systest/lib/openstack_lib.robot index 80bc22b..b654cfd 100644 --- a/robot-systest/lib/openstack_lib.robot +++ b/robot-systest/lib/openstack_lib.robot @@ -147,6 +147,17 @@ Delete Volume [Return] ${stdout} +Get Subnet + [Documentation] Get subnet information in JSON format + [Arguments] ${subnet_id} + + Should Not Be Empty ${subnet_id} + ${rc} ${stdout}= Run and Return RC and Output openstack subnet show ${subnet_id} -f json + Log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} + + Stop Server [Documentation] Stop a server [Arguments] ${server_id} @@ -180,3 +191,23 @@ Delete Server [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} -c id -f value + 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}