X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fopenstack_lib.robot;fp=robot-systest%2Flib%2Fopenstack_lib.robot;h=cd03eb8c027388f0bca988eccffabe67b008f52d;hb=74316e55060772058391e1fe71fed71dd321c4a7;hp=5564e4493e456934037c8e10dc18eb930d67dca4;hpb=7acf3bacf7f1172b55e4e0a95bf583cf2f3b6757;p=osm%2Ftests.git diff --git a/robot-systest/lib/openstack_lib.robot b/robot-systest/lib/openstack_lib.robot index 5564e44..cd03eb8 100644 --- a/robot-systest/lib/openstack_lib.robot +++ b/robot-systest/lib/openstack_lib.robot @@ -33,3 +33,16 @@ 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}