New testsuite fail01 to test failed deployments because of lack of resources

Updated openstack_lib.robot for adding new keyword 'Check NS Servers In VIM'
needed by fail01 test.

Change-Id: Ib602d27d8643e9c4b7c1029533258b79df5e86a8
Signed-off-by: aguilard <e.dah.tid@telefonica.com>
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 @@
     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}