X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fopenstack_lib.robot;h=c72892e41c55136688d264040d683a9f40f1fcd8;hb=refs%2Fchanges%2F09%2F11709%2F1;hp=5564e4493e456934037c8e10dc18eb930d67dca4;hpb=0e696254b8dfd0d2ba854f2c5f62523cbf9eba4c;p=osm%2Ftests.git diff --git a/robot-systest/lib/openstack_lib.robot b/robot-systest/lib/openstack_lib.robot index 5564e44..c72892e 100644 --- a/robot-systest/lib/openstack_lib.robot +++ b/robot-systest/lib/openstack_lib.robot @@ -33,3 +33,28 @@ Get Flavor Properties log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} + + +Check NS Servers In VIM + [Documentation] Check if the number of servers in Openstack by filtering by NS name is as expected. + [Arguments] ${ns_name} ${number} + + Should Not Be Empty ${ns_name} + ${rc} ${stdout}= Run and Return RC and Output openstack server list | grep ${ns_name} | awk '{print $4}' + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + @{servers} = Split String ${stdout} + ${n_servers}= Get Length ${servers} + Should Be Equal As Integers ${number} ${n_servers} + + +Get Project Quota + [Documentation] Get a field (ram, cores, ports, etc.) from quota in current project. + [Arguments] ${field} + + Should Not Be Empty ${field} + ${rc} ${stdout}= Run and Return RC and Output openstack quota show -c ${field} -f value + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} +